LibreChat/client/src/hooks
Marco Beretta 71398aef62
🔒 fix: Guard 2FA Deep-Link Redirects Against Blocked Session Storage (#16439)
* 🔒 fix: Guard 2FA Deep-Link Redirects Against Blocked Session Storage

The post-login redirect store was the one session-storage consumer in the
client that reached for it bare-handed: a context where storage access
throws crashed the login screen's persist effect and the post-challenge
boot instead of dropping the destination. Route every access through
throwing-safe helpers so a blocked store costs the deep link, never the
sign-in, and pin the ordinary 2FA challenge's deep-link survival and
consumption with mock-harness scenarios plus blocked-storage unit tests.
The challenge screen's code inputs also gain accessible names.

* ♿ fix: Name the 2FA Verify Button by Its Visible Text

The challenge submit button carried aria-label 'Continue' over the visible
text 'Verify', so its accessible name did not contain the visible label
(WCAG 2.5.3). The visible text names the button on its own; the label is
dropped.

* 🧪 test: Keep the 2FA Mock Harness From Re-Declaring Destinations

The shell's authenticated queries 401 against the real backend under the
stand-in bearer, and the auth-recovery login bounce carries the current URL
as redirect_to, re-persisting the deep link mid-test. Answer those queries
empty and leave /api/config real.

* 🧪 test: Answer the Shell's Empty Shapes in the 2FA Deep-Link Harness

The composer and its selectors iterate their query results, so the stand-in
session's shell queries need per-endpoint empty payloads rather than a
blank object; the destination's marker rides the query string so no
conversation has to exist for the landing to hold; and the second sign-in
declares its own destination, which is the deterministic form of
consumption-across-sign-ins.

* 🧪 test: Assert the 2FA Shell Across Viewports

The account button hides in the mobile drawer and the drawer never
satisfies a pointer click's stability check, so the shell assertion polls
for whichever marker the viewport shows and the session ends through an
in-page logout request, which the route mocks can actually see.

* 🧪 test: Locate the Login Password Field by Label

* 🧪 test: Let the CI Storage Polyfill Replace the Blocked Store

The CI-mode build ships a storage polyfill that answers a broken
sessionStorage by installing its own in-memory shim with
defineProperty, which crashed against a non-configurable blocker and
took the app boot with it. The blocker stays configurable: the shim is
per-document, so the challenge's document swap still empties it and the
landing contract is the same either way.
2026-09-28 16:25:58 +02:00
..
__tests__ ⏹️ fix: Cancel Stale Throttled Scroll Callbacks (#16167) 2026-09-21 21:43:10 -04:00
Agents 🧲 feat: Attach or Leave a Workspace on a Saved Chat (#16124) 2026-09-25 10:08:28 -04:00
Artifacts 📠 fix: Preview SVG Artifacts From Their Edited Source (#16123) 2026-09-20 21:30:06 -04:00
Assistants 🧼 fix: Clear Model Spec Fields on Configured Selections (#15544) 2026-09-03 09:46:15 -04:00
Audio 🔊 fix: Autoplay Latest Message for Browser TTS and short responses (#15347) 2026-08-30 06:54:16 -04:00
Chat 📏 fix: Keep the Context Gauge's Used Count Above Its Own Breakdown (#16368) 2026-09-27 09:12:26 -04:00
Config 🛋️ perf: Discover MCP Tools Only When Needed (#16190) 2026-09-22 05:35:14 -04:00
Conversations 🔎 feat: Filter and Sort the Sidebar Chats List (#15842) 2026-09-12 15:56:10 -04:00
Endpoint 🖼️ refactor: Consolidate Provider Icons Into a Single Registry (#15148) 2026-08-24 13:00:38 -04:00
Files 🌞 feat: Add GPT-6 Sol and Luna Support (#16221) 2026-09-22 22:37:08 -04:00
Generic 📜 style: Scroll the Sidebar as One Surface (#15914) 2026-09-14 16:06:59 +02:00
Input 📝 fix: Preserve Chat Drafts Across Navigation and Clearing (#16161) 2026-09-21 12:56:41 -04:00
MCP 🚚 chore: Point Repository and Image References at LibreChat-AI (#16005) 2026-09-23 23:08:36 -04:00
Mermaid ♿ feat: High Contrast Light and Dark Appearance Modes (#15178) 2026-09-05 22:20:33 +02:00
Messages 🎈 fix: Fill Reasoning Previews Before Throttling (#16178) 2026-09-21 21:43:23 -04:00
Nav 🌁 fix: Stop Painting the Closed Mobile Drawer (#16127) 2026-09-20 21:37:55 -04:00
Plugins 🕸️ feat: Complete Keenable Web Search Provider (#15288) 2026-08-27 14:29:20 -04:00
Prompts
Roles
Sharing 🩻 feat(insights): Scope Insights to Authorized Agents (#15549) 2026-09-04 20:16:58 -04:00
Skills 🎛 refactor: Replace Agent Skills Toggles With a Three-Way Mode Control (#15520) 2026-09-06 03:32:56 +02:00
SSE 🧗 fix: Keep Manual Compactions on the Active Branch (#16386) 2026-09-26 06:55:16 -04:00
ApiErrorBoundaryContext.tsx
AuthContext.tsx 🔒 fix: Guard 2FA Deep-Link Redirects Against Blocked Session Storage (#16439) 2026-09-28 16:25:58 +02:00
index.ts 🎨 feat: Theme-Adaptive SVG Support for Custom MCP and Group Icons (#13817) 2026-09-04 10:49:43 -04:00
ScreenshotContext.tsx ♿ feat: High Contrast Light and Dark Appearance Modes (#15178) 2026-09-05 22:20:33 +02:00
useAdaptiveIcon.ts 🎨 feat: Theme-Adaptive SVG Support for Custom MCP and Group Icons (#13817) 2026-09-04 10:49:43 -04:00
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
useFavorites.ts 📌 feat: Unified Pinned Section With Sidebar Drag Interactions (#15057) 2026-09-11 10:41:05 -04:00
useFocusTrap.ts 🧵 refactor: Give the Subagent Panel One Composer and Main Chat's Metrics (#15436) 2026-08-31 21:46:58 -04:00
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
useInfiniteScroll.ts
useIsActiveItem.ts
useKeyboardShortcuts.spec.tsx 🧰 feat: Unify Tool Activity, Reasoning, Search, and Agent Workflows (#14546) 2026-09-06 14:56:50 -04:00
useKeyboardShortcuts.ts 🚚 feat: Route Attachments and Provision Tools Lazily (#15763) 2026-09-08 23:28:52 -04:00
useLocalize.ts
useLocalizedConfig.ts
useLocalStorage.tsx
useLocalStorageAlt.tsx
useNewConvo.ts 🖋️ feat: Seal Code Environment Choices Per Conversation (#15868) 2026-09-12 20:45:00 -04:00
usePersonalizationAccess.ts
useRenderChangeLog.ts
useResourcePermissions.ts
useRoleSelector.ts
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