Repository navigation
refactor(crew): drop the crew editor's unreachable chat hand-off - #23577
Conversation
useCrewEditor still built a chatWith/requestChat path that minted a plain chat slot for the crewmate and navigated to /chat. No component renders a control for it since the editor's header button was removed, so the hook, its 'chat' discard target and the two harness tests that drove it are deleted.
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing to check. What this change shipsInventory (3 items) — 3 justifiedIntent: remove a leftover "chat with this crewmate" path that no control reaches and that reproduces a reported bug; this is a FIX, done by deleting code.
[FIRST-PRINCIPLES-REVIEWED] 8ba8cee Description read[DESCRIPTION-READ] 4afdefeab278395adb5480c79abc044ccd5bc9a159ab7ce5b3e73e4bf19355d6 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: |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. The diff only removes hook code and test-harness buttons that no rendered control reaches, so it adds or changes nothing a user can see. The missing blind read leaves no evidence gap. [UX-REVIEWED] 8ba8cee Description read[DESCRIPTION-READ] 6775dd9b58ac216925cde229aa6dd843ebc65bdf1bcd27de4b29b1c8316d1954 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: nothing in the tree calls [DESIGN-REVIEWED] 8ba8cee Description read[DESCRIPTION-READ] d4de93fd72880d78c400c6dea05308f85e159270e1503fd2a8f0d481ae8892c8 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: |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: refactor (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: removes the crew editor's unused chat hand-off (requestChat/chatWith and the 'chat' discard target) and its two tests; no remaining caller, no behaviour change.
Problem / Motivation
Goal: Remove the crew editor's leftover "chat with this crewmate" hand-off, which no control can reach any more.
useCrewEditorstill exportsrequestChatand keeps a privatechatWith. Both mint a plain chat slot for the crewmate (createSlot(crew)) and navigate to/chat. The editor's header button that called them was removed in #21748. No component renders a control for them now. The hook still carries the code, a'chat'discard target and two harness tests that drive it.Why it matters
This is the path behind a report from a released build: "Chat with this crewmate" opened a normal session with the crewmate as the agent, not the crewmate's own chat. The button is gone on main, but the code still does exactly that. If someone wires
requestChatback up, the same bug comes back. Removing it leaves no path that opens a crewmate as a plain session.Not a goal
AgentTemplatesTab.tsx). It opens a template session on purpose.What changed (motivation → approach → change)
/chaton a new plain slot.chatWith, which rancreateSlot(crew)and thennavigate('/chat'). feat(crew): edit crewmates on the Customize tab with the shared editor #21748 (dea18bccbc) removed the button and itsmemoryV2.chat_memberstring.useCrewEditor.chatWithandrequestChatwere left in place.website/src/components/crew/useCrewEditor.ts:chatWithandchatWithRefrequestChatand itsCrewEditorControllerfield'chat'from thediscardAsktype, fromconfirmDiscardand fromdiscardTakesSheetcreateSlot,errMessage,useAppDispatchwebsite/src/test/CrewEditorNextDialog.test.tsxloses itsctl-request-chatbutton and the two tests that clicked it.Backwards compatibility
Compatible: no rendered control calls
requestChat, andchatWithwas private to the hook.Swept on origin/main @ 44702cb with
git grep -nE "\bchatWith(Ref)?\b|\brequestChat\b" -- website src/kiro_crew docs testandgit grep -n "discardAsk" -- website/src:Reader: website/src/components/crew/CrewEditorNextDialog.tsx:CrewEditorNextDialog -- crew page -- destructures
discardAsk/setDiscardAsk/discardTakesSheetbut never sets'chat'and never readsrequestChat; CrewEditorNextDialog.test.tsx discard-prompt testsReader: website/src/components/crew/CrewEditorModal.tsx:CrewEditorModal -- crew page -- passes
ctlthrough; never readsrequestChat; KiroCrewAgentsPage.discardGuard.test.tsxReader: website/src/pages/KiroCrewAgentsPage.tsx:KiroCrewAgentsPage -- crew page -- builds the controller and opens the modal; no chat reference; KiroCrewAgentsPage.capabilities.test.tsx
Reader: website/src/pages/members/MembersPage.tsx:MembersPage -- crew page -- opens the same modal in place; no chat reference; MembersPage.test.tsx
Reader: website/src/test/CrewEditorNextDialog.test.tsx:Harness -- crew page -- the only caller of
requestChat; its button and two tests are removed hereTests
requestChat runs the guarded leave and mints a slot for the crewandrequestChat on a dirty editor prompts to discard, then hands off on confirm. They only drove the deleted path.Proof: not provable -- test-only change
npx vitest runon the 11 files that mount the crew editor: 256 tests passed. The files: CrewEditorNextDialog, KiroCrewAgentsPage.discardGuard / schedDraftGuard / capabilities / reasoningEffort, CrewRoster, CrewWebhookSection, KiroCrewAgentsPage.owners, MembersPage, MembersPage.openThread, members.locations.npx tsc --noEmit -p tsconfig.app.jsonandeslinton both changed files are clean.Manual verification
N/A -- the removed code had no rendered entry point, so there is nothing to click. Not run:
npm run build, the full vitest suite, andscripts/local-gate.py, which timed out on the backend suite. This diff touches no Python.Screenshots / video
Why no screenshot: The diff removes hook code and harness tests that no rendered control reaches, so no surface changes.
Related Issues
Refs #21748
Sibling sweep
Swept: git grep -nE "createSlot(" -- website/src/pages website/src/components/crew
Sibling: website/src/pages/overview/AgentTemplatesTab.tsx:575 -- not affected -- opens a template session on purpose, not a crewmate
Pattern harvest
Not generalizable: a single handler left behind when its only button was removed in a large refactor.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.