Skip to content

fix: show the session color field in the mate editor - #31999

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/29823-mate-editor-session-color
Nov 7, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/29823-mate-editor-session-color

Conversation

@bolichen97

Copy link
Copy Markdown
Contributor

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.json by hand or deleting and recreating the mate.

Not a goal

  • Changing the Session color field itself: its swatches, hex box, Clear button and hint text stay as they are.
  • Adding an editing surface for triggers, which the editor also loads and saves but which the crew spec records as having none.
  • Any backend change: the update endpoint already accepts and validates session_color.

What changed (motivation → approach → change)

The field went missing when the New editor replaced the classic dialog (#19257). The editor hook useCrewEditor never lost it: it still loads session_color from the record, marks the editor unsaved when it changes, and sends it on Save.

So the fix is to draw the field again. CrewEditorNextDialog renders the shared SessionColorField on the General section, right under Display name, bound to the hook's sessionColor / 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 as session_color.
  • Same file, "clears the stored session colour and saves the empty value": Clear followed by Save sends 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:

General section with the stored session color, dark theme

After picking another swatch, dark (unsaved note, Save enabled):

General section after picking Red, dark theme

Stored color, light:

General section with the stored session color, light theme

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

  • 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

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
@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 7, 2026 02:19
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 35ae7e3a209a6841dcf1df7221284e2131287da4 — 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 does not.

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 ships

Inventory (3 items) — 3 justified

Intent: let a person change or clear a mate's session color after creating the mate. This is a FIX.

  1. The mate editor's General section now shows the Session color field, under Display name. — justified
  2. Picking a swatch or pressing Clear in the editor is now saved to the mate. — justified
  3. Two tests pin that the field renders and that Save sends a picked or cleared session_color. — justified

[FIRST-PRINCIPLES-REVIEWED] 35ae7e3

Description read

[DESCRIPTION-READ] 4a7ddf5e2b6b8c95b3224bce269b7f324742091f2e3053d08aebace6b6977f73

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 Nov 7, 2026

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 35ae7e3a209a6841dcf1df7221284e2131287da4 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • The blind reader said "'session' means nothing to me" about the hint "Sessions this Bot starts use this colour…". The field's copy is frozen by this PR's Not-a-goal, so this is follow-up work.
  • None of the shots shows the field after Clear (empty hex, no swatch ringed). A shot of that state would show that a cleared field still reads as "no colour".
  • All three screenshots show a cut-off red/pink strip at the bottom-left, which the blind reader called "something hidden behind the window". Check whether the stubbed API raised an error there before you reuse these shots.

[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 .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 Nov 7, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 35ae7e3a209a6841dcf1df7221284e2131287da4 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks. The editor hook already loads, tracks and saves session_color, so drawing the shared field again closes the gap at its root.

Notes

  • The hook files a changed sessionColor under the 'routing' dirty pane (useCrewEditor.ts:844), but the field now shows on General. If a per-pane unsaved marker appears, it may point to the wrong section.

[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 .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 Nov 7, 2026

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 35ae7e3

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 35ae7e3a209a6841dcf1df7221284e2131287da4 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 35ae7e3

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

False positive or not applicable? A repository writer can comment:
/ai-review override fable 35ae7e3a209a6841dcf1df7221284e2131287da4 false-positive: <reason, 20 to 500 characters>

@bolichen97
bolichen97 enabled auto-merge (squash) November 7, 2026 02:44
@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 Nov 7, 2026

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

Approved for the on-call. Review lanes pass on 35ae7e3, no conflict, no open change request.

@KiroCrewCaptain
KiroCrewCaptain merged commit ab6df81 into main Nov 7, 2026
96 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/29823-mate-editor-session-color branch November 7, 2026 03:29
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 7, 2026
buluoray pushed a commit that referenced this pull request Nov 7, 2026
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)
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.

The mate editor has no Session color field, so a mate's colour cannot be changed after it is created

2 participants