Skip to content

fix(crew): default new mates to an icon and retire new ghost-face authoring - #20392

Merged
iamwhatever merged 1 commit into
mainfrom
fix/crewmate-default-icon-avatar
Oct 16, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
fix/crewmate-default-icon-avatar

Conversation

@dodgeblaster

@dodgeblaster dodgeblaster commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A new crewmate is born wearing an icon avatar, and nobody can author a new ghost-face avatar in the create or edit flow.

Creating a crewmate without opening the avatar editor stored no avatar, so the mate fell back to the name-derived ghost face — the very face the icon tier was meant to replace. And the avatar editor still offered the "Ghost face" tab, letting anyone build a new 捏脸 ghost.

Why it matters

New mates looked like the retired ghost even though the product moved to icon avatars (#16232), and the ghost-face authoring UI the icon tier was meant to supersede was still reachable. Left alone, every new mate reads as the old style and the deprecated builder keeps producing more ghost records.

Not a goal

  • Removing the ghost data model, its readers or its rendering — every existing ghost avatar must keep displaying and stay editable.
  • Touching the Picture or Library tiers.
  • Changing the icon art model — the icon tier stays the curated fixed pose set; only the engine that picks the name-typed default changed.

What changed (motivation → approach → change)

A new mate stored no avatar unless the user picked one, so it wore the name's ghost. Now a create defaults the look to a name-seeded icon — a pose and a background colour derived from the name — shown in the create preview and stored on create, so the mate is born as an icon, not a ghost. When the editor is opened from create without a pick, its fresh draft seeds pose AND colour from the name — the same icon the create preview shows — so an un-touched Apply saves exactly what the user was looking at; the explicit-pick path and the edit-an-existing-crew path (which has no name, and still seeds the colour from the active theme accent) are unchanged.

The name-to-default seeding runs through DiceBear's seeded prng, the same generation mechanism the ghost tier already uses, instead of a bespoke djb2 hash. The icon tier is unchanged otherwise: still one curated pose per avatar from the fixed set, still the fixed background palette, same stored record. Only the engine behind the name-typed default moved.

The avatar editor (components/CrewAvatarBuilder.tsx) still had a Ghost face tab that authored a new trait ghost. The tab is now shown only when the crew already wears a ghost, keyed off the stored record so an existing ghost mate keeps the tab even after visiting another tier. A new icon, picture or pack crew has no path to author a ghost, and nothing about the ghost data model, its readers, or kiroGhostAvatar changed, so every stored ghost avatar still renders and stays editable.

Backwards compatibility

Compatible: no stored avatar shape changes; existing ghost records render and edit exactly as before. New mates gain a stored icon avatar they did not have, which the server already accepts (_safe_avatar). The Ghost face tab is hidden for non-ghost crews but preserved for crews that already wear a ghost. Un-customized default icons may map to a different pose/colour than before, because the seeding engine changed; a stored or user-picked avatar is untouched.

Tests

  • avatarPoses.test.ts: seedIconPose / seedIconBg suites assert the contract that holds across the engine swap — palette and pose-set membership, stability per name, empty-name fallback, spread across distinct names, and pose/colour decorrelation.
  • NewCrewmateDialog.test.tsx: a no-pick create sends a name-seeded icon avatar (pose + hex bg); the untouched editor previews the icon, not the trait ghost.
  • CrewAvatarBuilder.test.tsx / .reactions.test.tsx / .library.test.tsx: the Ghost face tab is absent for a non-ghost crew and present for an existing ghost crew; the removed pack/picture→ghost authoring paths are converted to assert the tab is gone.

Manual verification

Verified in a Dev Fleet pod: creating a mate without opening the editor shows a coloured icon (not a ghost); the colour and pose shift with the typed name; the Customize avatar dialog shows Icon · Picture · Library with no Ghost face tab for a new mate.

Screenshots / video

createnewmate createnewmatesettings editicon manymatesicons

Issue link

Part of #18616

Pattern harvest

Rule candidate: When a change hides or removes a UI authoring path, grep every test (not just name-matched ones) that reaches that path and update or convert it — a diff-scoped local runner skips consumer tests whose filenames don't match the changed module, and CI's full shard is where they surface.

Pattern: This fix hid the Ghost face tab and changed the create default; the local scoped runner was green while CI's Frontend Tests (4) shard failed on CrewRoster.test.tsx and MembersPage.test.tsx — consumers of the changed avatar modules that reach the removed tab or assert the old no-avatar contract.

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ human override accepted

@dodgeblaster overrode this lane for ce080fe4c7358ab5dfa1a4d747d3bedb17e07a72 via /ai-review override (this commit only).

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — 🟡 CONCERNS

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

Design-Verdict: CONCERNS

The icon default is only applied by two frontend callers, so crewmates created by the backend (first-run crewmate, CLI agent create) are still born wearing the ghost face.

Watch

  • Default set in the frontend, not where crewmates are created. The diff adds avatar: effectiveLook in NewCrewmateDialog and avatar: defaultLookFor(row.name) in AgentTemplatesTab. But a missing avatar still renders as the ghost face, and the other create paths never send one. agent_materialization/first_crewmate.py:create_first_crewmate_once builds the first crewmate "the way every crewmate is (the CLI's agent create …)" and sends no avatar. So on a fresh install the very first crewmate is born a ghost, and so is every crewmate made from the CLI. That misses the stated goal, "A new crewmate is born wearing an icon avatar." The fix is one name-seeded icon default at the backend create step (crew_records create / persist_member_config(create=True)), not a copy at each UI caller.
    Clears when: the default is applied server-side for every create path, or the description narrows the goal to dashboard-created mates and names first-run and CLI as out of scope.
  • Reset now saves an icon instead of clearing the avatar, and the description doesn't mention it. For a crew that has no ghost, "Reset avatar and reactions to default" now saves a concrete name-seeded icon instead of null (if (resetToDefault && wearsGhost) return null). After that, the crew can never go back to "no stored avatar". That is a change to what an existing control does in the edit flow, and the description's what-changed and Backwards compatibility sections don't cover it.
    Clears when: the description and crew-mode.md state the new Reset behaviour for non-ghost crews.

[DESIGN-REVIEWED] ce080fe

Description read

[DESCRIPTION-READ] b3d947dda9ad0e31ab8f3858a4045f26eab069ef6f42e045650944ff05104454

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 14, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings that block the merge.

FINDING — website/src/components/CrewAvatarBuilder.tsx:440 — wearsGhost = useMemo(() => tierOf(value) === 'face', [value]) is computed from the draft value (value={editAvatar}, which setEditAvatar(next) overwrites on Apply), not from the saved record that its comment names. So a ghost crew that switches to Icon, presses Apply, and reopens the builder before saving loses the Ghost face and Reactions tabs. Its Reset also commits an icon instead of null, so the crew can't get back to its own face without cancelling the whole editor → Fix: work out wearsGhost from the saved avatar (editingAgent?.avatar, passed in the way retiredCue and savedReactions already are). This needs a new prop and edits at the call sites in CrewEditorDialog.tsx and KiroCrewAgentsPage.tsx.

[OPUS-REVIEWED] ce080fe

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

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

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — 🟡 CONCERNS

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

UX-Verdict: CONCERNS

The new default icon changes colour and pose as the user types the name, and the blind reader read that as random.

Watch

  • Icon reads as random. The tile's look comes from defaultLookFor(name), so pose and colour are reseeded on every keystroke. Shot-01 shows a green upright ghost and shot-02 a turquoise ghost in a different pose. The blind reader said: "I can't tell why it changed. It may pick one at random each time." This hits every create and the reader's reading was only "a guess", so it is friction, not failure. Smallest fix: one line of helper text under the tile, such as "Picked from the name — click the pencil to change it."
  • "Reactions" now names nothing for new mates. This PR hides the Ghost face and Reactions tabs for any crew that doesn't already wear a ghost. The reset link still says "Reset avatar and reactions to default". The reader in shot-03 said: "I don't know what 'reactions' means here… I'd be a bit wary." Every new mate's editor shows this, so it is persistent but minor.

Suggestions

  • When !wearsGhost, change the label on avatar-builder-reset to "Reset avatar to default".

[UX-REVIEWED] ce080fe

Description read

[DESCRIPTION-READ] 9c4445a555e0455a54875e6e20b074c251f7f6041b75b10cf18406a7498be6e3

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

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] ce080fe

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

@dodgeblaster
dodgeblaster force-pushed the fix/crewmate-default-icon-avatar branch from ed6731b to 44225ee Compare October 14, 2026 17:51
CrysisDeu
CrysisDeu previously approved these changes Oct 14, 2026
@dodgeblaster
dodgeblaster force-pushed the fix/crewmate-default-icon-avatar branch from 44225ee to 34ba31e Compare October 14, 2026 18:00
@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 Oct 14, 2026
@dodgeblaster
dodgeblaster force-pushed the fix/crewmate-default-icon-avatar branch from 34ba31e to 80250b5 Compare October 14, 2026 19:19
@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 Oct 14, 2026
@dodgeblaster
dodgeblaster force-pushed the fix/crewmate-default-icon-avatar branch 3 times, most recently from e313e85 to ddf5c67 Compare October 14, 2026 20:18
@dodgeblaster

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles ddf5c67: agent: team decision — default-to-icon and retiring new ghost-face authoring follow accepted #16232 (icon tier supersedes the ghost builder); the djb2->DiceBear seeding swap is a deliberate team choice to reuse the ghost tier's generation mechanism. The theme-accent-seed and duplicate-palette defects it flagged are fixed in this head.

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@dodgeblaster marked the first-principles AI finding as false positive, not applicable, or explicitly accepted for ddf5c67e94ae0582df2d1ea15553ae23eef15c8e.

agent: team decision — default-to-icon and retiring new ghost-face authoring follow accepted #16232 (icon tier supersedes the ghost builder); the djb2->DiceBear seeding swap is a deliberate team choice to reuse the ghost tier's generation mechanism. The theme-accent-seed and duplicate-palette defects it flagged are fixed in this head.

This decision applies only to this commit. A new push requires a new judgment.

@dodgeblaster
dodgeblaster force-pushed the fix/crewmate-default-icon-avatar branch from ddf5c67 to c1458a7 Compare October 14, 2026 21:00
@dodgeblaster

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles c1458a7: agent: team decision — default-to-icon and retiring new ghost-face authoring follow accepted #16232; the djb2->DiceBear seeding swap is a deliberate team choice (seeding engine only, curated icon art model unchanged). This head additionally fixes the UX-flagged create/editor colour mismatch: the editor's un-picked icon draft now seeds its colour from the name (matching the create preview) so an untouched Apply saves the icon shown, per the product rule that name-seeding is a default an explicit pick overrides, frozen into a stored choice at create and never re-rolled on later rename.

@github-actions

Copy link
Copy Markdown
Contributor

AI-review override not recorded: keep the reason to 500 characters or fewer.

@dodgeblaster
dodgeblaster force-pushed the fix/crewmate-default-icon-avatar branch from c1458a7 to bec089f Compare October 14, 2026 21:56
@dodgeblaster

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles bec089f: agent: team decision — default-to-icon and retiring new ghost-face authoring follow accepted #16232; the djb2->DiceBear seeding swap is a deliberate team choice (seeding engine only, curated icon art model unchanged). This head also closes the GPT+Opus-flagged reset path (a non-ghost crew Reset no longer lands on the ghost trait builder, so Reset is not a route to author a new ghost), fixes the UX create/editor colour mismatch (editor un-picked icon colour now seeds from the name, matching the create preview), and updates crew-mode.md in the same commit per the same-commit spec rule.

@github-actions

Copy link
Copy Markdown
Contributor

AI-review override not recorded: keep the reason to 500 characters or fewer.

@dodgeblaster

Copy link
Copy Markdown
Contributor Author

Rebased onto fresh main (4b135be1) at head 4d5af1bf to re-sync green against the updated docs/system-specs/modules/crew-mode.md (a spec this PR edits). Clean rebase, no conflicts; 518 related frontend tests green, tsc clean. No code change — bookkeeping/freshness only.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running labels Oct 15, 2026
@dodgeblaster

Copy link
Copy Markdown
Contributor Author

@crew-pr-reviewer could you re-review the current head 4d5af1bf? Both points from your CHANGES_REQUESTED review are addressed on this head:

  1. Reset preview ≠ save (non-ghost crews). resetToDefault now returns null only when the crew already wears a ghost. A non-ghost crew's Reset falls through to the previewed name-seeded icon, so preview and save agree and it never lands on a ghost. Existing ghost crews are untouched (Reset → null → their own face).

  2. Other create paths birthing ghosts. The template-enroll path now seeds a name-seeded icon via a shared defaultLookFor helper lifted into avatarPoses.ts (the dialog uses it too — one source of truth). CLI/raw-API backend seeding is tracked separately as Default headless crew-create (CLI, raw API) to a name-seeded icon, not the trait ghost #20865.

CI is green on this head (GPT fresh, Opus fresh, Design/UX green, backend shards cleared after the rebase onto the test_acp_bindings fix). Thanks!

@dodgeblaster
dodgeblaster force-pushed the fix/crewmate-default-icon-avatar branch from 4d5af1b to 2d18e81 Compare October 16, 2026 03:20
@dodgeblaster

Copy link
Copy Markdown
Contributor Author

@kirocrew-agent /ai-review override first-principles 2d18e81: This is a frontend-only PR (zero .py in the diff). The RFC-status First Principles finding is not applicable to this change; the referenced RFC is accepted/in-progress on main. Override posted on the current head.

@dodgeblaster

Copy link
Copy Markdown
Contributor Author

Rebased onto fresh main (b9d1104c) to clear a main-owned backend red (the test_dashboard_server_composition_contract lazy-import census 83→84 break, fixed on main by #20930). No code change — head 4d5af1bf → 2d18e8126a, single commit, 519 related frontend tests green, tsc clean.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 16, 2026
…horing

A new crewmate is born wearing an icon avatar instead of the name-derived
ghost fallback, and the Ghost face authoring tab is hidden for crews that do
not already wear a ghost (existing ghost mates keep rendering and editing).

The new mate's default icon pose and background are seeded from its name
through DiceBear's seeded prng -- the same generation mechanism the ghost
tier uses -- rather than a bespoke djb2 hash. The icon tier stays the curated
fixed pose set; only the seeding engine behind the name-typed default changed.
@dodgeblaster
dodgeblaster force-pushed the fix/crewmate-default-icon-avatar branch from 2d18e81 to ce080fe Compare October 16, 2026 18:55
@dodgeblaster

Copy link
Copy Markdown
Contributor Author

agent: /ai-review override lane=first-principles head=ce080fe4c7358ab5dfa1a4d747d3bedb17e07a72

Posted on behalf of @dodgeblaster (maintainer). The default-to-icon + retire-new-ghost-authoring product-shape change is the team's recorded decision for this PR (follows accepted #16232); the djb2→DiceBear seeding swap is a deliberate team choice (seeding engine only, curated icon art model unchanged). This override clears the First Principles block for this head. Re-posted after a clean rebase onto fresh main (no code change).

@dodgeblaster

Copy link
Copy Markdown
Contributor Author

Rebased onto fresh main (766c658641) at head ce080fe4 to re-sync against main's edits to docs/system-specs/modules/crew-mode.md and website/src/pages/members/MembersPage.test.tsx (both files this PR also touches). Clean rebase — non-overlapping hunks, both sides' edits preserved; 521 related frontend tests green, tsc clean. No code change — bookkeeping/freshness only.

@dodgeblaster

Copy link
Copy Markdown
Contributor Author

@crew-pr-reviewer could you re-review the current head ce080fe4? Both points from your CHANGES_REQUESTED review are addressed on this head:

  1. Reset preview ≠ save (non-ghost crews). resetToDefault now returns null only when the crew already wears a ghost. A non-ghost crew's Reset falls through to the previewed name-seeded icon, so preview and save agree and it never lands on a ghost. Existing ghost crews are untouched (Reset → null → their own face).

  2. Other create paths birthing ghosts. The template-enroll path now seeds a name-seeded icon via a shared defaultLookFor helper (lifted into avatarPoses.ts, one source of truth the dialog uses too). Backend/headless create seeding is tracked separately in Default headless crew-create (CLI, raw API) to a name-seeded icon, not the trait ghost #20865.

Head ce080fe4 is a clean rebase onto fresh main (766c658641), single commit, 521 related frontend tests green, tsc clean. No code change since the last review beyond the fixes above.

@dodgeblaster

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles ce080fe: team decision — default-to-icon and retiring new ghost-face authoring follow accepted #16232; the djb2→DiceBear seeding swap is a deliberate team choice (seeding engine only, curated icon art model unchanged). This head only rebases onto fresh main (766c658); no code change since the prior override.

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@dodgeblaster marked the first-principles AI finding as false positive, not applicable, or explicitly accepted for ce080fe4c7358ab5dfa1a4d747d3bedb17e07a72.

team decision — default-to-icon and retiring new ghost-face authoring follow accepted #16232; the djb2→DiceBear seeding swap is a deliberate team choice (seeding engine only, curated icon art model unchanged). This head only rebases onto fresh main (766c658); no code change since the prior override.

This decision applies only to this commit. A new push requires a new judgment.

@iamwhatever
iamwhatever merged commit 7b03c6a into main Oct 16, 2026
100 of 110 checks passed
@iamwhatever
iamwhatever deleted the fix/crewmate-default-icon-avatar branch October 16, 2026 20:01
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Oct 16, 2026
iamwhatever pushed a commit that referenced this pull request Nov 1, 2026
…2644)

A new crewmate created through the UI gets a name-seeded icon avatar
(#20392), but one created headlessly (POST /api/agents with no avatar, or
`kirocrew agent create`) stored an empty override and rendered the trait
ghost #20392 is retiring. Apply the same default server-side at the shared
create point so every path lands on the same icon.

A new module crew_avatar_seed.py reproduces the frontend's DiceBear-seeded
pick (avatarPoses.ts, @dicebear/core 9.4.3) exactly -- the PRNG, the UTF-16
seed hashing, and the draw sequence createAvatar makes before the pose/bg
pick -- so a given name yields the same icon the UI previews. Both create
paths apply default_icon_avatar(display_name or name) only when no avatar
was supplied; an explicit avatar is never overridden.
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.

5 participants