Feature (desktop): qualify pinned sidebar rows with their project name
WIP β not ready for review. The code is complete and green, but it has not been verified in the running app yet (see Verification below). Opening early for direction on the presentation.
Closes #7574.
The problem
The PINNED section lifts a workspace out of its project group β that's the point β but it also strips the only thing that said which project the row belongs to. Every project's main workspace is named local, so two pinned mains render as two identical rows:
PINNED
π» π local β π» π Flamaster/local
π» π local β π» π Bifrost/basic_optimization
The 14px project avatar is meant to disambiguate them, but for projects without a custom icon it's a generated circle β not something you can tell apart at that size. The fix is to say it in words.
The change
This is how it looks like in the app:
pinnedContext already carried projectName next to projectIconUrl; only the icon was ever rendered. Now the name renders too, dimmed, as a path-style prefix.
WorkspaceNameMarquee gains an optional prefix. It renders inside the marquee's scrolling span, not beside it β so overflow measurement, the hover-scroll reveal and the title attribute all operate on the full Flamaster/local string rather than just the tail. The prefix span carries text-muted-foreground; as a declaration on a child it beats the row's inherited text-foreground/80 regardless of class order.
DashboardSidebarExpandedWorkspaceRow passes prefix only when pinnedContext is set, reusing the existing "Session" message for project-less workspaces. Rows inside a project group are untouched β their header already says the project. The other two WorkspaceNameMarquee call sites (v1 sidebar, v2 workspaces list) pass no prefix and render exactly as before.
The avatar stays: once you know which row is which, the colour is still a useful cue.
Collapsed rail is icon-only, so it needs no change.
Verification
- 5 new
WorkspaceNameMarqueetests, including that an absent or empty prefix renders byte-identically to today. bun run typecheck,bun run lintclean.bun run check:i18nreports 0 missing across all 17 locales andcompile --strictpasses β no new string,"Session"already existed in this file.
Not yet verified over CDP. This worktree has never been provisioned (no .env, no dev stack), so there was no renderer to attach to, and apps/desktop/AGENTS.md wants UI changes confirmed in the real app. That's the remaining work before this leaves draft: pin two same-named workspaces from different projects and capture before/after screenshots.
Summary by cubic
Fixes #7574 by showing the project name next to pinned workspace rows in the sidebar, so two same-named workspaces from different projects are no longer identical. The prefix renders inside the marquee, so the title and hover reveal cover the full label. Other WorkspaceNameMarquee call sites remain unchanged.
Summary by CodeRabbit
-
New Features
- Workspace names in the dashboard sidebar now display their associated project or session prefix, formatted as
prefix/name. - Prefixes are visually dimmed for clearer hierarchy.
- Full prefixed workspace labels are available as hover text when needed.
- Workspace names in the dashboard sidebar now display their associated project or session prefix, formatted as
-
Tests
- Added coverage for workspace names with and without prefixes, including empty-prefix handling and display styling.