Skip to content

fix(ui): clear stale navigation highlights when opening Chat - #1746

Draft
luokerenx4 wants to merge 1 commit into
devfrom
codex/1514-sidebar-selection
Draft

luokerenx4 wants to merge 1 commit into
devfrom
codex/1514-sidebar-selection

Conversation

@luokerenx4

Copy link
Copy Markdown
Contributor

Clicking Issues and then Chat leaves both navigation entries highlighted. This Draft fixes that current-dev regression only; layout and navigation destinations keep their existing behavior. Related: #1514.

flowchart LR
  subgraph Before
    A[Click Issues] --> B[Stored sidebar selects Issues]
    B --> C[Click Chat]
    C --> D[Focused tab selects Chat]
    B --> E[FAIL: Issues stays highlighted]
    D --> F[Chat also highlights]
  end
  subgraph After
    G[Click any destination] --> H[Existing focused tab owner]
    H --> I[Existing tab to section mapping]
    I --> J[Only the current destination highlights]
  end
Loading

The rail now derives selection from the focused tab, as the Harness rows already do. The existing URL adopter's mapping moves unchanged into the shared tab types module and is reused; no new state or navigation abstraction. The old persisted sidebar field remains for existing callers, but it no longer controls rail highlighting. This intentionally bounds the fix rather than migrating unrelated stored UI state.

Interaction choice: keep the current routes and controls and unify selection ownership, instead of adding more setters to every navigation path. Desktop, compact rail and mobile drawer geometry are unchanged. aria-current follows the same selected destination as the highlight. No new primitive.

Validation:

  • Reproduced in Chromium on the unmodified demo /issues: Issues → Chat yielded two current-page entries.
  • Chromium after the fix: Issues → Chat yields only Chat; returning through Issues → Quick Start yields only Quick Start.
  • Focused ActivityBar and URL-adoption tests: 48 passed, including stale-sidebar transitions and issue-detail return.
  • UI TypeScript build passed.
  • Related test closure: 99 files / 743 tests passed.
  • Native packaged Electron was not exercised: its binary download is blocked in this environment. This patch changes browser selection logic only.

Overlap: #1440 is owned by the other batch; its navigation test should preserve this focused-tab ownership. Open #1730 changes ActivityBar styling but its inspected diff retains the broken selectedSidebar condition, so it does not cover this fix. Integrate that shared line when accepting either PR. #1051 terminal-theme work is untouched.

@luokerenx4 luokerenx4 added workflow:parallel Autonomous parallel contribution; leave open for later acceptance theme:reliability Failure recovery, retries, loading, or resilience area:app-shell Global navigation, shell, or cross-surface UI labels Oct 2, 2026
@vercel

vercel Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openalice-demo Ready Ready Preview Oct 2, 2026 10:23am UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — 914155d4 Deployed Oct 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:app-shell Global navigation, shell, or cross-surface UI theme:reliability Failure recovery, retries, loading, or resilience workflow:parallel Autonomous parallel contribution; leave open for later acceptance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants