feat: inherit model-picker reorder/accordion persistence and shift-delete from otto-ui (#1833)

* feat(model-picker): drag-to-reorder providers and persist accordion state

Ports two model/provider picker QoL features from otto-ui:
- Persist collapsed state of picker sections (favorites, recent, each
  provider) via a new persisted zustand store so collapse survives
  remounts and reloads, shared across every picker surface.
- Desktop drag-to-reorder of provider sections (whole header as the
  mouse activator, 8px threshold so a plain click still toggles
  collapse), with the order persisted in useUIStore.providerOrder and
  applied across ModelControls, ModelMultiSelect and ModelSelector.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>

* feat(sessions): shift-click quick action hard-deletes thread without prompt

Ports the shift-quick-delete feature from otto-ui. The sidebar quick
action (normally archive) becomes a no-prompt hard delete while Shift is
held: the icon switches to a trash bin, the affordance turns destructive,
and the click bypasses the confirmation dialog via a new skipConfirm
source flag. A shared useShiftKeyHeld hook (single window listener set,
useSyncExternalStore) keeps only the small action button re-rendering on
Shift state changes, and resets on window blur so the affordance can't
get stuck after alt-tab.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>

---------

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
This commit is contained in:
Serhii Dziupin
2026-06-26 19:36:47 +03:00
committed by GitHub
co-authored by Serhii Dziupin
parent e7b952cbcb
commit 3e3cd82a47
19 changed files with 377 additions and 45 deletions
+1
View File
@@ -1999,6 +1999,7 @@ export const dict = {
'chat.modelControls.noProvidersOrModelsFound': 'No providers or models match your search.',
'chat.modelControls.reorderFavoriteAria': 'Reorder favorite',
'chat.modelControls.reorderFavoriteTitle': 'Drag to reorder favorite',
'chat.modelControls.reorderProviderTitle': 'Drag to reorder provider',
'chat.modelControls.permissionLabel.custom': 'Custom',
'chat.modelControls.permissionLabel.allow': 'Allow',
'chat.modelControls.permissionLabel.deny': 'Deny',
+1
View File
@@ -1965,6 +1965,7 @@ export const dict: Record<I18nKey, string> = {
"chat.modelControls.noProvidersOrModelsFound": "Ningún proveedor o modelo coincide con tu búsqueda.",
"chat.modelControls.reorderFavoriteAria": "Reordenar favorito",
"chat.modelControls.reorderFavoriteTitle": "Arrastrar para reordenar favorito",
"chat.modelControls.reorderProviderTitle": "Arrastrar para reordenar proveedor",
"chat.modelControls.permissionLabel.custom": "Personalizado",
"chat.modelControls.permissionLabel.allow": "Permitir",
"chat.modelControls.permissionLabel.deny": "Denegar",
+1
View File
@@ -1820,6 +1820,7 @@ export const dict = {
'chat.modelControls.noProvidersOrModelsFound': 'Aucun fournisseur ou modèle ne correspond à votre recherche.',
'chat.modelControls.reorderFavoriteAria': 'Réorganiser les favoris',
'chat.modelControls.reorderFavoriteTitle': 'Faites glisser pour réorganiser les favoris',
'chat.modelControls.reorderProviderTitle': 'Faites glisser pour réorganiser le fournisseur',
'chat.modelControls.permissionLabel.custom': 'Personnalisé',
'chat.modelControls.permissionLabel.allow': 'Permettre',
'chat.modelControls.permissionLabel.deny': 'Refuser',
+1
View File
@@ -1999,6 +1999,7 @@ export const dict: Record<I18nKey, string> = {
'chat.modelControls.noProvidersOrModelsFound': '검색과 일치하는 프로바이더 또는 모델이 없습니다.',
'chat.modelControls.reorderFavoriteAria': '즐겨찾기 순서 변경',
'chat.modelControls.reorderFavoriteTitle': '드래그하여 즐겨찾기 순서 변경',
'chat.modelControls.reorderProviderTitle': '드래그하여 공급자 순서 변경',
'chat.modelControls.permissionLabel.custom': '사용자 지정',
'chat.modelControls.permissionLabel.allow': '허용',
'chat.modelControls.permissionLabel.deny': '거부',
+1
View File
@@ -1169,6 +1169,7 @@ export const dict: Record<I18nKey, string> = {
'chat.modelControls.removeFromFavorites': 'Usuń z ulubionych',
'chat.modelControls.reorderFavoriteAria': 'Zmień kolejność ulubionych',
'chat.modelControls.reorderFavoriteTitle': 'Przeciągnij, aby zmienić kolejność ulubionych',
'chat.modelControls.reorderProviderTitle': 'Przeciągnij, aby zmienić kolejność dostawcy',
'chat.modelControls.resetToDefault': 'Przywróć domyślne',
'chat.modelControls.searchAgents': 'Szukaj agentów',
'chat.modelControls.searchModels': 'Szukaj modeli...',
@@ -1965,6 +1965,7 @@ export const dict: Record<I18nKey, string> = {
"chat.modelControls.noProvidersOrModelsFound": "Nenhum provedor ou modelo corresponde à sua pesquisa.",
"chat.modelControls.reorderFavoriteAria": "Reordenar favorito",
"chat.modelControls.reorderFavoriteTitle": "Arraste para reordenar favorito",
"chat.modelControls.reorderProviderTitle": "Arraste para reordenar provedor",
"chat.modelControls.permissionLabel.custom": "Personalizado",
"chat.modelControls.permissionLabel.allow": "Permitir",
"chat.modelControls.permissionLabel.deny": "Negar",
+1
View File
@@ -1965,6 +1965,7 @@ export const dict: Record<I18nKey, string> = {
"chat.modelControls.noProvidersOrModelsFound": "Жоден провайдер або модель не відповідає пошуку.",
"chat.modelControls.reorderFavoriteAria": "Змінити порядок вибраного",
"chat.modelControls.reorderFavoriteTitle": "Перетягніть, щоб змінити порядок вибраного",
"chat.modelControls.reorderProviderTitle": "Перетягніть, щоб змінити порядок провайдера",
"chat.modelControls.permissionLabel.custom": "Custom",
"chat.modelControls.permissionLabel.allow": "Дозволити",
"chat.modelControls.permissionLabel.deny": "Заборонити",
@@ -1965,6 +1965,7 @@ export const dict: Record<I18nKey, string> = {
'chat.modelControls.noProvidersOrModelsFound': '没有提供商或模型匹配你的搜索。',
'chat.modelControls.reorderFavoriteAria': '重新排序收藏',
'chat.modelControls.reorderFavoriteTitle': '拖动以重新排序收藏',
'chat.modelControls.reorderProviderTitle': '拖动以重新排序提供商',
'chat.modelControls.permissionLabel.custom': '自定义',
'chat.modelControls.permissionLabel.allow': '允许',
'chat.modelControls.permissionLabel.deny': '拒绝',
@@ -1969,6 +1969,7 @@ export const dict: Record<I18nKey, string> = {
'chat.modelControls.noProvidersOrModelsFound': '沒有供應商或模型符合你的搜尋。',
'chat.modelControls.reorderFavoriteAria': '重新排序最愛',
'chat.modelControls.reorderFavoriteTitle': '拖曳以重新排序最愛',
'chat.modelControls.reorderProviderTitle': '拖曳以重新排序供應商',
'chat.modelControls.permissionLabel.custom': '自訂',
'chat.modelControls.permissionLabel.allow': '允許',
'chat.modelControls.permissionLabel.deny': '拒絕',