fix(sidebar): hide branch tags by default - #987
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Sidebar session rows show branch and pull-request glyphs whose inputs are not consistently trustworthy across providers. Imported Codex sessions currently have no projected branch, Claude sessions may retain an earlier branch, and branch-only PR matching can associate an old closed PR with a reused branch. The resulting markers are inconsistent and can be misleading.
Solution
Add a persisted
sessionBranchTagsVisibleAtompreference that defaults tofalse, and gate both row rendering and PR-status refresh work on it. The existing indicator behavior remains available when the preference is enabled so a later settings control can toggle it without rebuilding the feature. When enabled, only the 30 most recent sidebar sessions contribute repositories to PR fetching, down from 60.Potential risks
Branch tags remain unavailable through the UI until the planned settings control is added; this is the requested default. Programmatic enabling still exposes the existing provider metadata and branch-to-PR association limitations, which this PR intentionally does not redesign. The new preference uses an isolated localStorage key with a safe false fallback for malformed values; rollback is a commit revert, and the unused key can remain harmlessly. No database, wire, IPC, dependency, or schema migration is included.
Verification
pnpm vitest run src/scaffold/NavigationSidebar/connectors/useSessionMenuItems/__tests__/menuItemBuilders.test.ts src/store/ui/__tests__/sidebarAtom.test.ts— passed: 23 tests across 2 filespnpm eslint src/store/ui/sidebarAtom.ts src/store/ui/__tests__/sidebarAtom.test.ts src/scaffold/NavigationSidebar/connectors/useSessionMenuItems/index.tsx src/scaffold/NavigationSidebar/connectors/useSessionMenuItems/menuItemBuilders.tsx src/scaffold/NavigationSidebar/connectors/useSessionMenuItems/useSessionPrStatuses.ts src/scaffold/NavigationSidebar/connectors/useSessionMenuItems/__tests__/menuItemBuilders.test.ts --max-warnings 0 --report-unused-disable-directives— passedpnpm run typecheck— passedpnpm run check:circular— passed; no circular dependencies across 6566 modulesgit diff --check origin/develop...HEAD— passedPerformance audit
Performance verdict: pass