Skip to content

refactor(crew): drop the crew editor's unreachable chat hand-off - #23577

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
refactor/crew-editor-drop-chat-handoff
Oct 24, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
refactor/crew-editor-drop-chat-handoff

Conversation

@buluoray

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Remove the crew editor's leftover "chat with this crewmate" hand-off, which no control can reach any more.

useCrewEditor still exports requestChat and keeps a private chatWith. 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 requestChat back up, the same bug comes back. Removing it leaves no path that opens a crewmate as a plain session.

Not a goal

  • Adding a chat entry that opens the crewmate's own chat in the Mates view. That is a product decision.
  • Changing the Custom agents tab's chat-with (AgentTemplatesTab.tsx). It opens a template session on purpose.
  • Changing the discard prompt for close, collapse or pane switch.

What changed (motivation → approach → change)

  • Symptom: on v0.9.0 and v0.10.0-insider.2 to .5, the editor's "Chat with this crewmate" button opened /chat on a new plain slot.
  • Cause: the button called chatWith, which ran createSlot(crew) and then navigate('/chat'). feat(crew): edit crewmates on the Customize tab with the shared editor #21748 (dea18bccbc) removed the button and its memoryV2.chat_member string. useCrewEditor.chatWith and requestChat were left in place.
  • Change, in website/src/components/crew/useCrewEditor.ts:
    • delete chatWith and chatWithRef
    • delete requestChat and its CrewEditorController field
    • drop 'chat' from the discardAsk type, from confirmDiscard and from discardTakesSheet
    • drop the imports that only served it: createSlot, errMessage, useAppDispatch
  • The test harness in website/src/test/CrewEditorNextDialog.test.tsx loses its ctl-request-chat button and the two tests that clicked it.
  • No user-facing capability is removed: nothing renders this path. No spec or feature-map line describes it.

Backwards compatibility

Compatible: no rendered control calls requestChat, and chatWith was private to the hook.

Swept on origin/main @ 44702cb with git grep -nE "\bchatWith(Ref)?\b|\brequestChat\b" -- website src/kiro_crew docs test and git grep -n "discardAsk" -- website/src:

Reader: website/src/components/crew/CrewEditorNextDialog.tsx:CrewEditorNextDialog -- crew page -- destructures discardAsk/setDiscardAsk/discardTakesSheet but never sets 'chat' and never reads requestChat; CrewEditorNextDialog.test.tsx discard-prompt tests
Reader: website/src/components/crew/CrewEditorModal.tsx:CrewEditorModal -- crew page -- passes ctl through; never reads requestChat; KiroCrewAgentsPage.discardGuard.test.tsx
Reader: 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 here

Tests

  • Removed requestChat runs the guarded leave and mints a slot for the crew and requestChat on a dirty editor prompts to discard, then hands off on confirm. They only drove the deleted path.
  • All other discard-prompt tests stay and pass: close, collapse, pane switch and the schedule draft.

Proof: not provable -- test-only change

npx vitest run on 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.json and eslint on 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, and scripts/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

  • 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

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

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.
@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners October 23, 2026 22:42
@buluoray
buluoray requested a review from cruisercohen October 23, 2026 22:42
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 8ba8ceee74df1f129f9e2b33b11957ac8774b273 — 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 to check.

What this change ships

Inventory (3 items) — 3 justified

Intent: 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.

  1. The crew editor can no longer turn a crewmate into a plain chat session (requestChat/chatWith deleted) — justified
  2. The discard prompt no longer has a "chat" target — justified
  3. Two harness tests and the ctl-request-chat test button that drove the deleted path are removed — justified

[FIRST-PRINCIPLES-REVIEWED] 8ba8cee

Description read

[DESCRIPTION-READ] 4afdefeab278395adb5480c79abc044ccd5bc9a159ab7ce5b3e73e4bf19355d6

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

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 8ba8cee

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

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

@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

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

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

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: nothing in the tree calls requestChat or sets the 'chat' discard target any more, so the code removed here had no caller left.

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

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 8ba8cee

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

@buluoray buluoray mentioned this pull request Oct 23, 2026
5 tasks done
@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 Oct 23, 2026
@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) October 24, 2026 00:03

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

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.

@KiroCrewCaptain
KiroCrewCaptain merged commit e6520f8 into main Oct 24, 2026
106 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the refactor/crew-editor-drop-chat-handoff branch October 24, 2026 00:04
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 24, 2026
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.

2 participants