open-swe/ui/src/components
Johannes du Plessis 30d5d55f0f
feat: add dark mode support to web UI (#1436)
* feat: add dark mode support to web UI

Add a persisted, system-aware theme with a Light/Dark/System toggle in
the sidebar user menu. An inline head script applies the stored theme
before paint to avoid a flash, and the agents-ui surface gets dark
overrides for its --ui-* variables.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>

* fix: use static theme init script to satisfy CodeQL

Build the no-FOUC theme script from a fully static string literal
instead of interpolating THEME_STORAGE_KEY, so no value flows into
code construction (CodeQL "Improper code sanitization").

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>

* fix: avoid theme flip on hydration for persisted preferences

Only apply a theme after the stored preference is read, instead of
eagerly applying the default "system" theme on first effect. This
prevented a brief flip to the OS theme (then back) on load for users
with a saved preference that differs from their OS setting.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-06-06 12:06:31 -07:00
..
agents feat: support dashboard chat images (#1435) 2026-06-06 11:50:24 -07:00
ui feat: restructure Open SWE Review tab + wire create_prs (#1319) 2026-05-21 09:17:07 -07:00
AppShell.tsx fix: make dashboard UI mobile-friendly (#1416) 2026-06-04 22:24:25 +00:00
AppSidebar.tsx feat: cache usage stats and add reviewer metrics (#1432) 2026-06-05 14:33:22 -07:00
ReviewStylesPanel.tsx fix: review style prompts UX, stale runs, and OAuth refresh (#1321) 2026-05-21 17:44:04 +00:00
sidebar-layout.tsx feat: animate mobile sidebar opening (#1421) 2026-06-04 19:14:00 -07:00
SidebarUserMenu.tsx feat: add dark mode support to web UI (#1436) 2026-06-06 12:06:31 -07:00