Repository navigation
fix(chat): offer no agent pin on a template-bound session - #25108
Conversation
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. The diff only stops showing a pin row that always failed on template-bound chats. It adds no control, and the dropdown without that row is a state that already ships, so the missing screenshot leaves nothing unseen. [UX-REVIEWED] e55388b Description read[DESCRIPTION-READ] c0ed9ed497c3e415c227e0231bca9cc940215100c1f7dd25d639fe95ae09eb02 That sha256 names everything this verdict read: the PR description, plus the 3 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 change only hides a pin row that always failed, so it is easy to revert and has no compatibility risk. Notes
[DESIGN-REVIEWED] e55388b Description read[DESCRIPTION-READ] 5f7c681aadb0b45dfec0d61a80dd9520e69117db9a2ef29b23330c479c3c475c 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) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS One pin row that always failed is now withheld. The fix sits at cause level (the pin target is never a template), with a linked issue and tests that fail on base. What this change shipsInventory (3 items) — 3 justifiedIntent: stop a plain new chat's model picker from offering a "pin to agent" row that always fails with a 404. FIX.
[FIRST-PRINCIPLES-REVIEWED] e55388b Description read[DESCRIPTION-READ] dd4d51e3ebe85fb9ffdb12ce2ecd8fc486ed53cb8f380df6c6999381981d9212 That sha256 names the PR description this verdict read. 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: |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (2 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: fix: the composer's model-pin row targets no agent on a template-bound session, so it no longer writes an agents entry that does not exist (#25099); frontend hook change plus tests.
Problem / Motivation
Goal: On a plain new chat, the model picker stops offering a "pin to agent" row that can only fail.
In a chat opened without picking an agent, the composer's model dropdown offers "Pin
<model>to the kirocrew agent". Clicking it shows "Could not set the agent's default model" withkirocrew: Agent 'kirocrew' not found, and nothing changes.Why it matters
Every plain chat shows this row, and it fails every time. It also raises a critical notification each time someone tries it.
Not a goal
kirocrewis not a key ofconfig.agents.What changed (motivation → approach → change)
Symptom: the pin row is offered on a template-bound session and always fails.
Cause: since #18342 a plain session is bound to the
kirocrewtemplate (agent_kind: "template").useComposerChipsincomposerChips.tsstill used the slot's agent name as the pin target, so the write went toPUT /api/agents/kirocrew, which has noconfig.agentsentry.Change: the pin target is now empty unless it names a real crew agent. That means the slot is not
agent_kind: "template", and the name resolves in the roster to a non-template row. The dropdown already hides the row when the target is empty, soComposerDockViewandModelEffortDropdownneed no change. This is the most conservative choice: it removes an action that cannot succeed and adds none.Decision: the row is withheld, not redirected to the
defaultcrewmate. A template session does not read that crewmate's pin, so redirecting would write a setting that has no effect on the session shown.Backwards compatibility
Compatible: crew-agent sessions keep the same pin row and write; only a row that always failed is no longer shown.
Removes nothing: the hidden row never produced a working write on a template session.
Tests
website/src/test/useChatPageComposerChips.test.tsx, new block "which agent the pin row may target (#25099)":The first three fail on
origin/mainand pass with the fix (checked by restoring the oldcomposerChips.ts). The existing harness now listsbuilderas a member row, as the real roster does.Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
N/A — unit coverage sufficient: the dropdown's existing
onPinToAgent && agentNameguard decides visibility, and the hook's output is what changed.Screenshots / video
Why no screenshot: the only visible effect is that one dropdown row is no longer rendered on template sessions; no layout or style changes.
Related Issues
Closes #25099
Sibling sweep
Swept: git grep -n "updateKirocrewAgent(" -- website/src
Sibling: website/src/pages/settings/useChatPanelModels.ts:320 -- not affected -- it clears a pin only when the default agent's config row carries a model
Sibling: website/src/pages/members/CrewProfileSettings.tsx:204 -- not affected -- it writes a member read from the member roster
Sibling: website/src/components/crew/useCrewEditor.ts:641 -- not affected -- it writes the crew agent open in the editor
Pattern harvest
Not generalizable: #16809 fixed the same name mismatch on the agent picker; this was the last slot-name-to-config-agent write in the composer.
Checklist