From b831437de838e716b6e076bfcb272acbb432fc8d Mon Sep 17 00:00:00 2001 From: maria-rcks Date: Wed, 22 Jul 2026 18:32:02 -0400 Subject: [PATCH] Refresh web UI surfaces and dark-mode styling - Update sidebar, chat, settings, menus, and dialogs with refreshed styling - Improve backdrop SVG reuse and add regression coverage for unique IDs --- .agents/skills/add-dark-mode/SKILL.md | 79 ++++++ apps/web/src/components/AppSidebarLayout.tsx | 3 +- apps/web/src/components/BranchToolbar.tsx | 2 +- apps/web/src/components/ChatView.tsx | 34 +-- apps/web/src/components/CommandPalette.tsx | 2 +- apps/web/src/components/DiffPanel.tsx | 40 ++- apps/web/src/components/GitActionsControl.tsx | 18 +- .../src/components/ProjectScriptsControl.tsx | 8 +- apps/web/src/components/Sidebar.logic.test.ts | 22 +- apps/web/src/components/Sidebar.logic.ts | 13 +- apps/web/src/components/Sidebar.tsx | 26 +- .../components/SidebarStageBackdrop.test.tsx | 22 ++ .../src/components/SidebarStageBackdrop.tsx | 110 +++---- apps/web/src/components/SidebarV2.tsx | 188 +++++++----- .../src/components/chat/ChangedFilesTree.tsx | 2 +- apps/web/src/components/chat/ChatComposer.tsx | 14 +- .../chat/ComposerPrimaryActions.tsx | 14 +- .../components/chat/ContextWindowMeter.tsx | 17 +- .../components/chat/MessagesTimeline.test.tsx | 17 ++ .../src/components/chat/MessagesTimeline.tsx | 16 +- apps/web/src/components/chat/ModelListRow.tsx | 5 +- .../components/chat/ModelPickerContent.tsx | 11 +- .../components/chat/ModelPickerSidebar.tsx | 7 +- .../components/chat/ProviderStatusBanner.tsx | 2 +- apps/web/src/components/chat/TraitsPicker.tsx | 8 +- .../settings/ConnectionsSettings.tsx | 9 +- .../settings/ProviderInstanceCard.tsx | 18 +- .../settings/ProviderModelsSection.tsx | 2 +- .../settings/ProviderSettingsForm.tsx | 2 +- .../settings/SettingsSidebarNav.tsx | 11 +- .../settings/SourceControlSettings.tsx | 12 +- apps/web/src/components/settings/itemRows.ts | 4 +- .../components/settings/settingsLayout.tsx | 35 +-- .../src/components/sidebar/SidebarChrome.tsx | 4 +- apps/web/src/components/ui/button.tsx | 2 +- apps/web/src/components/ui/combobox.tsx | 14 +- apps/web/src/components/ui/command.tsx | 17 +- apps/web/src/components/ui/menu.tsx | 26 +- apps/web/src/components/ui/select.tsx | 29 +- apps/web/src/index.css | 268 ++++++++++++------ apps/web/src/routes/settings.tsx | 6 +- 41 files changed, 691 insertions(+), 448 deletions(-) create mode 100644 .agents/skills/add-dark-mode/SKILL.md create mode 100644 apps/web/src/components/SidebarStageBackdrop.test.tsx diff --git a/.agents/skills/add-dark-mode/SKILL.md b/.agents/skills/add-dark-mode/SKILL.md new file mode 100644 index 0000000000..25fb7c7bb0 --- /dev/null +++ b/.agents/skills/add-dark-mode/SKILL.md @@ -0,0 +1,79 @@ +--- +name: add-dark-mode +description: Add dark mode with colors, shadows, and surfaces handled the way a designer would. +--- + +# Add Dark Mode + +Use this when the user wants to add dark mode support to an existing UI. + +## Activation + +### Use For + +- adding dark mode to a page, section, component, or site +- improving an existing dark mode treatment +- converting a light-mode-only UI to support dark mode + +### Do Not Use For + +- brand-new design or layout work +- standalone image dark-mode conversion +- responsive behavior, component organization, or general visual polish without dark mode + +## Load First + +- No companion files are required. +- Dark-mode design guidance is inline below. + +## Progress Updates + +Keep the user informed so longer runs do not look stuck. + +- One-line status update before each major phase. +- Concrete and lightweight: what you are doing now, not verbose logs. + +## Workflow + +1. Inspect the existing UI and project Tailwind conventions. +2. Convert markup to include appropriate dark-mode classes. +3. Audit rasterized images for dark-mode variants. +4. For each rasterized image that needs a dark-mode variant, hand off to `dark-mode-image`, which MUST load and use the `imagegen` skill before creating or editing image assets. +5. Save generated dark-mode images alongside the originals and wire them into the dark-mode UI. + +## Dark Mode Rules + +### Design Rules + +- Dark mode is about maintaining the same contrast ratios as light mode, not simply inverting colors +- Dark mode doesn't need to preserve every detail of the light mode design — it just needs to look good +- Default dark mode to follow the operating system's `prefers-color-scheme` setting (Tailwind's built-in `dark:` behavior); only add a manual toggle when the user explicitly asks for one +- Remove all shadows in dark mode — use `dark:shadow-none` +- On dark-mode-only sites, add the `scheme-only-dark` class to `` or the top-level element — ensures native elements like scrollbars, form controls, and `color-scheme` render in dark mode + +### Component Rules + +- Never keep large branded/colored panels in dark mode; instead use the same background color and add a light divider between sections +- Style cards only slightly lighter than the page background (e.g. `dark:bg-gray-900` on a `dark:bg-gray-950` page); add a `dark:inset-ring dark:inset-ring-white/5` for definition +- Make decorative quote marks in testimonials very faint (e.g. `dark:text-white/5`) +- Never use multiple heading text colors in dark mode (e.g. dark gray + brand color); use a single light color like `white` or `gray-100` for all heading text + +### Raster Image Rules + +- When adding or improving dark mode, audit the page for rasterized images that need dark-mode versions: photos, screenshots, product mockups, decorative backgrounds, textures, and rasterized illustrations +- Never use CSS filters (`invert`, `brightness`, `contrast`, `opacity`) as the final dark-mode treatment for raster images; always create real dark-mode image files +- Generate dark-mode raster image variants with the `dark-mode-image` skill, which MUST load and use the `imagegen` skill before creating or editing any raster image assets + +### SVG Rules + +- For inline `` elements, style dark mode with Tailwind `dark:*` classes (e.g. `dark:fill-*`, `dark:stroke-*`, `dark:text-*`) +- For external SVG files referenced via ``, always create a dark-mode version alongside the original (e.g. `logo.svg` and `logo-dark.svg`); never substitute CSS filters (`invert`, `brightness`) or opacity adjustments for a true dark variant + +## Guardrails + +- Do not generate, edit, or replace raster image assets directly from this skill; `dark-mode-image` owns that work and MUST use the `imagegen` skill. +- Require the `dark-mode-image` + `imagegen` handoff even when the image change seems simple, decorative, or incidental. + +## Verify + +- Check light and dark modes for contrast, missing variants, and images that still assume a light background. diff --git a/apps/web/src/components/AppSidebarLayout.tsx b/apps/web/src/components/AppSidebarLayout.tsx index ef6b64be9c..3a70390d0c 100644 --- a/apps/web/src/components/AppSidebarLayout.tsx +++ b/apps/web/src/components/AppSidebarLayout.tsx @@ -106,6 +106,7 @@ export function AppSidebarLayout({ children }: { children: ReactNode }) { const pathname = useLocation({ select: (location) => location.pathname }); const isOnSettings = pathname === "/settings" || pathname.startsWith("/settings/"); const useSidebarV2 = sidebarV2Enabled && !isOnSettings; + const useSidebarV2Theme = useSidebarV2 || isOnSettings; const isMacosDesktop = isElectron && isMacPlatform(navigator.platform); const [sidebarWidth, setSidebarWidth] = useState(readInitialThreadSidebarWidth); const sidebarMaximumWidth = resolveThreadSidebarMaximumWidth(window.innerWidth); @@ -165,7 +166,7 @@ export function AppSidebarLayout({ children }: { children: ReactNode }) { side="left" collapsible="offcanvas" data-app-sidebar="" - data-sidebar-version={useSidebarV2 ? "v2" : "v1"} + data-sidebar-version={useSidebarV2Theme ? "v2" : "v1"} className="border-r border-sidebar-border bg-sidebar text-sidebar-foreground" resizable={{ maxWidth: sidebarMaximumWidth, diff --git a/apps/web/src/components/BranchToolbar.tsx b/apps/web/src/components/BranchToolbar.tsx index 0354c2e0cd..62c5e20da9 100644 --- a/apps/web/src/components/BranchToolbar.tsx +++ b/apps/web/src/components/BranchToolbar.tsx @@ -248,7 +248,7 @@ export const BranchToolbar = memo(function BranchToolbar({ if (!hasActiveThread || !activeProject) return null; return ( -
+
{isMobile ? ( status.instanceId === defaultInstanceId) ?? null; }, [activeProviderInstanceId, providerStatuses, selectedProvider]); + const hasTimelineTopBanner = + Boolean(threadError) || + (activeProviderStatus !== null && + activeProviderStatus.status !== "ready" && + activeProviderStatus.status !== "disabled"); const activeProjectCwd = activeProject?.workspaceRoot ?? null; const activeThreadWorktreePath = activeThread?.worktreePath ?? null; const activeWorkspaceRoot = activeThreadWorktreePath ?? activeProjectCwd ?? undefined; @@ -5199,7 +5204,7 @@ function ChatViewContent(props: ChatViewProps) {
- {/* Error banner */} - setThreadError(activeThread.id, null)} @@ -5245,6 +5248,10 @@ function ChatViewContent(props: ChatViewProps) {
{/* Chat column */}
+ {/* Provider status overlays the timeline without changing its content height. */} +
+ +
{/* Messages Wrapper */}
{/* Messages — LegendList handles virtualization and scrolling internally */} @@ -5281,6 +5288,7 @@ function ChatViewContent(props: ChatViewProps) { onIsAtEndChange={onIsAtEndChange} onManualNavigation={cancelTimelineLiveFollowForUserNavigation} hideEmptyPlaceholder={isDraftHeroState} + topFadeEnabled={!hasTimelineTopBanner} /> {/* scroll to end pill — shown when user has scrolled away from the live edge */} @@ -5313,17 +5321,6 @@ function ChatViewContent(props: ChatViewProps) { : "pointer-events-none absolute inset-x-0 bottom-0 z-20 pt-1.5 sm:pt-2" } > - {!isDraftHeroState ? ( -