Skip to content

fix(members): after Leave on a rail click back to the Crewmates page, the New crewmate card actually closes - #19556

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/crewmate-wizard-exit-no-phantom-draft-19381
Oct 13, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/crewmate-wizard-exit-no-phantom-draft-19381

Conversation

@CrysisDeu

@CrysisDeu CrysisDeu commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

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.

Repro on main (7ca644d8cd, no local test suite): website/scripts/capture-crewmate-card-rail-exit.mjs runs the built SPA behind the shared stubs with window.confirm recording every message and answering from a switch.

cd website && npm run build          # in a worktree of main
node scripts/capture-crewmate-card-rail-exit.mjs <out> <main worktree>/website/dist

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:

03-rail-leave-dark asked:       OK confirms=["Leave this page? Your unsaved crewmate draft will be lost."]
03-rail-leave-dark card closed: MISMATCH create pane hidden, chat column shows
04-rail-pristine-dark no confirm: MISMATCH confirms=["Leave this page? Your unsaved crewmate draft will be lost."]

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-tabs attempt 1, step 6.

What changed (motivation → approach → change)

Click on the rail's Crewmates row Before After
card open, text typed, answer Stay card stays card stays, text kept
card open, text typed, answer Leave confirm, then the card stays card closes, chat shows
card open, nothing typed card stays card closes, no question
same click at a bare /members (card from the empty hero), text typed card stays, no question the page asks; Stay keeps, Leave closes
any other in-app push to /members nobody guarded, text typed card stays the page asks; Stay keeps, Leave closes
Back, reload, tab close own prompts unchanged

The row asks the card's guard, then navigates to /members. That address renders the same page, which stays mounted with createOpen still true, so the card the user agreed to leave stayed where it was. The page now reads the navigation landing: a location.key change 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, and NavigationBackGuard'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 leaveGranted in the entry's state, the mark the guide's enter already writes: the rail's NavItem (website/src/App.tsx) and the palette's navigate (paletteActions.ts) now carry it when they asked. With the mark, Leave was the answer and the card closes at once (the way leaveCreate closes: 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 plain navigate('/members') such as the command bar's open-crewmates row, the page runs leaveCreate itself: 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.mjs drives the real shell for the frames below; its optional [distDir] points it at a base build for the repro.

Backwards compatibility

Compatible: leaveGranted is an existing navigation-state mark (the guide's enter), now also written by the rail row and the palette when they asked; no reader of location.state compares 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 with NavItem's exact sequence (asks and marks leaveGranted when 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 /members over 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=1 opens the card and its cleanup to a bare /members does not close it. src/test/paletteNavLeaveGuard.test.tsx and paletteActions.cov80.test.tsx pin that the palette marks a jump it asked for and not one to the current address.

Determinism: synchronous DOM assertions over the real NavigationLeaveGuardProvider and 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.mjs runs 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 /members the 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.

dark light
01 the card with a typed name
02 rail click, Stay: card and text kept
03 rail click, Leave: card closed, chat back
04 untouched card, rail click: no confirm, closed
05 empty roster, bare /members, Leave: card closed, hero back

Related 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

  • 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

@CrysisDeu
CrysisDeu requested review from a team and KiroCrewCaptain as code owners October 12, 2026 21:34
@CrysisDeu
CrysisDeu requested a review from bolichen97 October 12, 2026 21:34
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 12, 2026
@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 7c43fa310c20fa2c56235322f1dfd2cb69d77790 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Check that no in-app code pushes a bare /members while expecting the card to stay open: the new landing effect would now close it or ask first.

[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 .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 Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 7c43fa310c20fa2c56235322f1dfd2cb69d77790 — 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/CONCERNS are advisory.

First-Principles-Verdict: PASS

Before merge, confirm that only the rail and palette push onto a bare /members (non-test grep: one raw push, CommandBarOverlay.tsx:2005), since the new effect closes the card on any such push.

What this change ships

Inventory (7 items) — 7 justified

Intent: when someone clicks Crewmates in the rail and answers Leave, the New crewmate card closes and the page shows. FIX.

  1. Rail Crewmates row answered Leave over a typed card: the card closes and the chat shows — justified
  2. Rail Crewmates row over an untouched card: the card closes with no question — justified
  3. Rail row clicked while already at a bare /members (empty roster): the page now asks before it closes a typed card — justified
  4. An unguarded push to /members (the command bar's open-crewmates row) now asks, then closes on Leave — rides along; needed so the new close never drops text unasked
  5. Rail NavItem marks every guarded navigation with leaveGranted, on every route — justified
  6. Palette navigate marks guarded jumps with leaveGranted, on every route — rides along; stops the page asking twice after the palette already asked
  7. New script capture-crewmate-card-rail-exit.mjs reproduces the bug on base and shows the fix — justified

[FIRST-PRINCIPLES-REVIEWED] 7c43fa3

Description read

[DESCRIPTION-READ] 3529b198fff226cb2297c990f846ad64c896950187008f2124f79e9040506402

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 Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 7c43fa310c20fa2c56235322f1dfd2cb69d77790 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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 .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 Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 7c43fa3

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

False positive or not applicable? A repository writer can comment:
/ai-review override fable 7c43fa310c20fa2c56235322f1dfd2cb69d77790: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 7c43fa3

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 7c43fa310c20fa2c56235322f1dfd2cb69d77790: <one-sentence reason>

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no
mechanism: the agreed callback on the leave channel

  • survives(to) both answers and hides the flow span=e1795344a235 — fixed in c80c1e9

Legitimate: with a second draft on the page (the Schedules form), ask could hide the wizard and then be refused by that form, leaving a cancelled navigation with a hidden wizard.
Fix: survives(to) is now a pure check. The channel's register(guard, agreed?) fires agreed(to) only after every guard said yes, DraftLeaveGuard exposes it as onSurvived, and MembersPage steps the flow aside there. New test: a refusing guard registered after the flow keeps the wizard on screen; with the veto gone the same leave steps it aside.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

Legitimate as a product gap, but not one this PR opens: the flow already steps aside with no cue whenever the user picks a chat or a team while it is open (leaveGuided, unchanged). The rail click now takes that same existing path; the draft is kept and resumes on the next New crewmate exactly as before.
A visible "draft kept" cue is a new element with a placement and wording decision, so it is tracked in #19587 rather than designed inside a T1 fix.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • "Crewmates" lands on a chat, not a list span=ecc2e8ad6fef — rebutted (existing page design, confirmed)

Confirmed as designed, not changed here: MembersPage's URL effect replaces a bare /members with the remembered crewmate (#11763, #19341) at every width; the roster is the switcher chip over the open chat. The Goal's "shows the Crewmates page again" means that page as it is designed today.
The nightly lane filed the same observation as its own friction key (29bb8a47fdaa57e2, "Clicking Crewmates dropped me straight into Radar's chat"); it is a separate issue, not this fix.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

The same new element as the Watch item above: a cue with a placement and wording decision shared by every step-aside path, tracked in #19587.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • Recapture frames 01 once the entry animation has settled span=cbbc919876df — fixed in c80c1e9

Legitimate: the frames were shot mid-slide, so the pane read as faded and Next as disabled. The capture script now waits until the step and every ancestor up to the create pane are fully opaque and untransformed (settled()) before frames 01, 03 and 04; all eight frames were recaptured and re-attached.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

Same gap as round 1's Draft hidden without a cue: every step-aside path (choosing a chat or a team, and now the rail row) hides the flow with no cue, and all of them predate this PR. The cue is a new element with a placement and wording decision; the lane's concrete shapes are recorded on #19587.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • Cause: onDraftSurvived hides the wizard and shows the chat span=73566dbf080e — accepted as described, no change

That is the designed step-aside (leaveGuided): the flow hides, the draft stays mounted and resumes on the next New crewmate. It is the same thing choosing a chat does today; the rail row now takes that path instead of a false discard confirm.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

Agreed on the effect; the cue belongs with the entry where the draft resumes and is tracked there. This PR removes the untrue warning; it adds no new message, so it does not make the kept draft harder to find than any other step-aside already does.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • Severity: moderate, every rail exit from the wizard span=ebd78b1eca1c — noted

Severity accepted as advisory. Before this PR the same exit either blocked the user behind a false warning or, after Leave, left the wizard on screen; the kept-draft cue is the remaining friction, tracked in #19587.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

A good shape, recorded on #19587 verbatim. It is a visible label/dot on the switcher row and the "+" menu item plus 12 catalogs, a wording decision outside this T1 fix's goal (no discard prompt for a navigation that destroys nothing).

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

Pre-existing labels in the guided flow, untouched by this diff. The rename is recorded on #19587 next to the kept-draft cue so both are decided together.

@CrysisDeu
CrysisDeu force-pushed the fix/crewmate-wizard-exit-no-phantom-draft-19381 branch from c80c1e9 to bbd0f6e Compare October 12, 2026 23:05
@CrysisDeu

Copy link
Copy Markdown
Contributor Author

Update on the round-2 UX dispositions for c80c1e9606: the maintainer asked for the kept-draft cue in this PR rather than a follow-up, so spans 53f856a9ce45, a4c78caaa69c and 23dbb1cb7aca are now fixed in bbd0f6e6c5 instead of deferred -- every door to the hidden draft reads "Resume crewmate draft" (frames 02b). #19587 is closed. The "Back to chat" rename (7198b723747c) stays out of scope: not caused by this PR.

@CrysisDeu
CrysisDeu force-pushed the fix/crewmate-wizard-exit-no-phantom-draft-19381 branch from bbd0f6e to 7c6d403 Compare October 13, 2026 00:05
@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no
mechanism: step-aside read off the location landing

  • The fix misses the same-address case span=969534d8f91f — fixed in 7c6d403

Legitimate: at a bare /members (flow opened from the empty hero) NavItem skips the guard, so an answer-driven step-aside never ran. The step-aside is now the page's reaction to the navigation LANDING: a location.key change that is a PUSH onto a bare /members, outside the Back guard's duplicate entry, while the flow is open. Covers both the query-change and the same-address click. Test: 'a rail click while the address is already a bare /members … still steps the flow aside'; frames 06/06b.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: removed the agreed-listener channel

  • Close the flow on a new location.key; drop the agreed channel span=81fd661ff73a — fixed in 7c6d403

Taken as written. NavigationLeaveAgreed, the agreed map/parameter and onSurvived/onDraftSurvived are gone; DraftLeaveGuard keeps only the pure survives(to) check. The landing is filtered to a PUSH on a bare address outside a trap entry, because this page's own URL writes (remembered chat, gone-name clear, hand-off cleanup) are replaces and NavigationBackGuard pushes a same-address duplicate the moment the draft is dirtied.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: removed the agreed-listener channel

  • Item 3 — one consumer, generalized span=09a86b3d434a — fixed in 7c6d403

Removed exactly as the subtraction says: no NavigationLeaveAgreed, no agreed map or parameter, no onSurvived/onDraftSurvived. MembersPage steps the flow aside from its own reaction to the completed navigation (PUSH onto a bare /members, see the Design dispositions).

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • Item 4 — inherited: the kept-draft cue span=3d4ba869a386 — rebutted (maintainer decision)

The cue is a maintainer call for this PR, not an inherited requirement: the UX lane raised the missing cue in two consecutive rounds (Watch 3e33553f18e0 on 5e64b27, 53f856a9ce45 on c80c1e9), I deferred it to #19587, and the maintainer ruled it ships here ("no follow-ups for things the review names"), closing #19587. The observation the lane asks for exists: the tester quoted in #19381 believed leaving destroyed the draft, and the UX lane's blind reader said the same twice. Scope kept to the four strings, the draftWaiting prop and one status line; no new surface.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • Nothing on screen says the draft was kept span=ab07e3080ba6 — fixed in 7c6d403

Where the wizard stood, a role="status" line now reads "Your crewmate draft was kept." with Resume (reopens the same draft) and a dismiss for this step-aside; it returns on the next one. Frames 02 (dark/light) show it over Radar's chat right after the rail click; the test 'the kept-draft note can be put away…' pins the dismiss/return. Evidence gaps closed too: frame 05 is the roster "+" menu item reading "Resume crewmate draft", frames 06/06b the empty hero at 1440 and 390 (the md:hidden placement).

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: no

  • Add a {{name}} variant to draft_waiting span=1341c1703c20 — rebutted (same reasoning as the Watch item above)

Same item as 56944397a2cc: the common case has no name yet, and the variant is new scope for a low-impact refinement. Not taken.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: kept-draft note actions as Btn

  • Use shared button primitives for both draft-note actions span=e7ac5689c151 — fixed in ba0e24f

Legitimate (blocking page-layout-pattern rule). Both actions on the kept-draft note are the imported Btn now: Resume as primary, Hide this note as the default variant; handlers, labels and test ids unchanged. Frames 02 re-shot.

@CrysisDeu
CrysisDeu force-pushed the fix/crewmate-wizard-exit-no-phantom-draft-19381 branch from 628565b to ba0e24f Compare October 13, 2026 01:34
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Oct 13, 2026
@CrysisDeu CrysisDeu changed the title fix(members): a rail click back to the Crewmates page no longer asks to discard the guided crewmate draft fix(members): after Leave on a rail click back to the Crewmates page, the New crewmate card actually closes Oct 13, 2026
@CrysisDeu
CrysisDeu force-pushed the fix/crewmate-wizard-exit-no-phantom-draft-19381 branch from ba0e24f to 6c83194 Compare October 13, 2026 02:45
@CrysisDeu

Copy link
Copy Markdown
Contributor Author

Re-scoped after #18805 landed on main and removed the four-step wizard this PR first fixed. The dispositions above (through head ba0e24ff96) answer findings on that earlier surface and its kept-draft note; none of that code is in this PR any more.

Head 6c83194ce6 is a fresh single commit on main against the one-card create: the rail's Crewmates row asks the card's guard (kept, in the same words, since the card drops its text by design), and on Leave the card now actually closes instead of staying on screen. Body, tests and captures were redone against current main; the repro on main is in the body's Intended? / Repro.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention labels Oct 13, 2026
@CrysisDeu
CrysisDeu force-pushed the fix/crewmate-wizard-exit-no-phantom-draft-19381 branch from 6c83194 to 7c43fa3 Compare October 13, 2026 03:12
@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: landing effect reads leaveGranted, else asks via leaveCreate

  • Same-URL rail clicks discard a typed draft without confirmation span=e7ac5689c151 — fixed in 7c43fa3

Legitimate: at a bare /members NavItem asks nothing and still pushes, and the effect closed the card on the push alone. Now the landing closes at once only when the entry carries leaveGranted (the mark the guide's enter already writes; the rail's NavItem and the palette's navigate write it when they asked). Without the mark the page runs leaveCreate, which asks the card's guard when there is text to lose: Stay keeps the card, Leave closes it. No double question for the guarded click. Tests: 'the rail row clicked while the address is already a bare /members …' and 'a push to /members that nobody guarded still asks …'; frame 05.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: landing effect reads leaveGranted, else asks via leaveCreate

  • An unguarded push now throws away typed text without asking span=93d9d9900f5f — fixed in 7c43fa3

Legitimate: the URL is where the user landed, not proof anyone asked, and CommandBarOverlay's open-crewmates row pushes without asking. The close is now driven by the guard's answer: with leaveGranted on the entry (rail, palette, guide -- each wrote it after its guard agreed) the card closes; without it the page asks the card's own guard via leaveCreate and keeps the card on Stay. Covered by 'a push to /members that nobody guarded still asks before a typed card closes' (the raw-push probe stands in for the command-bar row).

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: leaveGranted state mark on guarded pushes

  • Do the close where the answer is given; or the rail passes a state mark span=b8a0893a7030 — fixed in 7c43fa3

Taken, the second form: the rail (and the palette) pass the existing leaveGranted mark with their push after their guard agreed, and the page acts on the mark. The URL-shape test still selects the landing (which push to look at); it no longer stands in for consent.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: leaveGranted state mark on guarded pushes

  • Item 3 — premise risk: the effect cannot tell whether anything asked span=5b1a15217692 — fixed in 7c43fa3

The premise is now carried explicitly: a caller that asked marks its push with leaveGranted (rail, palette; the guide's enter already did), and an unmarked push to a bare /members -- the command bar's open-crewmates row, or the rail row at the current address -- makes the page ask the card's guard itself through leaveCreate. Declared in the body's What changed table (two new rows) and pinned by two tests.

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: landing effect reads leaveGranted, else asks via leaveCreate

  • Palette open-crewmates at a bare /members drops a typed draft unasked span=84c72a0aa725 — fixed in 7c43fa3

Taken as suggested: an explicit grant, not the push's shape. NavItem and the palette's navigate pass state: { leaveGranted: true } after their guard passed; the Crewmates page closes the card at once only on that mark and otherwise asks through leaveCreate. A same-address palette jump carries no mark (it asked nothing), so the page asks; a create in flight is left, not blanked, and leftCreateRef is set on both paths exactly as leaveCreate does.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 13, 2026
@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) October 13, 2026 07:09

@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: 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.

@KiroCrewCaptain
KiroCrewCaptain merged commit db5e5ce into main Oct 13, 2026
102 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/crewmate-wizard-exit-no-phantom-draft-19381 branch October 13, 2026 07:10
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 13, 2026
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.

ux(members): Every way out of this wizard asks me to throw away a crewmate draft that I did not create…

2 participants