Skip to content

fix: leave the overview drill-in when the settings rail picks overview - #31471

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/29730-overview-rail-reset
Nov 7, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/29730-overview-rail-reset

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Clicking Overview in the Settings rail always lands on the Overview cards, including from the Memory, Usage or WakaTime drill-in.

On Settings > Overview, "View details" on the Memory card opens the Memory view at /settings?view=memory. Clicking "Overview" in the left rail left the URL at /settings?view=memory, so the Memory view stayed on screen; only the in-pane "← Overview" went back.

Why it matters

The rail is the main way out of a Settings pane, and a rail click that changes nothing reads as a broken page. The drill-in also rode along to other tabs and reopened on the next visit to Overview.

Not a goal

What changed (motivation → approach → change)

A rail click is meant to land on a tab's root, and it already drops a SubNav selection for that reason. Overview keeps its drill-in in its own query params (view, store, focus), which the rail did not know about, so it copied them into the new URL.

A tab in components/SidePanelLayout.tsx can now declare drillInParams, and every rail selection drops every declared one. Settings declares view, store and focus on its Overview tab. Re-clicking Overview from a drill-in now unmounts the drill-in's pane, so that click asks the pane's leave guard first, as a tab switch does: an unsaved Memory edit is not dropped without a prompt. A lesson typed into the Rule box but not added, and a retention box edited but not saved, now count as unsaved in pages/overview/MemoryTab.tsx, so that click asks before dropping them. The Memory view's other untracked drafts are #32024.

Pages that declare no drillInParams behave exactly as before.

Backwards compatibility

Compatible: deep links such as /settings/overview?view=memory&focus=lessons still open the drill-in; only a rail click drops the params, and no other page declares any.

Removes nothing: the params a rail click drops describe the drill-in that click is leaving.

Tests

  • website/src/test/SettingsPage.test.tsx "leaves the Overview memory drill-in when the rail picks Overview": from /settings?view=memory&store=team&focus=lessons, clicking Overview in the rail lands on /settings.
  • website/src/test/MemoryTabLessonsFocus.test.tsx "counts a typed lesson that was not added yet as unsaved work" and website/src/test/OverviewMemoryTabCov80.test.tsx "counts an edited retention box as unsaved work until a Save lands": the view holds a beforeunload while the draft is unsaved.
  • website/src/test/SidePanelLayout.leaveGuard.test.tsx "asks before re-clicking the shown tab drops its drill-in": a declined confirm keeps the draft and the URL.

With the production change reverted each one fails (expected '/settings?view=memory' to be '/settings'; confirm never called; no beforeunload held), and with it each passes. Both passed 10 repeated runs and a shuffled run of their files (--sequence.shuffle).

Proof: not provable -- frontend test (prove.py runs Python only)

Also run: the related frontend set (23 files, every SidePanelLayout.* and SettingsPage.* spec included), tsc -p tsconfig.app.json, eslint on the touched files, semgrep on the diff and gen-ui-index --check.

Manual verification

Built the SPA and drove it in Chromium against fixture API answers: opened Settings > Overview > Memory (/settings?view=memory), clicked Overview in the rail, and the page showed the Overview cards at /settings.

Screenshots / video

The Memory drill-in at /settings?view=memory, before the rail click:

Memory drill-in before the rail click

After clicking Overview in the rail: the Overview cards at /settings.

Overview cards after the rail click

Related Issues

Closes #29730

Sibling sweep

Swept: git grep -nE "get('(view|review|highlight)')" -- website/src
Sibling: website/src/pages/overview/SkillsTab.tsx:146 -- tracked in #31464
Sibling: website/src/pages/system/PerformanceTab.tsx:98 -- not affected -- its pane sits under the Developer sub path segment, which every rail selection already drops
Sibling: website/src/pages/settings/SkillsPanel.tsx:60 -- not affected -- ?review= redirects to the review queue on arrival, so it never stays in a Settings URL
Sibling: website/src/pages/settings/DecisionsCard.tsx:183 -- not affected -- ?highlight= points at one control on arrival; it is not a view that replaces the pane

Pattern harvest

Rule candidate: review-prompt
Pattern: a pane keeps its own drill-in in a query param that the shared tab rail copies into the next URL, so a rail click cannot leave it

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 6, 2026 14:52
@bolichen97
bolichen97 requested a review from Zedmor November 6, 2026 14:52
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of ae6bac46a5b0d4851a3ba56dad89aded1166164d — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: a tab-declared drill-in list that the rail drops fixes the cause in the shared layout, and pages that declare nothing behave as before.

Notes

  • dropTabSelections drops every tab's declared params on any rail click, not only the current tab's. If a later tab declares a generic name like view or focus for a different purpose, the two tabs will quietly share it. Scoping the drop to the tab being left would make each tab's list mean only its own drill-in.

[DESIGN-REVIEWED] ae6bac4

Description read

[DESCRIPTION-READ] 346f48a7843a2f8a450857587d0f0245b1a30e911b4811f2c624b5c849911d65

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of ae6bac46a5b0d4851a3ba56dad89aded1166164d — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. The rail fix sits at mechanism level, and the Memory dirty-tracking widening follows from the re-click that now unmounts the pane.

Notes

  • Item 2 — one consumer, generalized: drillInParams?: readonly string[] on SidePanelTab is set only by SettingsPage.tsx:85 (grepped drillInParams in website/src: 1 non-test site). The second caller, ?view=budget, is deferred to Clicking "Skills" in the Customize rail does not leave the Context budget view #31464, so this is acceptable as a note.
  • Item 4 — rides along: "A lesson typed into the Rule box but not added… now count as unsaved" also adds a prompt on ordinary tab switches and page unloads (beforeunload). Those paths already dropped this work before this PR, so the change goes past "re-click asks first".

What this change ships

Inventory (5 items) — 3 justified

Intent: clicking Overview in the Settings rail returns to the Overview cards from a Memory, Usage or WakaTime drill-in. FIX.

  1. Clicking Overview in the rail from ?view=memory now lands on /settings — justified
  2. Each rail tab can declare its own drill-in query params, and any rail click drops them — one consumer, generalized
  3. Re-clicking the tab already shown while a drill-in is open now asks the leave guard first — justified
  4. An unadded Rule draft or an unsaved retention edit now counts as unsaved work (tab switch, unload prompt) — rides along
  5. A Save that lands clears the unsaved state, unless the user edited while the request was in flight — justified

[FIRST-PRINCIPLES-REVIEWED] ae6bac4

Description read

[DESCRIPTION-READ] 30a6057ace8d84f9e050f74c253b7e8c93d438f042351c10a7db6941dbdc856a

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of ae6bac46a5b0d4851a3ba56dad89aded1166164d — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks. Both screenshots show the rail click's before and after states, and the blind reader expected a click on the highlighted "Overview" rail item to "reload the overview", which is what the change now does.

Notes

  • The leave-guard confirm that now fires on a rail re-click (for a typed Rule or an unsaved retention edit) appears in no screenshot. It reuses the existing discard prompt, so a still of it would only confirm that its wording fits the "you typed a lesson but didn't add it" case.
  • With the drill-in open, the rail still highlights "Overview" and the title still reads "Overview". The blind reader said: "I can't tell which page I'm really on." That page-title follow-up is outside this PR's goal.

[UX-REVIEWED] ae6bac4

Description read

[DESCRIPTION-READ] ff7cc274185faa47ba120c2f905b18c57561bd8eab130817bd776938f17a1a91

That sha256 names everything this verdict read: the PR description, plus the 5 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of ae6bac46a5b0d4851a3ba56dad89aded1166164d and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] ae6bac4

False positive or not applicable? A repository writer can comment:
/ai-review override gpt ae6bac46a5b0d4851a3ba56dad89aded1166164d false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed ae6bac46a5b0d4851a3ba56dad89aded1166164d — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] ae6bac4

Verdict parsed from the review's SHA-scoped output markers for commit ae6bac46a5b0d4851a3ba56dad89aded1166164d.

False positive or not applicable? A repository writer can comment:
/ai-review override fable ae6bac46a5b0d4851a3ba56dad89aded1166164d false-positive: <reason, 20 to 500 characters>

@bolichen97
bolichen97 enabled auto-merge (squash) November 6, 2026 15:13
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 6, 2026
@bolichen97
bolichen97 force-pushed the fix/29730-overview-rail-reset branch from f9766a3 to 37efe73 Compare November 6, 2026 17:03
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in 43 files beside this change under website/src/components/ and website/src/pages/ (none of the four files it edits) since this head was judged (b764e20 -> 38a8ef5); CI re-running. The new base also carries the security package line-budget fix (#31469) that turned Backend Tests (2) and Coverage Gate red on main.

[operator: bolichen97]

@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in 22 files beside this change under website/src/components/ and website/src/pages/ (none of the four files it edits) since this head went green (38a8ef5 -> a31eccd); CI re-running. The previous run's reds were the GitHub API rate limit (review lanes, PR Policy, Sensitive Change Review, License Gate) and the known member-memory e2e flake (#22314), not this diff.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 6, 2026
@bolichen97
bolichen97 force-pushed the fix/29730-overview-rail-reset branch from 8b64be6 to f801b8d Compare November 7, 2026 02:31
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in 27 files beside this change under website/src/components/ and website/src/pages/ (none of the four files it edits) since this head went green (a31eccd -> 10e0a06); CI re-running. The previous head's reds were not this diff: Backend Tests shard 2 (Linux and Windows) failed test_the_package_stays_within_its_line_budget, which was red on main at the same time and is green on main now, Coverage Gate failed only because that backend job did, and Render Benchmark tripped s2.selectorCalls, the chat-stream flake tracked in #31963.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 7, 2026
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 7, 2026
A rail selection lands on a tab's root, but Overview keeps its drill-in
in ?view=/?store=/?focus=, which a tab change copied along, so clicking
Overview from the Memory view kept the Memory view. A tab can now
declare its drill-in params and every rail selection drops them; a
re-click that drops the shown tab's drill-in asks the pane's leave
guard first, since it now unmounts that pane.
@bolichen97
bolichen97 force-pushed the fix/29730-overview-rail-reset branch from f801b8d to ae6bac4 Compare November 7, 2026 04:55
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] New head ae6bac46a5b0, on the same base as f801b8dd54c5.

Unsaved drafts in the Memory view (local review finding). A local GPT review found that re-clicking Overview from the Memory drill-in, which this PR makes leave the drill-in, could drop typed text that the leave guard does not track.

fixed in ae6bac4: GlobalMemoryTab now counts a lesson typed in the Rule box but not added, and a retention box edited but not saved (kept unsaved after a failed save and for an edit made during a save), so this click asks first.
Tests: MemoryTabLessonsFocus.test.tsx "counts a typed lesson that was not added yet as unsaved work" and OverviewMemoryTabCov80.test.tsx "counts an edited retention box as unsaved work until a Save lands". Each is red without its fix and green with it, and passed 10 repeats and a shuffled run.
Deferred: the Memory view's other untracked drafts (the Semantic card inputs) and the same loss on any tab switch, which main already has, are #32024.

Render Benchmark red on 8b64be685447. It was s2.selectorCalls: 251779 against budget 218000 (limit 250699) OVER. The counter that grew is s2 dispatches: 351 in two of three runs against the usual 309 to 312, and selector calls follow dispatches. s2 streams a chat answer on /chat, which mounts neither SidePanelLayout nor SettingsPage. Local node scripts/bench-render.mjs --scenario s2 --runs 5:

tree dispatches per run median selectorCalls
this PR 310, 311, 309, 312, 310 226542
same base without this PR 310, 336, 325, 309, 309 227122

The same jump appears without the change. The budget is unchanged; the noise is recorded as #31963.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 7, 2026

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for the on-call. Review lanes pass on ae6bac4, no conflict, no open change request.

@KiroCrewCaptain
KiroCrewCaptain merged commit bb189b3 into main Nov 7, 2026
97 of 106 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/29730-overview-rail-reset branch November 7, 2026 06:07

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tier 1 auto-approve: fix (7 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: frontend bug fix; a Settings rail pick of Overview now drops the overview drill-in params, and the leave guard also counts unsaved memory inputs, with tests.

buluoray pushed a commit that referenced this pull request Nov 8, 2026
#31471)

A rail selection lands on a tab's root, but Overview keeps its drill-in
in ?view=/?store=/?focus=, which a tab change copied along, so clicking
Overview from the Memory view kept the Memory view. A tab can now
declare its drill-in params and every rail selection drops them; a
re-click that drops the shown tab's drill-in asks the pane's leave
guard first, since it now unmounts that pane.

(cherry picked from commit bb189b3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clicking "Overview" in the Settings rail does not leave the Memory drill-in

2 participants