Skip to content

Unify context picker across template launch and create-agent dialogs - #562

Merged
selfcontained merged 1 commit into
mainfrom
agt_04f1562137ad/dispatch-task
May 20, 2026
Merged

Unify context picker across template launch and create-agent dialogs#562
selfcontained merged 1 commit into
mainfrom
agt_04f1562137ad/dispatch-task

Conversation

@selfcontained

Copy link
Copy Markdown
Owner

Summary

  • Extracts a shared ContextPicker component from the template launch dialog's inline context picker implementation
  • Replaces the inline context picker in both create-agent-dialog.tsx (~400 lines removed) and automations-launch-dialog.tsx (~500 lines removed) with the shared component
  • Fixes a latent paste-interception bug where React portal event bubbling caused the picker to intercept paste events from the portaled popover link input

Details

The template launch dialog and create-agent dialog each had their own full implementation of the context picker UI (clipboard reading, paste-mode fallback, file input, link drafts, add-context popover). This caused visual and behavioral drift between the two flows.

The shared ContextPicker component:

  • Manages internal state for clipboard, popover, and link drafts
  • Exposes onDraftInvalid callback so parents can gate submit buttons on link draft validity
  • Supports testIdPrefix prop for E2E test targeting across both layouts
  • Handles the onClipboardText callback absence gracefully (shows feedback instead of silently no-oping)

Test plan

  • E2E tests updated for new test IDs and behavior (13+ tests modified, all passing)
  • Type checking passes (pnpm run check)
  • Production build passes (pnpm run finalize:web)
  • Full E2E suite passes (141/141, 12 skipped terminal-live tests)
  • Frontend UX review persona approved (round 2)

🤖 Generated with Claude Code

Extract shared ContextPicker component from the template launch dialog
and use it in both the create-agent and template launch flows, ensuring
consistent UX for file/link/clipboard attachment across the app.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@selfcontained
selfcontained merged commit d4cd006 into mainMay 20, 2026
1 check passed
@selfcontained
selfcontained deleted the agt_04f1562137ad/dispatch-task branch May 20, 2026 06:00
Sign up for freeto 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.

1 participant

@selfcontained