Repository navigation
fix(shell): settings always keeps the sidebar visible and never becomes a project's start page - #1725
Conversation
…es a project's start page Settings pages could collapse the project sidebar, so a user who opened Diagnostics (a This computer page) had no visible way out except the collapsed toggle. Machine-scoped settings pages were also saved as the project's remembered route, so the project kept reopening on them. - Settings holds the sidebar open: the toggle is disabled there and Mod+B does nothing. The saved show/hide preference is not changed, so leaving Settings restores the sidebar the way the user had it. - A collapsed sidebar's toggle is drawn in the accent colour with a dot. - Machine-scoped settings routes (the "This computer" group) are never stored as a project's route or remembered as its last settings section. A stored one restores to /work. Correctness fix, no perf claim. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
|
Deployment failed for project ade with the following error: Learn More: https://vercel.com/arul28s-projects?upgradeToPro=build-rate-limit |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 19 minutes. View limit details
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 |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 720c72d5-4ce6-4d0b-99bb-79fdcdc7373e) |
…ings, where it does nothing Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: c31a0369-0027-4c27-a980-3cb74dbe3e39) |
Why
User-reported bug #1. On Settings › This computer › Diagnostics there was no visible way out: the project sidebar could be collapsed on Settings, and the only way back was the collapsed-sidebar toggle at the top-left, which nobody notices. Machine-scoped settings pages were also written as the project's remembered route (
ade:project-route:<bindingKey>), so the project reopened on Diagnostics.Correctness fix, no perf claim.
What changed
ProjectSidebar.tsxcomputeshidden = hiddenByPreference && !settingsActive; the saved show/hide preference is not written.ProjectSidebarToggle.tsxis disabled on Settings (aria-disabled, dimmed, tooltip "Settings keeps the sidebar open."), withlockedpassed fromAppShellthroughTopBar. Mod+B is a no-op on Settings (useProjectSidebarShortcuts.ts,sidebarLocked).data-collapsed="true", which sets its icon tovar(--color-accent)(index.css, next to theade-shell-controlghost rules), and renders a 6pxbg-accentdot at its top-right (absolute right-[3px] top-[3px] h-1.5 w-1.5 rounded-full). No animation, so no reduced-motion handling is needed.settingsManifest.tsgainssettingsTabForRoute(same precedence asSettingsPage: a#hashwins over?tab=; unknown falls back to the default tab) andisMachineScopedSettingsRoute(the tab is inisMachineSettingsTab). They are used by:projectRouteStorage.ts:writeStoredProjectRouteignores machine routes;readStoredProjectRouterestores a stored machine route to/workand rewrites it.App.tsxserializeStoredProjectRoute: returns null for machine routes, so the in-memoryroutesBySurfaceKeydoes not keep them either.AppShell.tsxserializeLocationRoute: returns null for machine routes (its own writer, keyed by the raw project root, which the cog reads).settingsReturnRoute.ts: the cog's in-session "last settings section" skips machine routes.ProjectSidebar.test.tsxcases stored or rememberedappearance/providers, both machine pages. They now usechat/secretsso they still test remembered-route behaviour.docs/features/onboarding-and-settings/README.md: new subsection "Settings holds the project sidebar open".Machine-scoped routes excluded (the
machinesgroup inSETTINGS_TABS,settingsManifest.ts): General (general), Appearance (appearance), Providers (agents), Apple devices (apple), Lanes (lanes-git), Integrations (integrations), Diagnostics (storage), Archive (archive).MACHINE_SETTINGS_TAB_IDSholds the same set. Account pages (Account, Chat, Notifications, MCP servers, Usage) and the Project page (Secrets) stay remembered, as before.Evidence
Correctness fix, no perf claim.
apps/desktop/src/renderer/components/app/projectRouteStorage.test.ts: "never remembers a machine-scoped settings page, and restores a stale one to the default".projectRouteStorage.tsreverted toorigin/main(the other parts of this PR applied):FAIL … expected '/settings?tab=chat#diagnostics' to be '/lanes'.PASS.cd apps/desktop && npx vitest runonprojectRouteStorage.test.ts,projectSidebar/ProjectSidebar.test.tsx,settings/settingsManifest.test.ts,TopBar.test.tsx,projectSidebar/useProjectSidebarShortcuts.test.tsx,AppShell.aiStatus.test.tsx,AppShell.laneRefresh.test.tsx: 7 files, 141 tests, all passed.npm --prefix apps/desktop run typecheck: exit 0.npx eslinton the 11 touched TS files: 0 errors, 5 warnings, all inTopBar.tsxin code this PR does not touch (unusedwindowId, fourreact-hooks/exhaustive-deps).Not checked
webMode) and remote project tabs are not exercised.🤖 Generated with Claude Code
Note
Low Risk
Renderer-only navigation and localStorage route-memory changes with targeted tests; no auth or data-layer impact.
Overview
Fixes a navigation trap on Settings → This computer pages by changing how the project sidebar and route memory behave on Settings.
Settings always shows the project sidebar without overwriting the user’s saved collapse preference: the sidebar is forced visible on
/settings, the top-bar toggle is disabled (with an explanatory tooltip), and Mod+B no longer hides it. When the sidebar is collapsed elsewhere, the toggle is highlighted with accent styling and a dot so it’s easier to spot.Machine-scoped settings routes are no longer remembered as a project’s restore target. New helpers in
settingsManifest(settingsTabForRoute,isMachineScopedSettingsRoute) classify “This computer” tabs; all project-route writers/readers skip or migrate those URLs to/work, while account/project settings sections (e.g. Chat, Secrets) still restore as before. Session “last settings section” for the cog follows the same rule.Tests cover storage behavior; onboarding/settings docs describe the new rules.
Reviewed by Cursor Bugbot for commit 519e113. Configure here.