Skip to content

refactor(studio): extract PendingAskCard from four copied ternaries - #2321

Merged
kantord merged 1 commit into
studio-followups/10-focus-and-steerfrom
studio-followups/11-pending-ask-card
Oct 15, 2026
Merged

kantord merged 1 commit into
studio-followups/10-focus-and-steerfrom
studio-followups/11-pending-ask-card

Conversation

@kantord

@kantord kantord commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Summary

One component for the plan-or-ordinary ask card, which was copied at four sites.

Part of #2303 ("Tiny follow-up fixes"); it does not close it. This is PR 11 of 14 in a stack of draft PRs, reviewed and merged in order.

What changed

  • PendingAskCard and pendingAskKey own the PresentPlan ? PlanReviewCard : ApprovalPanel ternary, the key and the missing-controlTarget disabled rule. The four sites (transcript, Message, side panel, tool-call list) use them; the issue said three. The key is exported because a React key on a component's inner element does not key it in a parent's .map.
  • ToolCallControls now extends PendingAskControls.

Behavior changes

None.

Verification

Biome, typecheck, the full Studio test suite and pnpm generated:check pass on this branch, run on the assembled stack. The full Playwright suite passes on the stack tip (122 passed, 30 skipped, 0 failed, including chat-approval against a real mecated build). Four new tests (plan vs ordinary, disabled without a control target, following the surface predicate, key remount on a new run); the missing-target and key tests fail without the fix. chat-approval e2e 4 of 4.

Not included

The later refactors in this stack.

Fully or partially written by an AI agent.

🤖 Generated with Claude Code

@kantord
kantord added this pull request to stack #2325 October 14, 2026 13:27
@kantord kantord mentioned this pull request Oct 14, 2026
41 tasks done
@kantord
kantord marked this pull request as ready for review October 15, 2026 08:41

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

Thanks Daniel. Clean extraction: the four sites now share one disabled rule and one key, and the tests pin the missing-target and remount behaviour. LGTM.

@kantord
kantord force-pushed the studio-followups/11-pending-ask-card branch 6 times, most recently from 2c822a1 to 4e6490c Compare October 15, 2026 13:00
@kantord
kantord force-pushed the studio-followups/11-pending-ask-card branch from 4e6490c to 4479d4a Compare October 15, 2026 13:26
The PresentPlan ? PlanReviewCard : ApprovalPanel ternary, with its key and
the missing-controlTarget disabled rule, was copied in the transcript,
Message, the side panel, and the tool-call list. One PendingAskCard now owns
it; each surface still passes its own predicates and handlers.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kantord
kantord force-pushed the studio-followups/11-pending-ask-card branch from 4479d4a to c502327 Compare October 15, 2026 14:01
@kantord
kantord merged commit 87c7f7a into main Oct 15, 2026
31 checks passed
@kantord
kantord deleted the studio-followups/11-pending-ask-card branch October 15, 2026 14:07
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Oct 20, 2026
2 tasks
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.

2 participants