Repository navigation
fix: show the session color field in the mate editor - #31999
Conversation
The mate editor lost its Session color field when the New editor replaced the classic dialog, so a mate's color could only be picked at create time. useCrewEditor still loads, dirty-tracks and saves session_color, so render the shared SessionColorField on General under Display name. Tests cover changing and clearing the stored color. Closes #29823
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: this puts back an editor field the classic-dialog replacement dropped. The state, save path and endpoint were already wired, and issue #29823 records the defect. What this change shipsInventory (3 items) — 3 justifiedIntent: let a person change or clear a mate's session color after creating the mate. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 35ae7e3 Description read[DESCRIPTION-READ] 4a7ddf5e2b6b8c95b3224bce269b7f324742091f2e3053d08aebace6b6977f73 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS No blocker: the blind reader correctly identified the swatches, the hex box and Clear, and would use them. This PR only renders the existing field again, with its copy unchanged. Notes
[UX-REVIEWED] 35ae7e3 Description read[DESCRIPTION-READ] ae6b047f7eb62045f9771f11336822e66d5312cc8d4139d65c7ae7f257f0ade8 That sha256 names everything this verdict read: the PR description, plus the 6 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 |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. The editor hook already loads, tracks and saves Notes
[DESIGN-REVIEWED] 35ae7e3 Description read[DESCRIPTION-READ] 4ce70c0159d9098b6d5b08dfb4b16d3c7401630880041dce73e0a0bae2dbe04a 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 |
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: |
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: |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved for the on-call. Review lanes pass on 35ae7e3, no conflict, no open change request.
The mate editor lost its Session color field when the New editor replaced the classic dialog, so a mate's color could only be picked at create time. useCrewEditor still loads, dirty-tracks and saves session_color, so render the shared SessionColorField on General under Display name. Tests cover changing and clearing the stored color. Closes #29823 (cherry picked from commit ab6df81)
Problem / Motivation
Goal: A mate's session color can be changed or cleared from the mate editor, not only picked when the mate is created.
The create dialog has a Session color field with 12 swatches, and the stored color works in chat. Open the same mate's editor and no section shows the color, so there is no way to change or remove it afterwards.
Why it matters
Anyone who picked a color at create time, or wants one on an existing mate, is stuck with what they have. The only way out is editing
config.jsonby hand or deleting and recreating the mate.Not a goal
triggers, which the editor also loads and saves but which the crew spec records as having none.session_color.What changed (motivation → approach → change)
The field went missing when the New editor replaced the classic dialog (#19257). The editor hook
useCrewEditornever lost it: it still loadssession_colorfrom the record, marks the editor unsaved when it changes, and sends it on Save.So the fix is to draw the field again.
CrewEditorNextDialogrenders the sharedSessionColorFieldon the General section, right under Display name, bound to the hook'ssessionColor/setSessionColor. It uses the same Bot-worded hint as the create dialog.Backwards compatibility
Compatible: Save already sent
session_color(the stored value, unchanged); it now sends whatever the user picks, through the same validated endpoint.Removes nothing: the change only adds a field to the editor.
Tests
website/src/test/CrewEditorNextDialog.test.tsx"shows the stored session colour on General and saves a changed one": the editor shows the stored hex, and Save sends the new one assession_color.session_color: ''.Both fail on
origin/main(the field is not rendered) and pass here.Proof: not provable -- frontend test (prove.py runs Python only)
Determinism: the whole file (58 tests) passed 5 runs in shuffled order (
--sequence.shuffle, seeds 1 to 5).Manual verification
Built the dashboard and opened a stored mate's editor in a headless browser with the API stubbed: General shows Session color with the stored swatch ringed, and picking another swatch shows the unsaved-changes note and enables Save. Screenshots below, dark and light.
Screenshots / video
Stored color, dark:
After picking another swatch, dark (unsaved note, Save enabled):
Stored color, light:
Related Issues
Closes #29823
Sibling sweep
Swept: git grep -nE "SessionColorField|setSessionColor|setTriggers|TriggersField" -- website/src
Sibling: website/src/pages/members/NewCrewmateDialog.tsx -- not affected -- the create dialog already renders the field
Sibling: website/src/pages/KiroCrewAgentsPage.tsx -- not affected -- re-exports the field, renders no editor of its own
Sibling: website/src/components/crew/useCrewEditor.ts -- not affected -- the other unrendered field, triggers, is recorded in docs/system-specs/modules/crew-mode.md as having no editing surface
Pattern harvest
Not generalizable: one field was dropped when one dialog replaced another; the hook kept the state, so no rule would have caught a missing render of an otherwise wired field.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)