Skip to content
Source
Sign inSign up
pingdotgg/t3code

Refine light-mode sidebar surfaces #4268

Mergedjuliusmarmingemerged 25 commits intomain fromrefs/pull/4268/headmerged by juliusmarminge View on GitHub

juliusmarmingecommented

Summary

  • Refine light-mode sidebar surfaces with clearer rail, card, selection, and hover treatments.
  • Improve contrast for sidebar text, controls, project filters, settled-thread indicators, and separators.
  • Preserve the existing dark-mode appearance while simplifying settled-thread reset handling.

Testing

  • Not run.

Note

Medium Risk Touches primary navigation (mobile home/sidebar and web sidebar v2) and list filtering across v1/v2 code paths; behavior is mostly UI but incorrect scoping or header menu staleness would confuse users.

Overview Mobile moves project scoping from inline chips into the home header filter menu (Android + iOS), wires that selection through HomeRouteScreen / HomeScreen, and applies it to both the legacy grouped list and Thread List v2. When Thread List v2 is on, sort/group controls are hidden because the list ignores them; the filter “customized” state only reflects environment and project. The iPad navigation sidebar gains the same v2 flat list (pending tasks, settle/unsettle, paged settled tail) and project filter behavior as home. Thread List v2 rows shift to flat edge-to-edge styling on phone, sidebar-style rounded rows on iPad, optional environment labels on multi-connection setups, and compact swipe actions for slim rows. NativeStackScreenOptions adds optionsVersion so native header menus refresh when async filter data loads.

Web refines Sidebar v2: shared row hover/selection tokens, rich hover tooltips (project, env, branch, model, errors), project filter as a dropdown instead of horizontal chips, and aligned status colors with mobile. Command palette assigns thread.jump.1–9 to the first nine visible project actions and executes them from the search input. Sidebar chrome, command dialog, composer, and related components get light/dark surface and contrast tweaks (sidebar-row-*, inset rings in dark mode, data-sidebar-version on the app sidebar).

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 89830a09822c49af2c1478ee94bfba7bf63a90e1. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Refine light-mode sidebar surfaces with zinc-based tokens and sidebar-specific color roles

  • Overhauls the light/dark palette in index.css to use zinc-based background tokens and introduces explicit sidebar role variables (--color-sidebar*, --color-surface-raised, sidebar row hover/active/selected colors).
  • Updates sidebar UI components (SidebarV2, AppSidebarLayout, SidebarChrome, SettingsSidebarNav, sidebar.tsx) to consume the new sidebar-scoped tokens for hover, active, and selected states instead of generic accent tokens.
  • Adds a rich hover tooltip (SidebarV2ThreadTooltip) to thread rows showing project, environment, branch, model, and last error details; replaces inline error text and separate chip tooltips.
  • Replaces the horizontal project chip scroller in SidebarV2 with a dropdown radio menu for project filtering.
  • Removes the chat composer glass box-shadow and makes the lower composer chrome opaque when the terminal drawer is open (via a data-terminal-open attribute and CSS rule).
  • Behavioral Change: sidebar separators, menu button hover backgrounds, submenu active states, and badge colors all change visually due to token migration.
Macroscope summarized 89830a0.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro

      Run ID: d68af14d-e868-43be-917b-f7d5fe705cad

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Commit unit tests in branch `t3code/fix-lightmode-sidebar`

      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Needs human review

      1 blocking correctness issue found. This PR combines significant feature additions (project filtering, Thread List V2 sidebar support, command palette shortcuts) with styling refinements. Three unresolved medium-severity issues remain: keyboard focus visibility, CSS tokens not applying in mobile portals, and jump shortcuts mismatching filtered order.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟡 Medium

      https://github.com/pingdotgg/t3code/blob/ddc8c7182a1121b48b12a7717d11dea1cd902074/apps/mobile/src/features/home/HomeHeader.tsx#L52

      When a project filter is selected but no environment filter is set (and Thread List v2 is disabled), hasCustomListOptions stays false, so the filter icon does not show its customized state even though the list is actively filtered by project. hasCustomHomeListOptions checks selectedEnvironmentId but never checks the newly added selectedProjectKey, so a project-only selection is invisible in the icon. Add a selectedProjectKey !== null check to hasCustomHomeListOptions.

      ✅ Resolved in c01c239744ffc22b1ab3db3ab6c355802d343fd7

    5. apps/mobile/src/features/home/HomeHeader.tsx line 85Resolvedby juliusmarminge
      apps/mobile/src/features/home/HomeScreen.tsx line 337Resolvedby juliusmarminge
    6. @@ -312,10 +315,16 @@
      312315 [openPrLink, pr],
      313316 );
      314317
      315- const rowClassName = cn(
      316- "group/v2-row relative w-full cursor-pointer select-none rounded-md text-left",
      318+ // All Sidebar V2 rows share one surface model. Live threads used to look
      319+ // like elevated cards while settled threads were plain rows, leaving neither
      320+ // a useful hierarchy nor a reliable hover cue. Status now lives in the row
      321+ // content; surface is reserved for interaction (hover, multi-select, route).
      322+ const rowSurfaceClassName = cn(
      323+ "group/v2-row relative w-full cursor-pointer select-none overflow-hidden rounded-md text-left outline-none transition-[background-color,color,box-shadow] duration-150",
      317324 props.isActive
      318- ? "bg-foreground/[0.11] text-foreground dark:bg-white/[0.11]"
      325+ ? "bg-accent text-foreground before:absolute before:inset-y-1.5 before:left-0 before:w-1 before:rounded-r-full before:bg-primary"
      319326 : isSelected
      320- ? "bg-foreground/[0.07] text-foreground dark:bg-white/[0.07]"
      321- : "hover:bg-accent/65",
      327+ ? "bg-muted text-foreground"
      328+ : shouldRecede
      329+ ? "text-muted-foreground/75 hover:bg-muted hover:text-foreground"
      330+ : "bg-transparent text-foreground hover:bg-muted",

      Thread rows hide keyboard focus

      Medium Severity

      The rowSurfaceClassName applies outline-none to focusable sidebar rows, removing the visual focus indicator for keyboard users. This impacts both slim and card rows, as no focus-visible styling is present to compensate.

      Fix in Cursor Fix in Web
      Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 10f29ef8fc7c83df7892f02d0c34a6a6c6c3c8f9. Configure [here](https://www.cursor.com/dashboard/bugbot).
    7. apps/web/src/components/SidebarV2.tsx line 194Resolvedby juliusmarminge
    8. @@ -484,20 +501 @@
      484- --input: oklch(0.62 0.03 265 / 28%);
      485- --sidebar-stage-fade: var(--card);
      486- background-color: var(--card);
      487-}
      488-
      489-.dark .app-sidebar {
      490- --background: #000;
      491- --foreground: #f1f3f7;
      492- --card: #000;
      493- --card-foreground: var(--foreground);
      494- --accent: #191a1d;
      495- --accent-foreground: #f7f9ff;
      496- --muted: #0a0a0a;
      497- --muted-foreground: #a3a3a3;
      498- --border: rgb(255 255 255 / 14%);
      499- --input: rgb(255 255 255 / 18%);
      500- /* The stage-channel header art must ramp to THIS panel's surface, not the
      501- global chrome background, or the fade shows a seam (same rule as the
      502- light palette above). */
      503- --sidebar-stage-fade: var(--card);
      501+[data-sidebar-version="v2"] {
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟡 Medium src/index.css:501

      The Sidebar V2 token overrides on [data-sidebar-version="v2"] never apply on mobile because Sheet/Dialog.Root receives the data-sidebar-version attribute but SheetPopup is rendered through a portal that does not inherit it. The portaled popup falls back to the root sidebar tokens (--sidebar: var(--card), etc.), so V2 row colors, borders, and surfaces are lost on mobile. Apply data-sidebar-version="v2" (or the token overrides) to the portaled popup or an ancestor inside the portal.

      🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
      In file @apps/web/src/index.css around line 501:
      
      The Sidebar V2 token overrides on `[data-sidebar-version="v2"]` never apply on mobile because `Sheet`/`Dialog.Root` receives the `data-sidebar-version` attribute but `SheetPopup` is rendered through a portal that does not inherit it. The portaled popup falls back to the root sidebar tokens (`--sidebar: var(--card)`, etc.), so V2 row colors, borders, and surfaces are lost on mobile. Apply `data-sidebar-version="v2"` (or the token overrides) to the portaled popup or an ancestor inside the portal.
    9. @@ -52,3 +56,15 @@
      5256 readonly initialQuery?: string;
      5357 }
      5458
      59+export function enumerateCommandPaletteItems(
      60+ items: ReadonlyArray<CommandPaletteActionItem>,
      61+): CommandPaletteActionItem[] {
      62+ return items.map((item, index) => {
      63+ const shortcutCommand = THREAD_JUMP_KEYBINDING_COMMANDS[index];
      64+ if (shortcutCommand) return { ...item, shortcutCommand };
      65+
      66+ const { shortcutCommand: _shortcutCommand, ...itemWithoutShortcut } = item;
      67+ return itemWithoutShortcut;
      68+ });
      69+}
      70+
      cursor[bot](GitHub profile, opens in a new tab)commented

      Jump keys ignore filtered order

      Medium Severity

      enumerateCommandPaletteItems binds thread.jump.1–9 from the original project list index, but filterCommandPaletteGroups re-sorts and drops rows when the palette query is non-empty. Visible row order and shortcut badges no longer match, and handleKeyDown still resolves jumps by the stale shortcutCommand on each item.

      Additional Locations (1)
      Fix in Cursor Fix in Web
      Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 4168fec04386cdbfb97e2ff779ac0b179c2eac1d. Configure [here](https://www.cursor.com/dashboard/bugbot).
    10. Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

      There are 3 total unresolved issues (including 2 from previous reviews).

      Fix All in Cursor Bugbot Autofix is [ON](https://www.cursor.com/dashboard/bugbot), but a cloud agent failed to start. Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 89830a09822c49af2c1478ee94bfba7bf63a90e1. Configure [here](https://www.cursor.com/dashboard/bugbot).
      @@ -413,13 +421,14 @@
      421+ width: circleSize,
      413422 },
      414423 iconStyle,
      415424 ]}
      416425 >
      417- <SymbolView
      418- name={props.icon}
      419- size={ACTION_ICON_SIZE}
      420- tintColor="#ffffff"
      421- type="monochrome"
      422- />
      426+ <SymbolView name={props.icon} size={iconSize} tintColor="#ffffff" type="monochrome" />
      423427 </Animated.View>
      424428 </View>
      425- <Animated.View style={[{ paddingTop: 2 }, labelStyle]}>
      429+ <Animated.View
      430+ style={[
      431+ { height: 14, justifyContent: "center", paddingTop: props.compact ? 0 : 2 },
      432+ labelStyle,
      433+ ]}
      434+ >

      Swipe label clipped non-compact

      Low Severity

      SwipeActionButton now fixes the label wrapper at 14px tall for every mode, but non-compact actions still apply 2px top padding while the label uses 14px line height. That leaves only 12px for the text, so action captions like Delete or Un-settle can clip on card rows and other non-compact swipe surfaces.

      Fix in Cursor Fix in Web
      Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 89830a09822c49af2c1478ee94bfba7bf63a90e1. Configure [here](https://www.cursor.com/dashboard/bugbot).
    11. juliusmarminge merged this593289c

    12. juliusmarminge closed this

Sign in to join this conversation.