Skip to content

fix(site/src/pages/AgentsPage): ignore portaled Escape and drops in the composer frame - #30640

Closed
DanielleMaywood wants to merge 1 commit into
refactor/agents-remove-chat-inputfrom
fix/agents-portal-escape
Closed

DanielleMaywood wants to merge 1 commit into
refactor/agents-remove-chat-inputfrom
fix/agents-portal-escape

Conversation

@DanielleMaywood

Copy link
Copy Markdown
Collaborator

Follow-up in the #30545 composer refactor stack. Depends on #30639.

The composer Frame handled every Escape and drag event that bubbled through its React tree, including events from portaled menus and dialogs. Pressing Escape to close the plus menu while streaming interrupted the stream, and while editing a history message it canceled the edit.

Frame now ignores keyboard and drag events whose target is outside its DOM. This replaces FrameEventBoundary, which wrapped only the preview and disconnect dialogs and missed the plus menu.

Key decisions
  • Containment check (currentTarget.contains(target)) covers every portaled child, so FrameEventBoundary and its wrappers are removed.
  • Drag safety is unchanged: portaled dragover/drop events return before preventDefault, matching the old stopPropagation boundary.
  • One table test covers plus-menu Escape for streaming and history-edit states.

Generated by Coder Agents on behalf of @DanielleMaywood.

@linear-code

linear-code Bot commented Oct 13, 2026

Copy link
Copy Markdown

CODAGT-1405

@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

Closing stack until can be re-prioritized

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.

1 participant