Repository navigation
fix(members): after Leave on a rail click back to the Crewmates page, the New crewmate card actually closes - #19556
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that no in-app code pushes a bare [DESIGN-REVIEWED] 7c43fa3 Description read[DESCRIPTION-READ] 2de8a64018e0723a207e69cb6ea1ac079df50d40a039ef5bf52eaac140070650 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 Before merge, confirm that only the rail and palette push onto a bare What this change shipsInventory (7 items) — 7 justifiedIntent: when someone clicks Crewmates in the rail and answers Leave, the New crewmate card closes and the page shows. FIX.
[FIRST-PRINCIPLES-REVIEWED] 7c43fa3 Description read[DESCRIPTION-READ] 3529b198fff226cb2297c990f846ad64c896950187008f2124f79e9040506402 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Check that clicking Crewmates, then Leave, should land on the last chat (Radar) and not the roster: shots 5–8 show chat, and no shot shows the roster. [UX-REVIEWED] 7c43fa3 Description read[DESCRIPTION-READ] 0ed6f53700f3f17a21c1dc937cd8214d9fa6e9a45f7df290dd87db31d0a2ef66 That sha256 names everything this verdict read: the PR description, plus the 13 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 |
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: |
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: |
5e64b27 to
c80c1e9
Compare
|
self-added: no
|
|
self-added: no
|
|
self-added: no
|
|
self-added: no
|
|
self-added: no
|
|
self-added: no
|
|
self-added: no
|
|
self-added: no
|
|
self-added: no
|
|
self-added: no
|
|
self-added: no
|
c80c1e9 to
bbd0f6e
Compare
|
Update on the round-2 UX dispositions for |
bbd0f6e to
7c6d403
Compare
|
self-added: no
|
|
self-added: yes
|
|
self-added: yes
|
|
self-added: no
|
|
self-added: no
|
|
self-added: no
|
|
self-added: yes
|
628565b to
ba0e24f
Compare
ba0e24f to
6c83194
Compare
|
Re-scoped after #18805 landed on main and removed the four-step wizard this PR first fixed. The dispositions above (through head Head |
… the New crewmate card actually closes
6c83194 to
7c43fa3
Compare
|
self-added: yes
|
|
self-added: yes
|
|
self-added: yes
|
|
self-added: yes
|
|
self-added: yes
|
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: a nav-rail click that already asked the leave question passes leaveGranted, so the Crewmates page closes the New crewmate card after Leave without asking twice; evidence script and test added.
Problem / Motivation
Goal: Clicking Crewmates in the rail while the New crewmate card is open and asking to leave does what the user answered: Leave closes the card and shows the page, Stay keeps the card and its text.
The nightly GUI user test (#19381) found a tester stuck inside the crewmate create surface. Every click on the rail's Crewmates row popped "Leave this page? Your unsaved crewmate draft will be lost.", and answering Leave did not help: the create surface stayed on screen, because the Crewmates page never left. The surface has since changed (#18805 replaced the four-step wizard with one card), and the card has the same dead click.
Why it matters
A first-time user cannot get back to the Crewmates page through the rail. They answer a warning, agree to lose their text, and nothing happens. A click that does nothing after a confirm teaches people the app is broken, and the only way out they find is the card's own X.
Not a goal
Intended? / Repro
Intended? No. The guard exists to ask before the text is lost; nothing decides that the answer should then be ignored.
website/src/pages/members/MembersPage.tsx,leaveCreate(from feat: create a crewmate from one card on the Crewmates page #18805,8635bc66b3): "Choosing a chat or a team while the card is up means 'show me that': the card is left only if its own guard agrees". Choosing a chat closes the card after the guard agrees; the rail's Crewmates row asked the same guard and then left the card standing.website/src/components/NavigationLeaveGuard.tsx(fix(dashboard): ask before in-app navigation discards a prompt draft #7946702fcc1169, fix(dashboard): ask before Back or a notification jump discards a draft #8131e125819afe): the rail asks the page before it navigates. It did ask; the page simply did not act on the navigation that followed, because every/members?...address renders the same mounted component withcreateOpenstilltrue.accepted: rfc-crewmates-launch.md § 11 decides that an open conversation hides the roster behind a switcher (what the rail row lands on); its only draft-safety rule is for the Schedules form, "every gesture that would unmount it asks first". rfc-crewmate-guides-and-mate.md, rfc-session-template-vs-crewmate.md and rfc-crewmates-chatted-list.md say nothing about leaving the create surface. No RFC asks for a confirm whose answer changes nothing.config.agentsmember row with its own template, folder, memory and DM thread, not a kiro custom agent template (~/.kiro/agents/*.json, the Customize rail's "Custom agents"). The card's "Built from" picks such a template; the draft is the crewmate.Repro on main (
7ca644d8cd, no local test suite):website/scripts/capture-crewmate-card-rail-exit.mjsruns the built SPA behind the shared stubs withwindow.confirmrecording every message and answering from a switch.Steps it drives: open
/members?member=Radar, switcher -> New crewmate, type a name, click the rail's Crewmates row with the confirm answered Leave.Observed on main:
The card is still open after Leave, and an untouched card asks too because the typed one never closed. Expected (and observed on this head, 28/28 checks): Leave closes the card and Radar's chat is back; Stay keeps the card with its text; an untouched card closes with no question.
The nightly lane saw the dead click for real on the previous surface: run 38232552533, scenario
crewmate-panel-tabsattempt 1, step 6.What changed (motivation → approach → change)
/members(card from the empty hero), text typed/membersnobody guarded, text typedThe row asks the card's guard, then navigates to
/members. That address renders the same page, which stays mounted withcreateOpenstill true, so the card the user agreed to leave stayed where it was. The page now reads the navigation landing: alocation.keychange that is a PUSH onto a bare/members, outside the Back guard's duplicate entry, while the card is open. Three marks tell that click from every other way the location changes: this page's own URL writes (the remembered chat, a gone name cleared, a create link's cleanup) are replaces, the phone's drawer and team pushes name a member or a team, andNavigationBackGuard's duplicate entry carries its marker.The URL says where the user landed, never that anyone asked. A caller that asked the guards says so with
leaveGrantedin the entry's state, the mark the guide'senteralready writes: the rail'sNavItem(website/src/App.tsx) and the palette'snavigate(paletteActions.ts) now carry it when they asked. With the mark, Leave was the answer and the card closes at once (the wayleaveCreatecloses: a create in flight is left, not blanked). Without it, the rail row clicked while the address is already a bare/members, which asks nothing, or a plainnavigate('/members')such as the command bar's open-crewmates row, the page runsleaveCreateitself: it asks the card's guard when there is text to lose, closes on Leave and keeps the card on Stay. Typed text is never dropped unasked.website/scripts/capture-crewmate-card-rail-exit.mjsdrives the real shell for the frames below; its optional[distDir]points it at a base build for the repro.Backwards compatibility
Compatible:
leaveGrantedis an existing navigation-state mark (the guide'senter), now also written by the rail row and the palette when they asked; no reader oflocation.statecompares it whole. One page effect closes a card the user agreed to leave, or asks first.Removes nothing: no path, record, validator or key is taken away.
Tests
website/src/pages/members/MembersPage.test.tsx, four tests through a rail stand-in withNavItem's exact sequence (asks and marksleaveGrantedwhen the address changes; navigates bare when it is current) plus an unguarded push: with a typed card, Stay keeps the card, text and address, Leave closes the card and shows the chat, an untouched card closes with no confirm (red on main: the card stays after Leave); an unguarded push to/membersover a typed card asks before anything closes, Stay keeps and Leave closes; the rail row at an already-bare/members(empty roster, card from the hero) asks the same way; a create link to/members?create=1opens the card and its cleanup to a bare/membersdoes not close it.src/test/paletteNavLeaveGuard.test.tsxandpaletteActions.cov80.test.tsxpin that the palette marks a jump it asked for and not one to the current address.Determinism: synchronous DOM assertions over the real
NavigationLeaveGuardProviderand router; no timers, no network beyond the file's existing stubs. Repeats and shuffled order run in CI's related set.Manual verification
npm run build && node scripts/capture-crewmate-card-rail-exit.mjsruns the built SPA behind the shared stubs. All 40 asserted checks pass in dark and light: one confirm with the exact message on the rail click, Stay keeping the card, text and address, Leave closing the card with the chat back, an untouched card closing unasked, and on an empty roster at a bare/membersthe same click asking once, Stay keeping the text and Leave closing the card. Against a main build the script records the card still open after Leave and no question at the bare address (exit 1).Screenshots / video
Desktop 1440x900, the real shell. The confirm itself is a native dialog and cannot be captured; frames 02 and 03 show the state after each answer.
/members, Leave: card closed, hero backRelated Issues
Fixes #19381
Pattern harvest
Rule candidate: review-prompt
Pattern: a page asks its leave guard before an in-app navigation that lands on the same page, then ignores the answer because nothing unmounts (same route, query-only change)
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)