Repository navigation
fix(ui): confirm app messages inside the app view instead of a native dialog - #164493
Conversation
… dialog Show a shared pane-owned confirmation for MCP App conversation messages, board widget prompts, and App file opens so embedded hosts can present the decision reliably. Preserve dispatch validation, rate limits, and custody while rejecting pending decisions after their view or connection is retired.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 3, 2026, 4:02 PM ET / 20:02 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR replaces native dialogs with shared in-pane confirmation controls for MCP App messages, board widget prompts, and workspace file opens. Merge readiness✅ Ready for maintainer review This remains a useful repair: current main still uses native confirmation, and the related merged work explicitly deferred this behavior. No actionable introduced defect was found. Priority: P2 Review scores
Verification
How this fits togetherMCP Apps and board widgets display server-provided content inside isolated frames in the Control UI. Their host bridges validate requests and obtain confirmation before forwarding messages or opening files through the existing conversation and workspace owners. flowchart TD
A[App or widget request] --> B[Host bridge validation]
B --> C[Pane confirmation]
C --> D[Cancel]
C --> E[Confirm]
E --> F[Current binding and frame checks]
F --> G[Conversation or workspace owner]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +260, Tests +409, Docs +2. Total +671 across 18 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep confirmation owned by each pane while preserving existing dispatch validation, current-binding checks, and conversation custody. Do we have a high-confidence way to reproduce the issue? Yes for the source mechanism: current main depends on window.confirm, so hosts that suppress it reject these requests. Embedded-host failure was not independently executed in this read-only review. Is this the best way to solve the issue? Yes. A shared pane-owned confirmation fits the existing UI owner and preserves the validated dispatch paths without introducing another configuration or protocol surface. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e7090f6d88be. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
The in-view confirmation change in #164493 made mcp-app-view a flex container, but the board stylesheet still overrode its shadow host with display: block. The iframe fell back to 150px and left a 602px bottom gap. Bisect identified 668c062 as the first bad commit; its immediate parent passes the same browser test. Remove the stale board display override so the component owns its iframe and confirmation layout. Preserve the in-view confirmation strip and restore fullscreen, resized, and split dashboard sizing. Repairs checks-ui-e2e (8/9), run 37152416737, failing the board MCP App runtime-retention scenario. The unchanged single-file e2e passes all five tests, and the board/MCP App unit and browser suites pass all 142 tests. Targeted formatting, stylesheet lint, and git diff --check pass.
Let the MCP App view own its fill-container display layout instead of overriding it from board CSS. Preserve the existing frame geometry, runtime identity, and draft retention assertions. Update the conformance fixture to record its completed Gateway connection and drive the in-pane confirmation introduced by #164493. Proved the original 602px gap and the restored zero-gap layout on the Linux rig.
… dialog (openclaw#164493) * fix(ui): confirm app messages inside the app view instead of a native dialog Show a shared pane-owned confirmation for MCP App conversation messages, board widget prompts, and App file opens so embedded hosts can present the decision reliably. Preserve dispatch validation, rate limits, and custody while rejecting pending decisions after their view or connection is retired. * refactor(ui): trim app confirmation strip
The in-view confirmation change in openclaw#164493 made mcp-app-view a flex container, but the board stylesheet still overrode its shadow host with display: block. The iframe fell back to 150px and left a 602px bottom gap. Bisect identified fb9aabd as the first bad commit; its immediate parent passes the same browser test. Remove the stale board display override so the component owns its iframe and confirmation layout. Preserve the in-view confirmation strip and restore fullscreen, resized, and split dashboard sizing. Repairs checks-ui-e2e (8/9), run 37152416737, failing the board MCP App runtime-retention scenario. The unchanged single-file e2e passes all five tests, and the board/MCP App unit and browser suites pass all 142 tests. Targeted formatting, stylesheet lint, and git diff --check pass.
Let the MCP App view own its fill-container display layout instead of overriding it from board CSS. Preserve the existing frame geometry, runtime identity, and draft retention assertions. Update the conformance fixture to record its completed Gateway connection and drive the in-pane confirmation introduced by openclaw#164493. Proved the original 602px gap and the restored zero-gap layout on the Linux rig.
Related: #164277
What Problem This Solves
Fixes: when an MCP App asks to send a message into the conversation (or a board widget asks to prompt, or an App asks to open a workspace file), the host confirmed with the native
window.confirm(). Embedded hosts such as the desktop app's browser pane, web views, and kiosk windows suppress or auto-cancel native dialogs, so the click did nothing with no feedback.User Impact
User impact: the confirmation now appears inside the App view itself with the App's name, the message preview, and Send / Cancel buttons (Enter sends, Escape cancels, focus moves to the strip and back). It works in every surface the view renders in, including the Apps split view, fullscreen, and dashboards. One confirmation is pending per view; a second request while one is open is refused, as a cancelled dialog was before.
Why This Change Was Made
A single pane-owned confirmation (
McpAppConfirm) replaces the three native-dialog call sites (App messages, board widget prompts, App file opens) so there is one owner; every existing safety check stays (length cap, host-command rejection, frame interactability, rate limit, current-binding checks after the await). The strip renders in the same chrome slot as the existing inactive-view banner.Evidence
mcp-app-view, board widget frame, and bridge regressions cover: strip appears on request; Cancel/Escape resolves false and dispatches nothing; Send dispatches the unchangedMCP_APP_MESSAGE_EVENTdetail; a second request while pending is refused; stale bindings cancel. 133 focused tests green; format, diff-check, type-aware lint, tsgo lanes, Knip, madge, fullcheck-changed, and the matched-base startup check pass; Codex autoreview at P1 scoped-clean.The behavior-neutral cleanup shares the existing inactive-banner CSS, removes duplicate pre-dispatch checks from the presentation owner, and retains the proven post-insertion focus microtask. Production LOC changed from +262 to +260; test files are unchanged. The post-trim focused run passed all 133 tests, and a fresh Codex P1 review returned scoped-clean.
Single-worker per-file wall costs (
node scripts/run-vitest.mjs <file> --maxWorkers=1, measured before the behavior-neutral trim):mcp-app-view.test.ts14.37 s;board-widget-frame.test.ts4.58 s;mcp-app-bridge.test.ts7.47 s;mcp-app-security.test.ts4.92 s;widget-bridge.test.ts2.67 s. The unchanged full focused selection passed after trimming in 15.15 s of runner time. CI timing will be available on the attached run.Before/after (synthetic fixture):