Skip to content

fix(web-ui): add branch picker refresh and preserve selected styling - #3290

Merged
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:bob/fix-branch-picker-refresh
Oct 8, 2026
Merged

bobleer merged 1 commit into
GCWing:mainfrom
bobleer:bob/fix-branch-picker-refresh

Conversation

@bobleer

@bobleer bobleer commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

The composer branch picker has no refresh action, and hovering or using keyboard navigation overrides the current branch's selected background. Add a refresh button beside search and preserve the selected background across hover, press, and virtual keyboard focus.

Type and Areas

Type: bug fix / UI/UX

Areas: Web UI, shared design system

Motivation / Impact

  • Refresh branches without closing the picker or clearing the search. Display loading state and prevent duplicate clicks.
  • Keep the last successful list on refresh failure, show an actionable error, and allow retry. Initial failures no longer appear as an empty repository.
  • Ignore responses from a previous workspace or a closed picker.
  • Keep search and refresh keyboard-accessible; Enter on refresh cannot also switch the highlighted branch.
  • Use the existing workspace-aware Git service and retain its legacy error fallback for other callers. Refresh rereads repository refs; it does not fetch from remotes.

Verification

  • pnpm --dir src/web-ui run test:run src/tools/git/components/BranchQuickSwitch.test.tsx src/tools/git/services/GitService.test.ts src/shared/ui/MenuComposition.contract.test.ts — 28 tests passed.
  • node --test design-system/packages/ui/tests/listbox.test.mjs — 4 tests passed.
  • pnpm --dir src/web-ui run icons:check — passed.
  • pnpm --dir src/web-ui exec vitest run src/infrastructure/design-system/IconUsageIntegration.test.tsx src/app/startup/startupPreload.test.ts — 21 tests passed.
  • pnpm run check:web — passed, including TypeScript, Appearance contracts, theme colors, and visual governance.
  • pnpm run i18n:audit — passed with no warnings.
  • pnpm run motion:audit — inventory reviewed; no new animation was introduced.
  • git diff --check — passed.

Reviewer Notes

AI-assisted implementation, tested with focused unit/DOM tests and repository checks. No live GUI before/after capture was performed, so screenshots are unavailable. Tests exercise workspace scope forwarding and stale response handling with mocks; remote workspace, remote control, Peer Device Mode, and Detached Dispatch were not exercised end to end.

The Listbox fix lowers transient interaction selector specificity while keeping forced-colors overrides intact. English, Simplified Chinese, and Traditional Chinese copy is updated. No persisted or wire-format changes are required.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@bobleer
bobleer merged commit 32cca12 into GCWing:main Oct 8, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant