LibreChat/client/src
Marco Beretta c821638e3d
🌓 refactor: Scrim OGDialog With the Overlay Theme Role (#16068)
* 🌓 refactor: Scrim OGDialog With the Overlay Theme Role

OGDialog scrimmed with a literal bg-black/80, so a theme that redefined
surface-overlay moved the Dialog and AlertDialog families and left every
OGDialog black. The scrim now paints bg-surface-overlay/80: the opacity
is unchanged, so the themes whose overlay resolves to black (dark, and
both high-contrast modes) render the same rgba as before, and the light
theme gets the gray scrim it defines, at 4.3:1 against the dialog it
frames.

Follow-up from the review of #15798, tracked as berry-13/LibreChat#14.

* 🧪 test: Carry the Scenario Theme Mode in the URL

The black-overlay scenario switched modes by writing `color-theme` and
reloading, but the init script that seeds the mode stays registered for
the life of the page and rewrote it on every load, so the high-contrast
iterations re-read the first mode and never matched their `<html>`
classes. The mode now rides in the URL and the init script copies
whatever the current navigation asks for.

* 🧪 test: Read the Scrim of the Frontmost Open Dialog

The scrim helpers resolved the dialog with `querySelector`, which takes
the first match in document order. Nothing in the suite is affected —
the settings modal is Headless UI and carries no `data-state`, so the
stacked scenario already measured the account confirmation — but a
scenario that opened an OGDialog from inside another one would have
silently read the outer dialog's scrim. The helpers now resolve the
frontmost open dialog by z-index and read its sibling scrim, and the
color and both sample points come back from one pass over the DOM.

* 🗂️ fix: Let the SharePoint Picker Take the App's Scrim

The picker rendered an OGDialogOverlay of its own beside the
OGDialogContent that portals one anyway. Both sat at depth 1, so both
resolved to z-index 130, and the primitive's overlay — mounted second —
painted over the picker's, so the lighter black it asked for never
reached the screen. The dialog is opaque, so it needs no backdrop of
its own: the extra overlay and its literal are gone and the picker
scrims with the theme's overlay role, exactly once, like every other
OGDialog.

* 🧪 test: Compare the Picker's Scrim to the Primitive's Own

The picker spec pinned the scrim's utility classes, which says nothing
a reader of the app would recognise and would break the next time the
primitive's opacity moves. It now renders a bare OGDialog beside it and
asserts the picker's single scrim is the same layer the app paints.
2026-09-19 08:58:30 -04:00
..
@types
__tests__ ♿ feat: High Contrast Light and Dark Appearance Modes (#15178) 2026-09-05 22:20:33 +02:00
a11y
common 📖 Load Repository Instructions for Attached Workspaces (#16008) 2026-09-16 09:00:35 -04:00
components 🌓 refactor: Scrim OGDialog With the Overlay Theme Role (#16068) 2026-09-19 08:58:30 -04:00
constants
data-provider ⛓️ fix: Bind Programmatic Bash to Selected Workspaces (#15992) 2026-09-16 07:46:16 -04:00
hooks 📱 fix: Open Sign-In and External Links From iOS Home-Screen Apps (#16077) 2026-09-19 08:09:25 -04:00
lib/rum 🔭 feat: Tag Browser Diagnostics With Client Build IDs (#15656) 2026-09-06 12:47:34 -04:00
locales 🌐 fix(locales): correct English setting descriptions (#16023) 2026-09-16 23:03:16 +02:00
polyfills
Providers 🪶 perf: Cut the Mount Cost of Finished Agent Messages (#16057) 2026-09-18 16:19:19 -04:00
routes 🛂 fix: Back Off MCP OAuth Discovery (#15783) 2026-09-09 22:21:34 -04:00
store 🫴 fix: Preserve Queued Follow-Ups Through Handoff (#15942) 2026-09-14 21:04:08 -04:00
utils 📱 fix: Open Sign-In and External Links From iOS Home-Screen Apps (#16077) 2026-09-19 08:09:25 -04:00
App.jsx
main.jsx
mobile.css 🧽 style: Composer, Welcome Screen and Context Panel Polish (#15838) 2026-09-11 21:23:17 -04:00
style.css 💠 fix: Paint Native Tool Verification Badges (#15862) 2026-09-12 16:03:03 -04:00
vite-env.d.ts 🧶 feat: Flatten Active Message Threads Behind a Flag (#15633) 2026-09-06 14:30:50 -04:00