Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(site/src/pages/AgentsPage/components/ChatElements/tools): delete dead execute auth_required flow - #27687

Merged
DanielleMaywood merged 2 commits into
danielle/remove-wait-for-external-authfrom
danielle/remove-execute-auth-required
Jul 30, 2026
Merged

fix(site/src/pages/AgentsPage/components/ChatElements/tools): delete dead execute auth_required flow#27687
DanielleMaywood merged 2 commits into
danielle/remove-wait-for-external-authfrom
danielle/remove-execute-auth-required

Conversation

@DanielleMaywood

Copy link
Copy Markdown
Contributor

Stacked on #27684. Addresses review note CRF-2 from that PR: the kept auth_required execute path is dead by the same premise that PR proved for wait_for_external_auth.

The chatd execute tool's ExecuteResult struct (coderd/x/chatd/chattool/execute.go:79-88) has no auth_required, authenticate_url, or provider_* fields, so the execute tool cannot emit the payload this path parsed. The authenticate_url matches elsewhere in Go are the unrelated workspace-creation external-auth flow (codersdk.TemplateVersionExternalAuth). Per bb3a363ed4, the auth_required execute payload was written and removed on an unmerged branch before #22290 squash merged, so no server version ever emitted it.

Removes:

  • ExecuteAuthRequiredTool and its ExecuteRenderer branch
  • the authenticateURL/providerLabel chain in getExecuteRenderData, and the Boolean(data.authenticateURL) disjunct in shouldRenderExecuteTool
  • the ExecuteAuthRequired Storybook story
  • the now-dead toProviderLabel helper and its test block
  • the auth_required visibility test case

The providerLabel identifiers elsewhere under site/src (ModelSelector, ModelRow, AISettings) belong to the unrelated AI model/provider selector and are untouched.

🤖 This pull request was created with Coder Agents.

…dead execute auth_required flow

The chatd execute tool's ExecuteResult has no auth_required,
authenticate_url, or provider_* fields, so the execute tool cannot emit
the payload this path parsed. Per bb3a363, that payload was written
and removed on an unmerged branch before #22290 squash merged, so no
server version ever emitted it.

Remove ExecuteAuthRequiredTool and its ExecuteRenderer branch, the
authenticateURL/providerLabel chain in getExecuteRenderData, the
ExecuteAuthRequired story, the now-dead toProviderLabel helper and its
test block, and the auth_required visibility test case.
@DanielleMaywood

Copy link
Copy Markdown
Contributor Author

/coder-agents-review model:kimi-k3 thinking:xhigh

@coder-agents-review

coder-agents-review Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Chat: Review posted | View chat
Requested: 2026-07-30 14:42 UTC by @DanielleMaywood
Spend: $11.04 / $100.00

Review history
  • R1 (2026-07-30): 14 reviewers, 2 Note, 1 P3, COMMENT. Review
  • R2 (2026-07-30): 5 reviewers, 3 Note, 1 P3, 1 P4, COMMENT. Review

deep-review v0.9.0 | Round 2 | 0109850..a6b6001

Last posted: Round 2, 5 findings (1 P3, 1 P4, 3 Note), COMMENT. Review

Finding inventory

Finding inventory: PR #27687

Findings

# Sev Status Location Summary Round Reviewer Posted
CRF-1 P3 Author fixed (a6b6001) toolVisibility.ts:62 Reintroduced shouldRenderExecuteTool wrapper that bb3a363 already deleted as dead weight R1 Leorio Yes
CRF-2 Note Author fixed (a6b6001) Tool.tsx:225 Blank line left where the auth branch was cut out R1 Leorio Yes
CRF-3 Note Author acknowledged R2 (stories live on another author's unmerged branch; author will flag to branch owner) Tool.stories.tsx Unmerged branch 28381f5 adds ExecuteAuthRequired stories on the deleted component R1 Pariston Yes
CRF-4 P4 Open toolVisibility.ts:24 Doc comment on getExecuteRenderData pads one deliverable fact into two sentences R2 Gon Yes
CRF-5 Note Open toolVisibility.test.ts:9 Renamed test still asserts duration and backgrounding, not just output R2 Gon Yes

Contested and acknowledged

CRF-3 (Note, Tool.stories.tsx) - ExecuteAuthRequired stories on unmerged branch 28381f5

  • Finding: Unmerged branch 28381f5de2 (on origin/mike/chat-hooks-uat/*) adds ExecuteAuthRequiredRewrittenByHook/ExecuteAuthRequiredNotRewrittenByHook stories on top of the component this PR deletes. Flagged so the collision is visible before that branch lands.
  • Author response (R2): "Out of my control from here, but worth surfacing. Whoever owns that branch should drop those stories rather than resolve the conflict by resurrecting them. I'll flag it to the author."
  • Churn guard classification (R2): Acknowledged. Engages with the consequence and explains why no in-PR action exists; the offending stories live on someone else's unmerged branch.

Round log

Round 1

Panel (14 reviewers). Netero: no findings. Panel: 1 P3, 2 Notes. Reviewed against 0109850..c8f0999.

Round 2

Churn guard: PROCEED (CRF-1, CRF-2 author fixed in a6b6001; CRF-3 acknowledged). Reviewed against 0109850..a6b6001.

Round 2 panel

Netero: no findings. Panel (Bisky, Komugi, Gon, Mafuuu, Kite): 1 P4 (downgraded from Gon P2: doc comment untouched by diff, pre-existing text), 1 Note new. All prior findings verified fixed or acknowledged.

About deep-review

CRF = Coder Review Finding (P0-P4, Nit, Note)

Reviewer Focus
Bisky tests
Chopper ops/errors
Churn-guard change verification
Ging language modernization
Gon naming
Hisoka edge cases
Killua perf
Kite change integrity
Knov contracts
Knuckle SQL
Komugi flake/determinism
Kurapika security
Law decomposition
Leorio docs
Luffy product
Mafu-san process
Mafuuu contracts
Melody dispatch/pairing
Meruem structural
Nami frontend
Netero mechanical checks
Pariston premise testing
Pen-botter product gaps
Razor verification
Robin duplication
Ryosuke Go arch
Takumi concurrency
Zoro shape

🤖 Managed by Coder Agents.

@coder-agents-review coder-agents-review Bot 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.

Clean deletion. The premise was verified against the producer (ExecuteResult in coderd/x/chatd/chattool/execute.go has no auth_required, authenticate_url, or provider_* fields), the merge history (bb3a363ed4 documents the payload lived and died on an unmerged branch before #22290 squash-merged), and a repo-wide grep (zero remaining emitters or consumers). Every removed piece went with its pair: component with registry branch, helper with its only caller and test, story with its spyOn import, visibility disjunct with the field it read. tsc --noEmit and the 142 tests in the touched files pass. The failing Pixel / Review check is the expected snapshot-baseline removal for the deleted story.

Findings: 1 P3, 2 Notes.

The P3 is the one loose thread: this PR proves the same premise as the commit it cites, but re-creates the shouldRenderExecuteTool wrapper that commit deleted. As Leorio put it: "This PR proves the same premise (no auth_required payload can arrive) and then re-creates the wrapper it just finished amputating."


In reply to IC_kwDOGkVX1s8AAAABMeCwQw:

Note [CRF-3] Tool.stories.tsx - An unmerged branch (28381f5de2, "mark chat tool calls a lifecycle hook rewrote", on origin/mike/chat-hooks-uat/*) still adds two ExecuteAuthRequiredRewrittenByHook/ExecuteAuthRequiredNotRewrittenByHook stories on top of the component this PR deletes. (Pariston)

Why it matters: whoever merges that branch after this one gets a textual conflict and, worse, stories referencing a component and payload that no longer exist. The dead fixture already attracted one dependent. Worth a heads-up to that branch's author so the stories are dropped there rather than resurrected through a careless conflict resolution. Not a defect in this PR; flagging so the collision is visible before it lands.

🤖

🤖 This review was automatically generated with Coder Agents.

Comment thread site/src/pages/AgentsPage/components/ChatElements/tools/Tool.tsx Outdated
…the execute visibility check

Review feedback: bb3a363 already deleted the shouldRenderExecuteTool
wrapper and inlined the command check at its single call site. Inline it
again rather than re-create a one-line named predicate, and collapse the
blank line left where the auth branch was removed.

Copy link
Copy Markdown
Contributor Author

Thanks. Both in-scope items addressed in a6b6001.

P3 (CRF-1): Fair catch, and slightly embarrassing. I cited bb3a363ed4 as the evidence and then re-created the exact wrapper it deleted. Verified against git show bb3a363ed4 (it inlines the check at the single call site), so I did the same: deleted shouldRenderExecuteTool and inlined getExecuteRenderData(args, result).command.trim().length > 0 in shouldRenderTool. The visibility tests already exercise shouldRenderTool directly, so no test changes were needed. Biome, tsc, and the 155 tools unit tests pass.

Note (CRF-2): Collapsed the leftover blank line in ExecuteRenderer.

Note (CRF-3): Out of my control from here, but worth surfacing. The unmerged origin/mike/chat-hooks-uat/* branch (28381f5de2) adds ExecuteAuthRequiredRewrittenByHook/ExecuteAuthRequiredNotRewrittenByHook stories on top of the component this PR deletes. Whoever owns that branch should drop those stories rather than resolve the conflict by resurrecting them. I'll flag it to the author.

🤖 This comment was generated with Coder Agents.

@DanielleMaywood

Copy link
Copy Markdown
Contributor Author

/coder-agents-review model:kimi-k3 thinking:xhigh

@coder-agents-review coder-agents-review Bot 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.

Round 2. Both in-scope items from round 1 verified fixed in a6b60011f6: CRF-1's shouldRenderExecuteTool wrapper is gone with the check inlined at the single call site (matching the end state bb3a363ed4 established), and CRF-2's stray blank line is collapsed. CRF-3 (stories on the unmerged mike/chat-hooks-uat/* branch) is correctly out of this PR's hands; the author's flag to the branch owner is the only available action.

Findings this round: 1 P4, 1 Note, both from Gon on naming/comment tightening. Kite's summary of the R2 amend: "the PR does exactly one thing (delete the dead execute auth_required flow) across its 7 files; the R2 amend commit only removes the wrapper and blank line the panel flagged."

tsc --noEmit, Biome, and the 142 touched unit tests all pass at head.

🤖 This review was automatically generated with Coder Agents.

@DanielleMaywood
DanielleMaywood marked this pull request as ready for review July 30, 2026 15:05
@DanielleMaywood
DanielleMaywood merged commit 11e03cf into main Jul 30, 2026
31 checks passed
@DanielleMaywood
DanielleMaywood deleted the danielle/remove-execute-auth-required branch July 30, 2026 15:20
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 30, 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