Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (13)
🚧 Files skipped from review as they are similar to previous changes (13)
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughAdds a persisted workspace-name wrapping preference. Appearance settings expose the preference. Dashboard sidebar rows wrap long workspace names and preserve layout for statistics and actions. ChangesWorkspace Name Wrapping
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This adds an opt-in workspace-name wrapping preference while preserving the existing default behavior and updates appearance-setting visibility for variants. No actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant SidebarWorkspaceNamesSection
participant SidebarPreferencesStore
participant DashboardSidebarExpandedWorkspaceRow
participant DashboardSidebarWorkspaceDiffStats
SidebarWorkspaceNamesSection->>SidebarPreferencesStore: Update wrapWorkspaceNames
SidebarPreferencesStore-->>DashboardSidebarExpandedWorkspaceRow: Provide wrapping preference
DashboardSidebarExpandedWorkspaceRow->>DashboardSidebarWorkspaceDiffStats: Pass keepLayoutOnHover
DashboardSidebarExpandedWorkspaceRow-->>DashboardSidebarWorkspaceDiffStats: Render wrapped row layout
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/desktop/src/renderer/stores/sidebar-preferences/store.ts`:
- Around line 20-22: Document the sidebar-preferences persist configuration with
its fixed-size bound, deletion owner or path, and behavior when the feature is
removed. When removing the writer, also add the storage key to DEAD_KEYS in the
same change, using the existing lifecycle-documentation conventions.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 637861a3-5dda-4149-b191-3320f718e0ff
📒 Files selected for processing (10)
apps/desktop/src/renderer/lib/persisted-keys/persisted-key-registry.test-data.tsapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/components/DashboardSidebarExpandedWorkspaceRow/DashboardSidebarExpandedWorkspaceRow.tsxapps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/components/DashboardSidebarWorkspaceDiffStats/DashboardSidebarWorkspaceDiffStats.tsxapps/desktop/src/renderer/routes/_authenticated/settings/appearance/components/AppearanceSettings/AppearanceSettings.tsxapps/desktop/src/renderer/routes/_authenticated/settings/appearance/components/AppearanceSettings/components/SidebarWorkspaceNamesSection/SidebarWorkspaceNamesSection.tsxapps/desktop/src/renderer/routes/_authenticated/settings/appearance/components/AppearanceSettings/components/SidebarWorkspaceNamesSection/index.tsapps/desktop/src/renderer/routes/_authenticated/settings/utils/settings-search/settings-search.tsapps/desktop/src/renderer/stores/index.tsapps/desktop/src/renderer/stores/sidebar-preferences/index.tsapps/desktop/src/renderer/stores/sidebar-preferences/store.ts
Long workspace names in the dashboard sidebar were always ellipsized with no way to see them in full without hovering. Adds an opt-in Appearance setting (off by default) that wraps them across lines instead. Wrapping only pays off if the row geometry stays put, so the wrap branch also keeps the trailing meta column stable: diff stats and the hover actions stay in layout and swap `visibility`, and the column gets a minimum track width so it no longer resizes as those come and go. The truncating default path is unchanged. Co-Authored-By: Claude <[email protected]>
f2c06d8 to
84aceff
Compare
Answers the three questions apps/desktop/AGENTS.md requires for any renderer localStorage writer — bound, deletion path, and behavior when the feature is removed — at the persist config itself. Co-Authored-By: Claude <[email protected]>
There was a problem hiding this comment.
Review completed against the latest diff
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
…s page The Appearance page was the only settings page that never consulted the v1/v2 variant registry: it passed search matches straight through (and `null` when the search box was empty), so every section rendered in both UIs. The new wrap setting is registered `v2` but the v2 dashboard sidebar is the only place it does anything, so a v1 user could toggle it and see nothing happen. Switch the page to `getVisibleItemsForSection` like every sibling page. Typography was mismarked while we were here. `getFontSettings` drives the v1 terminal, code editor, and light diff viewer under `screens/main` as well as the v2 panes, so the two typography items are `shared`, not `v2` — filtering the page without this would have hidden controls that still apply in v1. Their descriptions no longer claim to be V2-only either. Co-Authored-By: Claude <[email protected]>
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
any chance you would want to add this behavior instead of the wrapping behavior? Screen.Recording.2026-08-20.at.12.34.16.PM.mov |
@AviPeltz Interesting - but in my case, my motivation for wrapping was so I can more easily tell at a glance what's what - I want to be able to look at a dozen open workspaces and see all the workspace titles. A solution that requires me to hover over each one in turn, and wait for the ticker to scroll in order to read the full title, wouldn't address the motivating problem for me any better than the existing hover card does. |
|
This PR has had no activity for 53 days and will close in 7 days unless there is new activity. If this contribution is still important or relevant, please leave a comment to keep it open. If it closes, you are welcome to reopen it or ask a maintainer to reopen it. Thank you for contributing! |
What & why
Long workspace names in the dashboard sidebar are always truncated with an ellipsis, and there's no way to see them in full short of hovering for the hover card. This adds an opt-in Appearance → Wrap workspace names setting that wraps them onto multiple lines instead. Off by default, so nothing changes unless you turn it on.
Implementation notes:
sidebar-preferences, registered in the persisted-key allowlist) rather thanlocal-db, matchingmarkdown-preferences— it's a renderer-only appearance toggle, so this avoids a schema migration. Fixed-size singleton, so it's bounded by construction; the lifecycle (bound / deletion path /DEAD_KEYSon feature removal) is documented at thepersistconfig perapps/desktop/AGENTS.md.appearance-sidebar-workspace-names,v2) so it's findable by searching "wrap", "truncate", "long names", etc.truncate→min-w-0 break-wordson the name, and the row switches toitems-startso the icon and row actions align with the first line instead of the vertical middle of a multi-line name.break-wordsalso breaks unbroken strings, so a long branch-style name can't overflow the sidebar.autotrack sized by its widest child: diff stats only render for the active row and the actions only on hover, so that track — and therefore the wrapped name's width — used to change as they came and went, rewrapping the text mid-interaction. Under wrapping, both children stay in layout and swapvisibility, and the track gets aminmax(3.5rem, auto)floor that fits either one. Cost is ~14px of name width; an unusually large diff count can still widen the track, but no longer differently per hover/active state.While wiring the setting up it turned out the
v2marking wasn't doing anything, which pulled in two related fixes:appearance/page.tsxnow applies v1/v2 variant filtering. It was the only settings page that didn't: it passed search matches through directly (andnullon an empty query), so every section rendered in both UIs regardless of variant. It now usesgetVisibleItemsForSection({ section, searchQuery, isV2 })likebehavior,experimental,terminal,links, andgit. Without this, a v1 user could toggle this setting and see nothing happen.shared. They were markedv2, butgetFontSettingsdrivesscreens/main/…/Terminal.tsx,…/CodeEditor.tsx, and…/LightDiffViewer.tsx— all v1 surfaces — as well as the v2 panes. Filtering the page while leaving themv2would have hidden font controls that still affect the v1 UI. Their descriptions no longer claim to be V2-only either.How I tested it
Drove the dev desktop app over CDP using real clicks and keystrokes — dev sign-in, add project, New Workspace with a long name, Settings → Appearance → toggle, back to the dashboard. Target identity was confirmed against
Superset (workspace-name-wrap-optio).appon this workspace'sDESKTOP_VITE_PORTbefore testing, since other worktrees' apps were live. Screenshots above are from that session.Measured geometry rather than eyeballing it:
Off:
white-space: nowrap,text-overflow: ellipsis, 324px of text in a 206px box → clipped, 1 line, row 32px.On:
white-space: normal,text-overflow: clip,scrollWidth == clientWidth→ not clipped, 2 lines, row 45px. Applies live with no reload, persists across the settings round-trip, and returns to truncation when switched back off.Unbroken name: renamed a row in place to
refactor/DashboardSidebarExpandedWorkspaceRowTruncationHandling→ wraps to 3 lines, nothing overflows the sidebar edge.Stability sweep on one row, wrap on — active/idle, active/hover, inactive/idle, inactive/hover: name width 203px, 3 lines, row height 61px, meta column 56px in all four. Only
visibilitychanges. Both reflow bugs this guards against were caught in review before landing, so they're regression-prone.Appearance page in v2 after the variant-filtering change — Theme, Custom themes, Markdown style, Wrap workspace names, Typography and Live surfaces all still render:
4 new tests in
settings-search.test.tslock the variant behaviour in: the wrap item is v2-only (including in v1 search results), while theme / markdown / custom themes / typography stay visible in both variants.Gates:
bun run lint(exit 0),bun run typecheck(37/37),bun run test(15/15 tasks, 0 fail; desktop package alone 2555 pass).Not verified: the v1 render itself. The variant filtering is covered by the tests above, but I didn't flip a running app into the legacy v1 UI to look at it.
Authorship
Written by Claude (Claude Code, Opus 5) running in a Superset workspace, prompted and reviewed by @aiwebb. Claude wrote the code, ran the gates, drove the CDP verification, and captured the screenshots. @aiwebb specified the feature, caught two layout regressions during manual review that the first pass missed (the name rewrapping on hover, then again between active and inactive rows), and confirmed the final behaviour. The commits carry a
Co-Authored-By: Claudetrailer.Checklist
type(scope): subject)bun run lintandbun run typecheckpass (CI fails on lint warnings too)Summary by CodeRabbit
New Features
Bug Fixes