Skip to content

fix(sidebar): hide branch tags by default - #987

Merged
sudomaggie merged 1 commit into
developfrom
dev/hide-sidebar-branch-tags
Aug 26, 2026
Merged

fix(sidebar): hide branch tags by default#987
sudomaggie merged 1 commit into
developfrom
dev/hide-sidebar-branch-tags

Conversation

@Harry19081

Copy link
Copy Markdown
Member

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 sessionBranchTagsVisibleAtom preference that defaults to false, 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 files
  • pnpm 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 — passed
  • pnpm run typecheck — passed
  • pnpm run check:circular — passed; no circular dependencies across 6566 modules
  • git diff --check origin/develop...HEAD — passed
  • Rendered Tauri screenshot not captured: the change removes a trailing glyph in the default state, and renderer tests cover default-hidden plus explicitly-enabled behavior. No Computer Use verification was run.

Performance audit

  • Background work: pass — the default-hidden preference supplies an empty, stable session list to the PR-status hook, so it creates no repository refresh timer or GitHub PR requests
  • Memory: pass — the existing bounded PR cache is unchanged; hidden mode adds only one persisted boolean
  • Scope/isolation: pass — the preference is local UI state under a dedicated storage key
  • Rendering/hot path: pass — row rendering performs one boolean gate and omits the Git indicator by default

Performance verdict: pass

@Harry19081 Harry19081 added bug Something isn't working sessions Sessions, history, replay, sidebar, workspace, or worktrees frontend-ui Frontend UI, design system, accessibility, layout, or theming UX Improvements to user experience, workflow smoothness labels Aug 26, 2026
@sudomaggie
sudomaggie merged commit 8ca8964 into develop Aug 26, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working frontend-ui Frontend UI, design system, accessibility, layout, or theming sessions Sessions, history, replay, sidebar, workspace, or worktrees UX Improvements to user experience, workflow smoothness

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants