Skip to content

refactor(site/src/pages/AgentsPage): remove unused tool call props - #29909

Merged
DanielleMaywood merged 2 commits into
nullability/conversation-toolsfrom
nullability/tool-cleanups
Oct 6, 2026
Merged

DanielleMaywood merged 2 commits into
nullability/conversation-toolsfrom
nullability/tool-cleanups

Conversation

@DanielleMaywood

Copy link
Copy Markdown
Collaborator

Stacked on #29891.

Removes dead props and a redundant null check from the tool-call rows, and fixes one blank-label bug.

  • ToolCall.tsx: deleted four props that no caller in site/src passes, including stories and tests: Root.view, Root.onViewChange, Label.shimmerWhenActive (always the default true), and Header.headerClassName. Root stays controllable with expanded.
  • ProcessOutputTool.tsx: modelIntent ? sanitizeExecuteModelIntent(modelIntent, cmd) : "" becomes a direct call. sanitizeExecuteModelIntent already returns "" for undefined.

Behavior change (separate commit): in GenericToolRenderer (Tool.tsx), the label was modelIntent ? formatModelIntentLabel(modelIntent) : <ToolLabel />. model_intent is the raw string from the model, so it can be whitespace only. In that case formatModelIntentLabel returned "" and the header showed a blank label. It now uses formatModelIntentLabel(modelIntent) || <ToolLabel />, so blank intents fall back to the default tool label. A new Vitest case in Tool.test.tsx covers this: it fails without the fix and passes with it. It checks the header button's accessible name, which is the non-visual result of the label.

Overlap: #29894 also edits Tool.tsx. This PR changes only the label expression in GenericToolRenderer.

Part of the AgentsPage nullability cleanup; see #29888 for the methodology.

Verified: pnpm lint:types, check, lint:oxlint, lint:compiler, lint:knip, pnpm test src/pages/AgentsPage (1618 passed), and pnpm test:storybook src/pages/AgentsPage/components/ChatElements/tools/ (12 files, 230 passed).

Plan excerpt

8. Top-down pass proposals

Analysed on a local, unpushed merge of all cleanup branches; ranking script topdown.cjs. After the bottom-up PRs only 43 dead slots remain, so what's left is nullability that is real at its origin. Two read-only agents reviewed the top origins in code. Guard counts from the tool overstate the win: many "guards" are real branches (loading, no workspace, first/last row).

# Change Guards removed Size Risk
T7 Trivial cleanups: dead chatId ??/ternary in ChatPageInput; 4 never-passed ToolCall props; redundant workspace ? at AgentChatPageView.tsx:459; redundant ternary in ProcessOutputTool; redundant count check at AgentChatInput.tsx:1142 ~12 ~5 files / ~30 lines None, except Tool.tsx:1017 || fallback changes whitespace-only intents to show the default label (a fix)

The ChatPageInput, AgentChatPageView, and AgentChatInput parts of T7 are in #29907, stacked on #29890.


This PR was generated by Coder Agents on behalf of @DanielleMaywood.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-25T14:16:26.740210Z ebfa837 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@DanielleMaywood
DanielleMaywood force-pushed the nullability/conversation-tools branch 2 times, most recently from 8fd105a to 68e6991 Compare September 29, 2026 14:29
@DanielleMaywood
DanielleMaywood force-pushed the nullability/tool-cleanups branch from ebfa837 to 4f3ff5a Compare September 29, 2026 14:41
@linear-code

linear-code Bot commented Sep 30, 2026

Copy link
Copy Markdown

CODAGT-1258

@DanielleMaywood
DanielleMaywood merged commit 75a2e38 into nullability/conversation-tools Oct 6, 2026
27 checks passed
@DanielleMaywood
DanielleMaywood deleted the nullability/tool-cleanups branch October 6, 2026 07:37
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 6, 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.

3 participants