Skip to content

fix: list custom agents before crewmates in the chat agent picker - #19989

Merged
buluoray merged 1 commit into
mainfrom
fix/agent-picker-templates-first
Oct 14, 2026
Merged

buluoray merged 1 commit into
mainfrom
fix/agent-picker-templates-first

Conversation

@CrysisDeu

@CrysisDeu CrysisDeu commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: In the chat agent picker, the Custom agents group is listed first with a one-sentence hint, and the Crewmates group follows it.

The grouped chat agent pop-up (visible with dashboard.crewmates_in_agent_picker on) drew Crewmates above Custom agents. A session created without a crewmate runs the default template, so the group that holds the way back from any switch sat under the crewmate rows. Its hint also ran to two sentences about workspace and memory that the pick itself does not need.

Why it matters

The templates group is where a plain chat's default lives (the ★ badge). Reading it first makes the picker open on the row most sessions run, with crewmates as the second choice below it.

Not a goal

  • Changing the schedule form's AgentSelector (groupByKind) order.
  • Changing the flat, name-only list or the one-kind rule for headers and hint.
  • Rewording any other picker string, or the hint key's name.
  • Changing which rows useAgents offers (withoutCoveredCrewmates) or the ★ default semantics.

What changed (motivation → approach → change)

Symptom: Crewmates header above Custom agents in the chat picker. Cause: AgentDropdownList.tsx iterates the literal ['member', 'template']. Change: the literal is now ['template', 'member'] with a one-line comment on why templates lead; the chat picker's hint moves to its own key, components.agentDropdownList.group_templates_hint, holding one sentence ("A custom agent is a reusable agent setup.") in en.manual.json and every shipped locale, each the first sentence of that locale's existing hint; en-XA.json is regenerated with npm run i18n:pseudo. The shared key group_templates_hint_default_workspace and its value are untouched, so the schedule form's AgentSelector hint reads exactly as before. The one-sentence hint is the maintainer's explicit request (Zezhen, 2026-10-13), recorded in the PR comment on the Goal edit. The spec sentence in docs/system-specs/modules/crew-mode.md and the feature-map row in docs/feature-map/README.md that name the order are updated in the same commit. A screenshot harness (website/scripts/capture-agent-picker-templates-first.mjs) asserts the group order and the hint before writing the frames below.

Backwards compatibility

Compatible: render order of two existing groups and one added i18n key; no existing key, prop, route or type changes.

Removes nothing: both groups, every row and the hint still render; only their vertical order changes.

Tests

  • website/src/test/AgentDropdownList.test.tsx — the grouped-view test now asserts ['Custom agents', 'Crewmates'] as the role="group" order; the option-index tests (select kind, avatar, aria-selected) follow the new row order; the hint assertions match the one-sentence hint.
  • website/src/test/JobForm.agentGroups.test.tsx — unchanged and still passing: the schedule form's hint text did not change.

Manual verification

Real built SPA behind the shared stub (node scripts/capture-agent-picker-templates-first.mjs) with crewmates_in_agent_picker: true and a mixed catalog: the harness asserts the two group labels in the new order and the shortened hint under the first group, then writes the frames below in light and dark.

Screenshots / video

Light:

Picker, light

Dark:

Picker, dark

Full chat page, light

Chat with picker, light

Related Issues

Closes #19987

Follow-up (deferred, out of this PR's goal): #20227 — the Crewmates group can sit below the pop-up's visible edge once templates lead; height or scroll cue.

Hint wording: the one-sentence hint was chosen by the maintainer (Zezhen, 2026-10-13, dashboard chat; restated by the author in the Goal-edit comment on this PR). A docs/decisions/ entry needs the maintainer's own on-record comment (decisions README rule 4) and is not part of this PR.

Pattern harvest

Not generalizable: a deliberate ordering choice of two UI groups, not a defect class.

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

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

@CrysisDeu
CrysisDeu requested review from a team and KiroCrewCaptain as code owners October 13, 2026 22:52
@CrysisDeu
CrysisDeu requested a review from mbriones98 October 13, 2026 22:52
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 13, 2026
@CrysisDeu
CrysisDeu force-pushed the fix/agent-picker-templates-first branch from 9c85db0 to 93a3690 Compare October 13, 2026 23:14
@CrysisDeu

Copy link
Copy Markdown
Contributor Author

Goal / Not a goal edited at the author's explicit request (Zezhen, dashboard chat, 2026-10-13): keep only the first sentence of the custom-agents hint ("A custom agent is a reusable agent setup."). Folded into this PR as the same picker surface; the i18n value changes in every locale ride the same commit.

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Check that the Crewmates group can still be found when the list is long: the screenshot cuts it off at the pop-up's edge, and the fix is deferred to #20227.

[DESIGN-REVIEWED] c2e0dc6

Description read

[DESCRIPTION-READ] 5c5b6bfc7a5701e6732f90a98b94e9c95a3f252711105b1958e1d6a9826eaa79

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 13, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — 🟡 CONCERNS

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

UX-Verdict: CONCERNS

Putting custom agents first pushes the Crewmates group below the pop-up's edge, and the shorter hint no longer says how the two groups differ.

Watch

  • Crewmates are cut off. Putting the three template rows first leaves only one crewmate visible, and its description is cut in half. Nothing shows that the list scrolls. In shot-01 the blind reader wrote: "it says there are 3, but only one shows". With the flag on, this happens every time the picker opens, so two of the three crewmates are effectively hidden. This PR's reorder causes it, so chat agent picker: Crewmates group can sit below the fold #20227 should land with this PR rather than after it. The smallest fix is to cap the template group's height or add a scroll-edge fade.
  • The hint no longer explains the groups. The new hint, "A custom agent is a reusable agent setup.", dropped the half that said what picking one does: it uses your default workspace and shared memory, and creates no new crewmate. The blind reader could not tell the groups apart: "Custom agents and Crewmates look like the same kind of thing… I can't tell how they differ." Every first-time user of the grouped picker hits this. The maintainer asked for one sentence, so the fix is to make the Crewmates header carry the contrast, for example a one-line Crewmates hint.

Suggestions

  • The "Default" badge on kirocrew and the crewmate named default read as the same thing. Their descriptions are nearly identical too ("The stock crew agent template" and "The stock crew agent"). Putting templates first now stacks the two right next to each other. Showing the crewmate row's roster role, or saying "crewmate" in its description line, would tell them apart.

[UX-REVIEWED] c2e0dc6

Description read

[DESCRIPTION-READ] ba756a72cfa4388845371d669b232280921902fed2334002382ed6dddf63f2f0

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

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] c2e0dc6

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

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

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — 🟡 CONCERNS

Premise-level review of c2e0dc6951a944965376f0e4e2a5d40ac27ba9e0 — 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

The shorter hint drops the workspace and memory fact, which a deleted test pin called "the one fact a first-time picker needs". Only the author's account of a maintainer chat supports dropping it.

Not justified as shipped

  • Item 2 — inherited: the deleted pin said the hint carries "the one fact a first-time picker needs: a template uses the default workspace and shared memory, creating no crewmate". The description replaces it on the strength of "the one-sentence hint was chosen by the maintainer (Zezhen, 2026-10-13, dashboard chat; restated by the author…)". That request was never recorded by the maintainer, and the description admits it: "A docs/decisions/ entry needs the maintainer's own on-record comment… and is not part of this PR."
    Subtraction: delete group_templates_hint from en.manual.json and every locale file, and point AgentDropdownList.tsx:339 back at group_templates_hint_default_workspace.
    Clears when: the maintainer comments on this PR in their own words asking for the one-sentence hint, or the key is reverted.

What this change ships

Inventory (5 items) — 4 justified

Intent: with the crewmates flag on, the chat agent picker opens on the custom-agents group, where the default ★ row sits. This is a FIX (#19987).

  1. The grouped chat picker shows Custom agents above Crewmates (only when the flag, off by default, is on) — justified
  2. The custom-agents hint in the chat picker drops to one sentence and loses the workspace and memory line — inherited
  3. New i18n key group_templates_hint in 13 locale files, used only by AgentDropdownList.tsx:339 — justified
  4. Spec and feature-map rows now state the new order and the hint split — justified
  5. New screenshot harness capture-agent-picker-templates-first.mjs, the same kind of script as the ~750 capture-*.mjs already there — justified

[FIRST-PRINCIPLES-REVIEWED] c2e0dc6

Description read

[DESCRIPTION-READ] f3d338679e5a5b2e84bdd9e29d9d8be6484bc4fd90a48f607c531f30076db1fe

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 13, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] c2e0dc6

False positive or not applicable? A repository writer can comment:
/ai-review override gpt c2e0dc6951a944965376f0e4e2a5d40ac27ba9e0: <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 14, 2026
@CrysisDeu
CrysisDeu force-pushed the fix/agent-picker-templates-first branch from 93a3690 to 6de4111 Compare October 14, 2026 00:22
@CrysisDeu

Copy link
Copy Markdown
Contributor Author

Re UX Review (advisory) on 93a3690:

  • One-sentence hint: deliberate. The maintainer asked for exactly this sentence (see the Goal-edit comment above). The crewmate rows carry an avatar and the group header already names the kind, so the kind contrast is drawn by the rows, not the hint. Not changing.
  • Crewmates below the fold: the pop-up's height and scroller are unchanged by this PR; the group that leads is the one most sessions run (the default template). A taller list or a scroll cue is new scope, outside the Goal. Deferred.

Re Design / Opus / First Principles on 93a3690: the shared key leak is fixed on 6de4111 — the chat picker now reads its own key group_templates_hint; group_templates_hint_default_workspace and the schedule form are back to main's wording, and JobForm.agentGroups.test.tsx is untouched.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 14, 2026

@iamwhatever iamwhatever left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REQUEST_CHANGES at 6de4111. The author reply explicitly defers the below-fold Crewmates/scroll-cue item. Please fix it here or link its follow-up issue. The description currently links only #19987. Please also answer the current-head UX and Design copy findings. If the maintainer chose the exact hint, record that decision clearly. Align the feature-map wording with any intended display-order claim. I am not treating a slash-separated list alone as a product bug. No frontend tests or screenshots were executed locally. — crew-pr-reviewer (r99)

@CrysisDeu

Copy link
Copy Markdown
Contributor Author

@iamwhatever re r99 on 6de4111, addressed on c379df5:

  • Below-fold Crewmates / scroll cue: follow-up filed as chat agent picker: Crewmates group can sit below the fold #20227 and linked under Related Issues. Out of this PR's goal (group order only); the pop-up's height and scroller are not touched here.
  • Feature map: docs/feature-map/README.md row "Agent picker" now reads "grouped under Custom agents then Crewmates" (also the Opus finding).
  • Hint decision: the one-sentence hint is the maintainer's choice (Zezhen, 2026-10-13), stated in the Goal-edit comment and now in Related Issues. A docs/decisions/ entry needs the maintainer's own on-record comment (decisions README rule 4); I have asked Zezhen to post it. Not shipping an entry on a relayed quote.
  • UX "groups indistinguishable" / "three defaults": the hint sentence is fixed by the maintainer; the Crewmates rows carry avatars and the headers name the kind. The ★ badge and the default crewmate name pre-date this PR. Rebutted as outside the goal.
  • Sensitive Change Review on 6de4111 was a transient API error ("Could not read the PR from the API"); re-run requested.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Oct 14, 2026
@CrysisDeu
CrysisDeu force-pushed the fix/agent-picker-templates-first branch from c379df5 to 0ba26c1 Compare October 14, 2026 09:04
@CrysisDeu

Copy link
Copy Markdown
Contributor Author

Re the 0ba26c1 round:

@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 14, 2026
@CrysisDeu
CrysisDeu force-pushed the fix/agent-picker-templates-first branch from 0ba26c1 to eb4a0b3 Compare October 14, 2026 09:34
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 14, 2026
The grouped chat agent pop-up drew the Crewmates group above Custom
agents. A session created without a crewmate runs the default template,
so the template group is the one holding the way back from any switch;
it now leads and Crewmates follows. The hint under that group reads one
sentence, what a custom agent is, on its own key (group_templates_hint)
in every locale; the schedule form keeps the shared key and its wording.
The AgentSelector picker and the flat list are unchanged.

Closes #19987
@CrysisDeu
CrysisDeu force-pushed the fix/agent-picker-templates-first branch from eb4a0b3 to c2e0dc6 Compare October 14, 2026 20:43
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Oct 14, 2026

@mbriones98 mbriones98 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checks green and readiness passed at c2e0dc6; no behavior change.

@buluoray
buluoray enabled auto-merge (squash) October 14, 2026 23:33

@iamwhatever iamwhatever left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REQUEST_CHANGES at c2e0dc6.

The reorder itself is fine: AgentDropdownList.tsx:324 flips the group order, the chat picker reads its own group_templates_hint key, the schedule form's hint is unchanged, the feature-map and spec rows match, and every check on this head is green.

What blocks approval:

  1. The deferred below-the-fold item has no live tracking issue. The description links #20227 as the follow-up, but #20227 was closed as completed on 2026-10-14 with no comment and no fix on main. Please reopen it, or open a new issue for it and link that in the description. If you would rather fix it here, the UX lane suggests capping the template group's height or adding a scroll-edge fade.
  2. The First Principles CONCERNS on this head clears only when the maintainer asks for the one-sentence hint on this PR in their own words, or the key is reverted. A relayed quote does not clear it. The UX lane's 'groups look the same' concern depends on the same ruling. Please get that comment from the maintainer, then post target=first-principles and target=ux dispositions for c2e0dc6.

I read the diff and CI; I did not run the frontend tests or the capture script.

— crew-pr-reviewer (r101)

@buluoray
buluoray merged commit f28ec1a into main Oct 14, 2026
105 checks passed
@buluoray
buluoray deleted the fix/agent-picker-templates-first branch October 14, 2026 23:38
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 14, 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.

chat agent picker: list Templates group before Crewmates

4 participants