Repository navigation
fix: leave the overview drill-in when the settings rail picks overview - #31471
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of 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
[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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of 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
What this change shipsInventory (5 items) — 3 justifiedIntent: clicking Overview in the Settings rail returns to the Overview cards from a Memory, Usage or WakaTime drill-in. FIX.
[FIRST-PRINCIPLES-REVIEWED] ae6bac4 Description read[DESCRIPTION-READ] 30a6057ace8d84f9e050f74c253b7e8c93d438f042351c10a7db6941dbdc856a That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of 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
[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 |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
f9766a3 to
37efe73
Compare
|
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] |
37efe73 to
8b64be6
Compare
|
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] |
8b64be6 to
f801b8d
Compare
|
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 [operator: bolichen97] |
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.
f801b8d to
ae6bac4
Compare
|
[operator: bolichen97] New head 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.
Render Benchmark red on
The same jump appears without the change. The budget is unchanged; the noise is recorded as #31963. |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved for the on-call. Review lanes pass on ae6bac4, no conflict, no open change request.
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
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.
#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)
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
?view=budget), tracked in Clicking "Skills" in the Customize rail does not leave the Context budget view #31464.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.tsxcan now declaredrillInParams, and every rail selection drops every declared one. Settings declaresview,storeandfocuson 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 inpages/overview/MemoryTab.tsx, so that click asks before dropping them. The Memory view's other untracked drafts are #32024.Pages that declare no
drillInParamsbehave exactly as before.Backwards compatibility
Compatible: deep links such as
/settings/overview?view=memory&focus=lessonsstill 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" andwebsite/src/test/OverviewMemoryTabCov80.test.tsx"counts an edited retention box as unsaved work until a Save lands": the view holds abeforeunloadwhile 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';confirmnever called; nobeforeunloadheld), 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.*andSettingsPage.*spec included),tsc -p tsconfig.app.json, eslint on the touched files, semgrep on the diff andgen-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:After clicking Overview in the rail: the Overview cards at
/settings.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 URLSibling: website/src/pages/settings/DecisionsCard.tsx:183 -- not affected --
?highlight=points at one control on arrival; it is not a view that replaces the panePattern 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
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.