LibreChat/client/src/hooks
Marco Beretta 7e466a498d
🎛️ refactor: Hand Chat Preferences to the Host and the Follow-Up Queue to Jotai (#16604)
* refactor: Supply saveDrafts and isTemporary Through Chat Settings

Both preferences are app-global: the settings dialog writes saveDrafts,
and the chat route and keyboard shortcuts write isTemporary. Every chat
reader (composer, autosave, pasted-text edit, new chat and new convo,
file uploads, submissions, the temporary toggle, landing, run code) now
takes them from the host ChatSettings context, which the app fills from
its store. ChatView still reads saveDrafts from the store while #15911
owns it.

* test: Cover Chat Settings Preferences End to End

* fix: Read the Temporary Flag at Run Time in Run Code

* test: Supply saveDrafts Through Chat Settings in the Hook Specs

* test: Pin the Run Code Retention Flag With a Stable Code Ref

* test: Turn Temporary Chat On Through Its Toggle in the Scenario

* refactor: Move the Queue Run-End Atoms to Jotai

The follow-up queue, its settled receipts and pending enqueue ids, the
pane and parked run-end signals, and the interrupt-drain flag are
written and read only by chat logic (queue drain, steering, the SSE
hook, the queue rail). They now live in store/queue as Jotai atoms with
every consumer converted. The run-end FIFO keeps its nullable one-shot
API as a writable derived atom.

* test: Cover the Chat-Owned Queue State End to End

* test: Give Each Queue Rail Its Own Store in the Split-View Spec

* test: Drop the Parked Run-End Scenario Canary Does Not Meet

* refactor: Keep the Queue State Inside the Chat Feature

The queue atoms and their types move from store/queue to hooks/Chat/queue,
next to the drain that owns them. store/families re-exports the types so
existing imports keep working.

* refactor: Import the Queue Types From the Chat Feature

* test: Scope the Split-View Queue Spec to What Its Harness Proves

* test: Run the Split-View Queue Spec on One Shared Store
2026-10-01 17:47:26 +02:00
..
__tests__ 🎛️ refactor: Hand Chat Preferences to the Host and the Follow-Up Queue to Jotai (#16604) 2026-10-01 17:47:26 +02:00
Agents 🧲 feat: Attach or Leave a Workspace on a Saved Chat (#16124) 2026-09-25 10:08:28 -04:00
Artifacts 🫸 fix: Keep Historical Artifacts Closed During Regeneration (#16511) 2026-09-29 13:15:35 -04:00
Assistants
Audio
Auth 🔑 feat: Passkey Authentication with WebAuthn Sign-In and Management (#14715) 2026-10-01 03:46:16 +00:00
Chat 🎛️ refactor: Hand Chat Preferences to the Host and the Follow-Up Queue to Jotai (#16604) 2026-10-01 17:47:26 +02:00
Config 💬 refactor: ChatForm UI redesign with unified palette (#14473) 2026-10-01 03:46:18 +00:00
Conversations 🖍️ feat: Give the Remaining Component Colour Literals Theme Roles (#16597) 2026-10-01 11:50:53 +00:00
Endpoint
Files 🎛️ refactor: Hand Chat Preferences to the Host and the Follow-Up Queue to Jotai (#16604) 2026-10-01 17:47:26 +02:00
Generic 💬 refactor: ChatForm UI redesign with unified palette (#14473) 2026-10-01 03:46:18 +00:00
Input 🎛️ refactor: Hand Chat Preferences to the Host and the Follow-Up Queue to Jotai (#16604) 2026-10-01 17:47:26 +02:00
MCP 💬 refactor: ChatForm UI redesign with unified palette (#14473) 2026-10-01 03:46:18 +00:00
Mermaid
Messages 💬 refactor: ChatForm UI redesign with unified palette (#14473) 2026-10-01 03:46:18 +00:00
Nav 💬 refactor: ChatForm UI redesign with unified palette (#14473) 2026-10-01 03:46:18 +00:00
Plugins 💬 refactor: ChatForm UI redesign with unified palette (#14473) 2026-10-01 03:46:18 +00:00
Prompts
Roles
Sharing
Skills
SSE 🎛️ refactor: Hand Chat Preferences to the Host and the Follow-Up Queue to Jotai (#16604) 2026-10-01 17:47:26 +02:00
ApiErrorBoundaryContext.tsx
AuthContext.tsx 🗂️ feat: Chat List Properties Menu and Project-Scoped Chats (#16246) 2026-10-01 03:46:18 +00:00
index.ts 🪶 style: Quieter Primitives, Shared Panel Headers, and Flat Management Lists (#16244) 2026-10-01 03:46:17 +00:00
ScreenshotContext.tsx 🖍️ feat: Give the Remaining Component Colour Literals Theme Roles (#16597) 2026-10-01 11:50:53 +00:00
useAdaptiveIcon.ts
useCatalogWarmup.ts
useChatBadges.ts 🧽 style: Composer, Welcome Screen and Context Panel Polish (#15838) 2026-09-11 21:23:17 -04:00
useClockFormat.ts
useDocumentTitle.ts 🔔 feat: Unseen Reply Indicators, Reply Notifications, and Mark as Unread (#15025) 2026-10-01 03:46:16 +00:00
useFavorites.ts 📌 feat: Unified Pinned Section With Sidebar Drag Interactions (#15057) 2026-09-11 10:41:05 -04:00
useFocusTrap.ts
useGenerationsByLatest.ts 🪢 fix: Withhold the Editor's Rerun Where No User Turn Can Be Replayed (#15887) 2026-09-13 12:54:01 -04:00
useGreeting.ts
useIsActiveItem.ts
useKeyboardShortcuts.spec.tsx 💬 refactor: ChatForm UI redesign with unified palette (#14473) 2026-10-01 03:46:18 +00:00
useKeyboardShortcuts.ts ⏳ feat: Add Ephemeral Retention Mode for Forced Temporary Chats (#13811) 2026-10-01 03:46:19 +00:00
useLocalize.ts
useLocalizedConfig.ts
useLocalStorage.tsx
useLocalStorageAlt.tsx
useNewConvo.ts 🎛️ refactor: Hand Chat Preferences to the Host and the Follow-Up Queue to Jotai (#16604) 2026-10-01 17:47:26 +02:00
usePersonalizationAccess.ts
useRenderChangeLog.ts
useResourcePermissions.ts
useRoleSelector.ts
useScrollFade.ts 🪶 style: Quieter Primitives, Shared Panel Headers, and Flat Management Lists (#16244) 2026-10-01 03:46:17 +00:00
useScrollToRef.ts ⏹️ fix: Cancel Stale Throttled Scroll Callbacks (#16167) 2026-09-21 21:43:10 -04:00
useTimeout.tsx
useTimeTick.ts
useToolFavorites.ts
useVirtualGrid.ts
useWakeLock.ts
useWeekStart.ts