Skip to content

fix(crewmates): accept any crewmate name in meet crewmates - #15085

Merged
iamwhatever merged 1 commit into
mainfrom
fix/meet-crewmates-free-form-name
Sep 29, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
fix/meet-crewmates-free-form-name

Conversation

@buluoray

@buluoray buluoray commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Meet CrewMates accepts any crewmate name the server accepts, such as "Issue Radar" or a CJK name.

Typing a name with a space, a CJK character, or a leading hyphen on step 2 greys out the avatar, shows "Use letters, numbers, - and _ only; start and end with a letter or number." and disables Next. That rule is stale: since #14865, POST /api/agents keeps a free-form name as the crew's label and derives an id-shaped key from it (members.key_new_crew), and invalid_agent_name no longer exists anywhere in the backend.

Why it matters

The onboarding flow for a new user refuses the most natural names ("Issue Radar", "小明") that every other create surface accepts, so the first crewmate a user makes is forced into a slug.

Not a goal

  • Changing the server's name rules (validate_member_name) or how a crew id is derived.
  • Changing the 24-character input cap or the suggested-name chips.

What changed (motivation → approach → change)

  • Symptom: the flow refused free-form names. Root cause: MeetCrewmatesFlow.tsx still carried a copy of the old _AGENT_NAME_RE from before crews were keyed by an id.
  • isValidCrewmateName now only refuses a blank name; the typing-time hint, the greyed avatar and aria-invalid for it are gone.
  • The server is the gate: a 400 invalid_member_name or credential_shaped_name returns the user to step 2 with "This name can't be used. Pick a different one." under the field (new key error_name_unusable in all 13 locales, replacing error_name_shape). The 409 agent_exists handling is unchanged.
  • The server keys a free-form name by a derived id (Issue Radar -> issue-radar) and returns it as name. The flow now holds that key and uses it for the ready step's avatar and for Open chat's /members?member= link; the typed text stays the label everywhere it is read.
  • Create pins the face step 2 previewed (avatar: {kind: 'ghost', traits: seededTraits(<typed name>)}). The roster draws an unpinned crew from its config key, so without the pin a free-form crewmate would wear a different face from the one shown while naming it. The ready step renders the same pinned face.
  • test/test_meet_crewmates_builtin_pin.py only kept the removed regex copy in step with the backend, so it is deleted. The config spec paragraph is updated, and rfc-crewmates-launch.md screen 08 gets a dated amendment recording that the name is free-form and validate_member_name is the gate.

Backwards compatibility

Compatible: the flow now accepts a superset of the names it accepted, and every one of them is accepted by the server today.

Tests

  • MeetCrewmatesFlow.test.tsx: "Issue Radar", "雷达" and "-radar" enable Next, show no hint, and are posted as typed; a blank name disables Next; both server name-refusal codes land under the name field on step 2; isValidCrewmateName only refuses blank; Open chat navigates to the server-derived key (/members?member=issue-radar), not the typed label (fails with the label). The new free-form and refusal-code tests fail against origin/main's flow (6 failures).
  • Flow tests (35) and i18n tests (729) pass; tsc, eslint and docs-lint are clean.

Manual verification

Against an isolated test-mode gateway built from this branch at 390x844: typed "Issue Radar", went through to Create. POST /api/agents answered 200 with id issue-radar, the schedule was created bound to that member id, and step 4 read "Issue Radar is ready".

Screenshots / video

Step 2 with "Issue Radar", before (origin/main) and after, 390px wide:

before: hint shown, avatar greyed, Next disabled

after: no hint, Next enabled

Step 2 after the server refuses a name (credential_shaped_name forced on POST /api/agents), 390x664:

refused: "This name can't be used. Pick a different one." under the name field

"Issue Radar" end to end against an isolated gateway built from this branch, 390x664: step 2, the ready step, and Open chat landing on the crewmate (/members?member=issue-radar). The face is the same in all three.

step 2 with Issue Radar

step 4 ready, same face

Open chat lands on Issue Radar's chat, same face

Related Issues

Follows #14865.

Pattern harvest

Not generalizable: a single client-side copy of a server rule that the server later relaxed; the pin test that guarded it compared against the old regex, not the create route.

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

N/A — placeholder pending OSPO.

@buluoray
buluoray requested a review from a team September 29, 2026 18:31
@buluoray
buluoray requested a review from a team as a code owner September 29, 2026 18:31
@buluoray
buluoray requested a review from kyleseaman September 29, 2026 18:31
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 29, 2026
@buluoray
buluoray force-pushed the fix/meet-crewmates-free-form-name branch from 5f0090e to dfa90d4 Compare September 29, 2026 19:01
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 07f78b2b1b4fbe9cf3cad621dafe48cddf026b94 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 07f78b2

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

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

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

Design-Verdict: PASS

Verify the pinned seededTraits(label) avatar reads acceptably as a "customized" face (hasAvatarOverride true) in the avatar builder's reset affordance.

[DESIGN-REVIEWED] 07f78b2

Description read

[DESCRIPTION-READ] 6b8e29b8103db0a5e2a611f6a9ec4d152786d4e7cba5ac2ad4a91dbf4cb6d81d

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 Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of 07f78b2b1b4fbe9cf3cad621dafe48cddf026b94 — 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

Verify one rider effect: every flow-created crewmate now persists a pinned ghost face, so a later rename keeps the face drawn from the originally typed name.

The core claims check out in the repo: invalid_agent_name is absent from src/ (only two stale backend-test names remain), POST /api/agents validates via validate_member_name/key_new_crew and returns the derived key as name (agents.py:5196), roster surfaces seed an unpinned crew from its config key (KiroCrewAgentsPage.tsx:733), and no other frontend copy of the old name grammar exists (grepped [A-Z_]*NAME_RE across website/src: 0 siblings). The deleted pin test's own premise ("POST /api/agents refuses a crew name that fails validation._AGENT_NAME_RE") is false on base, so the deletion is evidenced, and the description declares it.

What this change ships

Inventory (9 items) — 9 justified

Intent: Let the Meet CrewMates onboarding accept any crewmate name the server accepts. FIX.

  1. Step 2 accepts spaces, CJK and leading hyphens; Next enables — justified
  2. The typing-time grammar hint, greyed avatar and aria-invalid are gone — justified
  3. Server name refusal now reads "This name can't be used…" in all 13 locales — justified
  4. The flow handles the server's two current refusal codes, not the defunct one — justified
  5. Open chat addresses the crewmate by the server-derived key, not the typed label — justified
  6. Every crewmate created here now carries a pinned face from the typed name — justified
  7. The ready step draws that same pinned face — justified
  8. The regex-copy pin test is deleted — justified
  9. config.md and the accepted crewmates RFC record the free-form rule — justified

[FIRST-PRINCIPLES-REVIEWED] 07f78b2

Description read

[DESCRIPTION-READ] 6793ecc6a8a8ebad096a65b1234f2ad0edc16b0c27f8a0c4690b136cb8e76767

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 Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — 🟡 CONCERNS

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

UX-Verdict: CONCERNS

Server name refusals give no reason: both 400 codes collapse into "This name can't be used," leaving the user guessing which names work.

Watch

  • Refusal reason discarded: agents.py:4925-4935 returns "looks like a credential or a URL carrying one," but MeetCrewmatesFlow.tsx maps both credential_shaped_name and invalid_member_name to the single error_name_unusable string — the blind reader on shot-03: "it doesn't say why the name is bad… I cannot tell what actually makes a name unusable." With the typing-time rules line gone, a refused user has zero guidance and retries blind. Low frequency (credential-shaped pastes, hidden characters) × moderate friction × every retry. Fix: split into two locale keys so the credential case says why ("This name looks like a credential. Pick a name that describes the crewmate.").

Suggestions

  • error_name_taken says "Pick another name" while the new error_name_unusable says "Pick a different one" — align the two sibling errors on one phrasing.

[UX-REVIEWED] 07f78b2

Description read

[DESCRIPTION-READ] 8fb915b68e4ec11863bc0cc0bbbb0f601658be717c660102e2d3fff1cba3b238

That sha256 names everything this verdict read: the PR description, plus the 9 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 Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

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

Review details

Nothing blocks: the candidate defects were all either unreachable on the current backend or cosmetic; one spec-accuracy gap remains advisory.

FINDING — docs/system-specs/modules/config.md:3002 — the owning spec's Meet CrewMates section, edited by this PR for the free-form name, still says member_id "is the one thing the flow binds to or reconciles against later" and describes the create step as posting only the crewmate plus description, while MeetCrewmatesFlow.tsx now also holds the response's name (setCreatedKey, navigated by openChat) and posts a persisted avatar: { kind: 'ghost', traits: seededTraits(crewmate) } → Fix: in the same paragraph, add that the flow holds the create answer's name as the crew's derived key (step 4's avatar seed and the Open-chat URL, while the label stays as typed) and pins the previewed ghost traits on create so the roster shows the face the user named.

[OPUS-REVIEWED] 07f78b2

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

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

@buluoray
buluoray force-pushed the fix/meet-crewmates-free-form-name branch from dfa90d4 to 1ec78fe Compare September 29, 2026 20:03
@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 Sep 29, 2026
@buluoray
buluoray force-pushed the fix/meet-crewmates-free-form-name branch 2 times, most recently from 76b6df0 to 0367092 Compare September 29, 2026 21:03
@buluoray

Copy link
Copy Markdown
Contributor Author

Opus 5 BLOCKING (MeetCrewmatesFlow.tsx:390, open chat navigates by typed label): fixed in 0367092. The create response's name (the derived key, e.g. issue-radar) is held as createdKey and drives Open chat's /members?member= link and the ready-step avatar seed; the typed text stays the label. New test "open chat addresses the crewmate by the key the server derived" fails with the label.

@buluoray

Copy link
Copy Markdown
Contributor Author

Opus 5 FINDING (hi.json error_name_unusable formal register): fixed in 0367092. Now कोई दूसरा नाम चुनो।, matching error_name_taken.

@buluoray

Copy link
Copy Markdown
Contributor Author

Opus 5 FINDING (rfc-crewmates-launch.md:280 still records the name grammar): fixed in 0367092. Added a dated 2026-09-29 amendment under screen 08: the name is free-form and validate_member_name is the gate. The earlier amendment is left as history.

@buluoray

Copy link
Copy Markdown
Contributor Author

UX BLOCK (missing screenshot of the refusal state): fixed. The description now carries step 2 after a forced credential_shaped_name refusal at 390x664, with "This name can't be used. Pick a different one." under the field. The "Greyed while the name fails the grammar" comment is removed in 0367092. Per-code refusal copy (Watch) is deferred: both codes are rare server-side refusals and one message keeps the credential heuristic undisclosed.

@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 Sep 29, 2026
@buluoray
buluoray force-pushed the fix/meet-crewmates-free-form-name branch from 0367092 to d8c7ca5 Compare September 29, 2026 21:43
@buluoray

Copy link
Copy Markdown
Contributor Author

UX BLOCK (missing step-4 ready screenshot): fixed. The description now carries "Issue Radar" end to end against an isolated gateway built from this branch at 390x664: step 2, the ready step, and Open chat landing on /members?member=issue-radar.

@buluoray

Copy link
Copy Markdown
Contributor Author

UX Watch (step-2 face differs from the permanent one for free-form names): fixed in d8c7ca5, by pinning rather than mirroring the slug. Create now sends avatar: {kind: 'ghost', traits: seededTraits(<typed name>)}, so the face previewed in step 2 is the one stored. The ready step, the roster and the crewmate's chat all render it; the three new screenshots show the same face. Mirroring crew_id_for_display_name on the client was not used: its hash fallback for CJK names and the -2 suffixes against taken ids make the preview key unknowable before create. Test: the create body carries the pinned traits (fails without the pin).

@buluoray

Copy link
Copy Markdown
Contributor Author

UX Watch (one message for both refusal codes): deferred. Both codes are rare server refusals of names the flow otherwise accepts, and a per-code string means a new key in all 13 locales. Out of this PR's goal (letting free-form names through); happy to follow up if a maintainer wants it.

@buluoray

Copy link
Copy Markdown
Contributor Author

UX Watch (the chat header shows both "Issue Radar" and "issue-radar"): deferred to the maintainer. The header is outside this diff, and it already renders that way for any crew with a display name, whichever surface created it. The refusal-copy item is the same one answered above (deferred: per-code copy is out of this PR's goal).

POST /api/agents keeps a free-form name as the crew's label and derives
an id-shaped key from it, so the flow's copy of the old agent-name
regex blocked names the server accepts, such as "Issue Radar" or a CJK
name. Next is now disabled only on a blank name, and the server's
invalid_member_name and credential_shaped_name refusals land under the
name field with a generic "can't be used" message.
@buluoray
buluoray force-pushed the fix/meet-crewmates-free-form-name branch from d8c7ca5 to 07f78b2 Compare September 29, 2026 22:36
@buluoray

Copy link
Copy Markdown
Contributor Author

UX Suggestion (align "Pick another name" in error_name_taken with "Pick a different one" in error_name_unusable): deferred. Cosmetic, and it touches 13 locales for no behaviour change; it can ride along with the per-code refusal copy already deferred above. The refusal-reason Watch on 07f78b2 repeats that deferred item with no new content.

@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Sep 29, 2026
@github-actions github-actions Bot added the readiness: passed Eligible automated validation passed for the current revision label Sep 29, 2026
@iamwhatever
iamwhatever merged commit 25d5bbd into main Sep 29, 2026
97 checks passed
@iamwhatever
iamwhatever deleted the fix/meet-crewmates-free-form-name branch September 29, 2026 23:30
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.

2 participants