feat: redesign the advisor tool row - #28069
Conversation
Surface the advisor call as a single-line status row whose label is the model-supplied intent (falling back to a status verb), and move the full question into the expandable card above the guidance. Drop the live quota counter from the header; the backend now returns an explicit instruction when the per-turn advisor budget is exhausted so the agent stops calling it, and the card's limit callout covers the user-facing case.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f9466f5524
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… FE4 comments
When the advisor budget is exhausted, the collapsed row read as a success
("Consulted the advisor") with the warning only inside the expandable card.
Label the header "Advisor limit reached" with a warning icon instead, and
render it through ToolCall.Header's secondaryLabel slot.
Also remove story comments that restate the assertions below them, per FE4.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 424feb45a3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ct visible label The custom aria-label overrode the header button's descendant text, so screen readers announced only "Expand/Collapse advisor guidance" and lost the visible intent or status (including the limit-reached state). Drop the override so the name derives from the visible label; aria-expanded still conveys toggle state.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6846b75f7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ration Remove the two comment blocks added alongside the limit-header and accessible-name assertions; they restated what the queries verify. The accessibility-role and backend-path comments that add non-obvious context stay.
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Redesigns the advisor tool row in the Coder Agents chat to match the density and conventions of the other tool cards, adds optional intent labelling, and returns an explicit budget-exhausted message to the agent.
Problem
The advisor row stood out from adjacent tool calls. The header stacked a label plus multiple pill chips (model name, "N uses left") and wrapped a long question across lines, and the body was a separate surfaced panel with its own "Advice" chip. The bare
N leftcounter also assumed the reader already knew the advisor is quota-limited per turn.What changed
model_intentwhen present (rendered like the exec tool's intent), falling back to a status verb ("Consulting / Consulted / Failed to consult the advisor"). Header text color matches the other tool rows.max-h-64scroll treatment used by the subagent and exec tools.model_intentarg (same pattern as the exec tool's) so the agent can label the call.limit_reachedtype tag.Every state (collapsed, expanded, running, streaming, error, limit, long question, with intent) is covered by the existing
AdvisorToolStorybook stories.Generated by Coder Agents (DanielleMaywood).