Skip to content

feat(chat): config flag to list crewmates in the agent picker - #16026

Merged
iamwhatever merged 1 commit into
mainfrom
feat/show-crewmates-in-picker
Oct 2, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
feat/show-crewmates-in-picker

Conversation

@iamwhatever

@iamwhatever iamwhatever commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Let a user turn crewmates back on in the chat agent picker by setting one config key.

#12755 hid crewmates from the chat agent picker behind a hard-coded constant. Users who keep one crewmate per project (each with its own workspace and memory) used that picker to move a chat onto the right crewmate. #16033 since narrowed the hide to crewmates a listed template covers (same name, or no memory of its own on a listed template), but a covered crewmate is still reachable only from the Crew page's "Chat with this member" button, and there is no switch to list every crewmate short of a code change.

Why it matters

People who split projects across crewmates to keep their memories apart lost the quick way to pick one. Without a switch, every such user waits for a release that flips the constant.

Not a goal

  • Changing the default. Unless the key is set, the picker keeps main's rule (withoutCoveredCrewmates).
  • A Settings page toggle. The key is set in the config file.
  • Any change to how a crewmate session resolves its workspace or memory.

What changed (motivation → approach → change)

A hard-coded hide had no off switch → make it a gateway config key → the picker reads it the way other dashboard flags already reach the SPA.

Piece Change
Config (src/kiro_crew/config/sections.py, src/kiro_crew/config/loader.py) New dashboard.crewmates_in_agent_picker (default false); a non-bool value reads as off
Picker (website/src/hooks/useAgents.ts) Reads the key from the shared ['kirocrewConfig'] query (as useCrewmateThreadsFlag does) and lists every crewmate when it is true; otherwise main's withoutCoveredCrewmates filter applies. The HIDE_CREWMATE_CHOICES constant is removed

The name-only list (cron, channel bindings, the keyboard agent cycle) is untouched, so nothing that resolves an agent by name changes. config-baseline.json is regenerated. The Agent picker row in docs/feature-map/README.md names the key, its default, and the covered-crewmate rule. Comments that named the old constant now name the key, in website/src/components/AgentDropdownList.tsx, website/src/pages/overview/KiroCrewCfgTab.tsx, the capture harness and the crew-mode spec.

Backwards compatibility

Compatible: the new key defaults to off, which is today's behaviour, and no route or response changes.

Tests

  • test/test_crewmates_in_agent_picker_config.py: the key defaults off, loads from the config file ("yes" reads as off), and survives to_dict(), which is what GET /api/config/kirocrew serves.
  • website/src/test/useAgents.hideCrewmates.test.tsx: covered crewmates are hidden (uncovered ones stay) when the key is absent, false, a non-boolean, or the config read fails; every crewmate is listed when true; the name-only list stays complete either way.
  • website/src/test/useAgents.projectScope.test.ts and useAgents.sessionKey.test.ts render the hook inside a QueryClientProvider, which it now needs.

Manual verification

N/A — the default render is unchanged, and the on-state renders the two-group list AgentDropdownList.test.tsx already covers.

Screenshots / video

Why no screenshot: with the key unset the picker renders exactly as on main; with it set the picker renders the existing two-group layout from before #12755, which this PR does not restyle.

Related Issues

no linked issue: reported in team chat.

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

@iamwhatever
iamwhatever requested a review from a team October 1, 2026 22:55
@iamwhatever
iamwhatever requested a review from a team as a code owner October 1, 2026 22:55
@iamwhatever
iamwhatever requested a review from bolichen97 October 1, 2026 22:55
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 905ae86d71f3e5a4ebe8df3c13c3469dbad245f5 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 905ae86

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

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 905ae86d71f3e5a4ebe8df3c13c3469dbad245f5 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Flip dashboard.crewmates_in_agent_picker on once in a live dashboard to confirm the restored two-group picker, since the on-state ships without a screenshot.

[DESIGN-REVIEWED] 905ae86

Description read

[DESCRIPTION-READ] 1fe6be23c7c646c305687305623a442cc83c66b86601d2fdbf18b9a1f67ded09

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 Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — ✅ PASS

UX-level review of 905ae86d71f3e5a4ebe8df3c13c3469dbad245f5 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: PASS

Verify the flag-on picker once in a live dashboard — the no-visual-delta claim rests on existing tests, not pixels.

Suggestions

  • sections.py help text says "beside the agent templates" but the picker's group header reads "Custom agents" — use "beside the custom agents" so the operator editing config finds the group the help names.

[UX-REVIEWED] 905ae86

Description read

[DESCRIPTION-READ] 73d27d2ec8bb3faf93ae94f180cf3012a88c36cb29a2f27ad400a96ce3a3cc4f

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

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — 🟡 CONCERNS

Premise-level review of 905ae86d71f3e5a4ebe8df3c13c3469dbad245f5 — 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/CONCERNS are advisory.

First-Principles-Verdict: CONCERNS

Two test files hand-roll a QueryClient renderHook wrapper that renderHookWithProviders in website/src/test/helpers.tsx:73 already provides — and the third test in this PR imports.

Not justified as shipped

  • Item 5 — duplicate of website/src/test/helpers.tsx: useAgents.projectScope.test.ts and useAgents.sessionKey.test.ts each define a local renderHook shim ("Same call shape as RTL's renderHook") rebuilding exactly what renderHookWithProviders does (QueryClientProvider, retry: false); grepped renderHookWithProviders — the shared helper has 10+ consumer files, including useAgents.hideCrewmates.test.tsx in this same diff. Count of hand-rolled copies: 2.
    Subtraction: delete both local renderHook wrappers and the QueryClient/createElement imports; import renderHookWithProviders from ./helpers as the sibling test does.
    Clears when: the two shims are deleted and both files use the shared helper.

What this change ships

Inventory (7 items) — 6 justified

Intent: let a user re-list crewmates in the chat agent picker via one config key, default unchanged — an ADDITION.

  1. New config key dashboard.crewmates_in_agent_picker, default off; non-bool reads as off — justified
  2. Picker lists every crewmate when the key is true — justified
  3. The HIDE_CREWMATE_CHOICES constant (the code-change-only off switch) is removed — justified
  4. Picker now reads the shared /api/config/kirocrew query; a failed read keeps today's hidden state — justified
  5. Two test files gain a hand-rolled QueryClient wrapper — rides along, duplicate of website/src/test/helpers.tsx
  6. Feature-map row, crew-mode spec and comments now name the key instead of the constant — justified
  7. config-baseline.json regenerated with the new key — justified

[FIRST-PRINCIPLES-REVIEWED] 905ae86

Description read

[DESCRIPTION-READ] 4c07866d39b040e392ade833aa22f00536c393b64da2f12583c4f5036b0394f6

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 Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

Reviewed 905ae86d71f3e5a4ebe8df3c13c3469dbad245f5 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 905ae86

Verdict parsed from the review's SHA-scoped output markers for commit 905ae86d71f3e5a4ebe8df3c13c3469dbad245f5.

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

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 2, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Agent-picker feature map omits config-gated behavior span=acd2aa5cac89 -- fixed in 11a2e02

Fixed: the Agent picker row in docs/feature-map/README.md now says crewmates join the list only while dashboard.crewmates_in_agent_picker is on (default off).
The row also names GET /api/config/kirocrew and handlers/core.py, which now serve the key the picker reads.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Item 2 — member_choices catalog field duplicates the shared config query span=3cb9050f7ff3 -- fixed in 11a2e02

Fixed by the subtraction the lane named: member_choices is deleted from agent_catalog.py and agents.ts (both now match main).
useAgents selects dashboard.crewmates_in_agent_picker from the shared ['kirocrewConfig'] query, as useCrewmateThreadsFlag does.

@iamwhatever
iamwhatever force-pushed the feat/show-crewmates-in-picker branch from a00e6ff to 11a2e02 Compare October 2, 2026 00:15
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 2, 2026
@iamwhatever
iamwhatever force-pushed the feat/show-crewmates-in-picker branch from 11a2e02 to a9a1793 Compare October 2, 2026 00:36
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention labels Oct 2, 2026
@iamwhatever

iamwhatever commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor Author
  • span=2f6082500a24 Agent-picker group label contradicts the UI

fixed: the Agent picker row in docs/feature-map/README.md now names the second header Custom agents, matching group_templates in website/src/i18n/locales/en.manual.json as rendered by AgentDropdownList.tsx.
Two-word doc edit, no code change; lands with the rebase onto origin/main in the next push.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=36560b3d17e1 memberChoicesQuery failure is never surfaced

rebutted (proportional): a failed config read falls back to the default picker (covered crewmates withheld), which is the documented off state and loses no data; every crewmate stays reachable from its Crew page thread and the Alt+Shift+A cycle.
The key is opt-in and only widens one list, so a silent fall-back to main's behaviour is the fail-closed direction, not a wrong action.
Surfacing it needs a new error contract on useAgents plus ErrorNotice wiring in every picker consumer, which the frozen goal (one config key) does not cover; the review itself marks it non-blocking for that reason.

Add dashboard.crewmates_in_agent_picker (default off). useAgents reads it from the shared kirocrewConfig query and shows member rows in the chat picker only when it is true. Replaces the hard-coded HIDE_CREWMATE_CHOICES constant; the feature map names the key.
@iamwhatever
iamwhatever force-pushed the feat/show-crewmates-in-picker branch from a9a1793 to 905ae86 Compare October 2, 2026 01:25
@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=bd4b0fed318d crewmates_in_agent_picker help text overstates the off state and the reload path

fixed in 905ae86: the help now says the off state lists templates plus any crewmate no listed template already covers (matches withoutCoveredCrewmates).
It now says the key takes effect when the dashboard is reloaded, with no gateway restart: the ['kirocrewConfig'] query is not invalidated by the picker reload or by a hand-edit of config.json.
config-baseline.json regenerated; test_config_baseline passes.

@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 2, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=e964a9e9ccc3 local renderHook shims duplicate renderHookWithProviders

rebutted (proportional): the duplication is test-only and changes no shipped behaviour; both shims wrap the same QueryClientProvider the shared helper builds, so the two cannot drift in what they assert.
The PR is fully green on 905ae86; folding the shims into website/src/test/helpers.tsx is a cosmetic test refactor whose only cost would be a full matrix re-run.
Happy to take it as a one-line follow-up if a maintainer prefers it in this PR.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=f10b60ed80a3 help text says "agent templates", header reads "Custom agents"

rebutted (proportional): the help names the concept (shared agent templates, the catalog's selection_kind: template), which is how the rest of the config help and the crew-mode spec describe that group; the operator is not hunting a header, they are turning one key on.
The PR is fully green on 905ae86; a two-word wording change here would restart the whole check matrix for no behaviour change.

@iamwhatever
iamwhatever enabled auto-merge (squash) October 2, 2026 05:38
@iamwhatever
iamwhatever merged commit 8690852 into main Oct 2, 2026
97 checks passed
@iamwhatever
iamwhatever deleted the feat/show-crewmates-in-picker branch October 2, 2026 05:58
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 2, 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