Skip to content

feat: redesign the advisor tool row - #28069

Merged
DanielleMaywood merged 4 commits into
mainfrom
chatd/advisor-tool-row-redesign
Aug 12, 2026
Merged

feat: redesign the advisor tool row#28069
DanielleMaywood merged 4 commits into
mainfrom
chatd/advisor-tool-row-redesign

Conversation

@DanielleMaywood

@DanielleMaywood DanielleMaywood commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

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 left counter also assumed the reader already knew the advisor is quota-limited per turn.

What changed

  • The header is a single status line whose label is the model-supplied model_intent when 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.
  • The full question moved into the expandable card, above the guidance, where it stays readable and selectable without crowding the header. The card keeps the shared bordered, max-h-64 scroll treatment used by the subagent and exec tools.
  • Dropped the live "N left" quota counter and the model-name chip from the header.
  • The advisor tool now accepts an optional model_intent arg (same pattern as the exec tool's) so the agent can label the call.
  • When the per-turn advisor budget is exhausted, the tool returns an explicit agent-facing message telling the parent to stop calling the advisor, instead of only a limit_reached type tag.

Every state (collapsed, expanded, running, streaming, error, limit, long question, with intent) is covered by the existing AdvisorTool Storybook stories.


before-light-unexpanded after-light-unexpanded
before-dark-unexpanded after-dark-unexpanded
before-light-expanded after-light-expanded
before-dark-expanded after-dark-expanded

Generated by Coder Agents (DanielleMaywood).

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

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Comment thread site/src/pages/AgentsPage/components/ChatElements/tools/AdvisorTool.stories.tsx Outdated
… 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.
@DanielleMaywood

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Comment thread site/src/pages/AgentsPage/components/ChatElements/tools/AdvisorTool.tsx Outdated
…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.
@DanielleMaywood

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Comment thread site/src/pages/AgentsPage/components/ChatElements/tools/AdvisorTool.stories.tsx Outdated
…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.
@DanielleMaywood

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 8b40b61a1b

ℹ️ 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".

@DanielleMaywood
DanielleMaywood marked this pull request as ready for review August 12, 2026 14:25
@DanielleMaywood
DanielleMaywood merged commit 5a33b66 into main Aug 12, 2026
53 of 55 checks passed
@DanielleMaywood
DanielleMaywood deleted the chatd/advisor-tool-row-redesign branch August 12, 2026 14:35
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants