Repository navigation
fix(members): flag a taken crewmate name on step 2 of the wizard - #19635
bolichen97 wants to merge 1 commit into
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] 3167dde Description read[DESCRIPTION-READ] f9d4fde5d0a133c367ed16735bfd17370dbfbbb6b0b7926e563002439e13d1fa 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) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The roster-failure notice on step 2 rides along: if the roster read fails, the server's 409 already catches a taken name, so this notice prevents no failure. Not justified as shipped
What this change shipsInventory (6 items) — 5 justifiedIntent: let a user see on step 2 that a crewmate name is taken, before filling in step 3 — FIX (#19380).
[FIRST-PRINCIPLES-REVIEWED] 3167dde Description read[DESCRIPTION-READ] 73dc99e8a37c91b75d46220e0a18f0634257d893a4864605bdb5b483c2cfad0e That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS The taken-name hint, which blocks Next, is quiet grey text, while the roster error, which blocks nothing, is loud red. The reader called the hint "easy to miss." Watch
Suggestions
[UX-REVIEWED] 3167dde Description read[DESCRIPTION-READ] 68673e12b8717191ae977b43aa7a1ba2271a474a3227ecfe1d71c671f386432c That sha256 names everything this verdict read: the PR description, plus the 7 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: |
2882bb0 to
6f8fd4d
Compare
|
6f8fd4d to
1b9bd47
Compare
|
|
|
|
|
|
|
The new-crewmate wizard let a name the roster already lists go on to step 3, and only Create bounced the user back with the taken-name notice. Step 2 now reads the members roster (the same names the Crewmates page's own create dialog checks) and shows that notice under the name field with Next off, before any request. The server's 409 stays the backstop and refreshes the roster. The notice and the two other wizard strings named the page by an old name, "Crew Members page"; they now say "Crewmates page" (each locale uses its own page title). Closes #19380
1b9bd47 to
3167dde
Compare
|
Closing as superseded by #18805 (merged 8635bc6): it removed the multi-step wizard this PR changes ( |
Pull request was closed
Problem / Motivation
Goal: The new-crewmate wizard says a name is taken on step 2, where the user types it, instead of only after Create.
The wizard let a user type "Radar" when a crewmate named Radar already existed and go on to step 3. Only after clicking "Create Radar" did it bounce back to step 2 with "A crewmate named Radar already exists". That notice also sent the user to the "Crew Members page", an old name for the page the rail now calls Crewmates.
Why it matters
A first-time user fills in a whole step for a name that can never be saved, then gets sent back. The nightly GUI user test rated this a blocker. The old page name points at a page the user cannot find in the rail.
Not a goal
members.key_new_crew); its 409 stays the final word.NewCrewmateDialog), which already checks the roster.What changed (motivation → approach → change)
The wizard (
website/src/components/MeetCrewmatesFlow.tsx) never read the roster, so it could not know a name was taken until the server said so. It now reads the same roster query the Crewmates page uses (membersRosterQuery) and checks the typed name against every key and label there, the same exact checkNewCrewmateDialog.tsxalready makes and the server'smembers.crew_showingapplies. A roster match is a plain validation hint (nothing failed), while the server's 409 keeps itsErrorNotice. A failed roster read (first load or a refresh over cached rows) renders an inlineErrorNoticewith no agent hand-off, since the typed draft is unsaved; the server's refusal stays the backstop.The three wizard strings that named the old page (
error_name_taken,error_create_unknown,open_crewmates) now name the Crewmates page inwebsite/src/i18n/locales/en.manual.jsonand in every locale file, using each locale'spages.membersPage.title;en-XA.jsonis regenerated withnpm run i18n:pseudo.Backwards compatibility
Compatible: the wizard only refuses earlier a name the server would refuse anyway; every name that worked still works.
Removes nothing: no key, route or behaviour is taken away; three strings change wording.
Tests
website/src/components/MeetCrewmatesFlow.test.tsx: new test "a name the roster already lists is flagged on step 2 and Next stays off, before any create" (a label and a bare key on the roster are both taken; the hint is not an alert and is the field's description; Enter does not advance; a free name clears it and reaches step 3 with no create call). It fails onorigin/main(nothing flagged on step 2) and passes here.--sequence.shuffleone existing test ("a guided create waits for the guide to catch up") fails with any seed on cleanorigin/maintoo: aguideSave.synccall count leaks between tests. Not touched by this PR.run_scoped_tests.py --surface frontend, 26 files) green;tsc -p tsconfig.app.json, eslint,i18n:checkandlint:i18nexit 0.Manual verification
Built the SPA from
origin/mainand from this branch and drove the wizard from the Crewmates page in Playwright with a stubbed roster holding "Radar" and a stubbed 409 on create.Screenshots / video
Before: step 2 with a taken name, Next is on.
Before: only after Create does the wizard bounce back, naming the "Crew Members page".
After: step 2 flags the taken name at once as a hint, Next is off, the hint names the Crewmates page.
After: a roster that cannot be read says so; the name is left to Create.
Related Issues
Closes #19380
Pattern harvest
Not generalizable: one wizard skipped the roster check its sibling create dialog already makes; there is no shared create form to lint for.
Checklist