Skip to content

fix(ui): confirm app messages inside the app view instead of a native dialog - #164493

Merged
steipete merged 2 commits into
mainfrom
steipete/mcp-app-message-confirm
Oct 3, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/mcp-app-message-confirm

Conversation

@steipete

@steipete steipete commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

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

  • Mounted mcp-app-view, board widget frame, and bridge regressions cover: strip appears on request; Cancel/Escape resolves false and dispatches nothing; Send dispatches the unchanged MCP_APP_MESSAGE_EVENT detail; a second request while pending is refused; stale bindings cancel. 133 focused tests green; format, diff-check, type-aware lint, tsgo lanes, Knip, madge, full check-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.ts 14.37 s; board-widget-frame.test.ts 4.58 s; mcp-app-bridge.test.ts 7.47 s; mcp-app-security.test.ts 4.92 s; widget-bridge.test.ts 2.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):

440 px Desktop
before before
after after

… 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.
@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: L labels Oct 3, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 3, 2026
@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 3, 2026, 4:02 PM ET / 20:02 UTC (Revision 2).

ClawSweeper review

What this changes

The 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
Reviewed head: c16fbbeedc3830ec194a962c69ea37d0d406a219

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with inspected visual evidence, coherent ownership, and useful lifecycle regressions has no supported blocking finding.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected browser-fixture before/after screenshots show the shared confirmation owner's visible message strip at narrow and desktop widths. Mounted-view, private-board-bridge, and real SDK transport tests supplement cancellation and dispatch coverage; screenshots do not establish live delivery. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected browser-fixture before/after screenshots show the shared confirmation owner's visible message strip at narrow and desktop widths. Mounted-view, private-board-bridge, and real SDK transport tests supplement cancellation and dispatch coverage; screenshots do not establish live delivery. No stored-data contract changes.
Evidence reviewed 9 items Pinned introduction: Reviewed the merge-base-to-head introduced hunks across the supplied paths. Base-branch drift was excluded from PR ownership; the supplied verified test merge identifies the same resulting change surface.
Still necessary on current main: The current-main message handler still invokes window.confirm. No merged fixing PR or shipped implementation of the pane confirmation was established.
Related merged work: The supplied GitHub-verified merged #164277 explicitly deferred replacement of native app-to-conversation confirmation. This PR addresses that distinct remaining repair.
Findings None None.
Security None None.

How this fits together

MCP 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +260, Tests +409, Docs +2. Total +671 across 18 files.

View PR surface stats
Area Files Added Removed Net
Source 12 349 89 +260
Tests 5 430 21 +409
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 18 781 110 +671

Review metrics

Metric Value Why it matters
Production versus test growth production +260 lines; tests +409 lines Production growth supplies the shared confirmation UI and its lifecycle, while tests protect distinct message, board, and file boundaries.

Technical review

Best 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.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. Inspected browser-fixture before/after screenshots show the shared confirmation owner's visible message strip at narrow and desktop widths. Mounted-view, private-board-bridge, and real SDK transport tests supplement cancellation and dispatch coverage; screenshots do not establish live delivery. No stored-data contract changes.

Label justifications:

  • P2: This repairs a bounded confirmation failure in embedded App and widget workflows without changing configuration or stored state.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected browser-fixture before/after screenshots show the shared confirmation owner's visible message strip at narrow and desktop widths. Mounted-view, private-board-bridge, and real SDK transport tests supplement cancellation and dispatch coverage; screenshots do not establish live delivery. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected browser-fixture before/after screenshots show the shared confirmation owner's visible message strip at narrow and desktop widths. Mounted-view, private-board-bridge, and real SDK transport tests supplement cancellation and dispatch coverage; screenshots do not establish live delivery. No stored-data contract changes.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected browser-fixture before/after screenshots show the shared confirmation owner's visible message strip at narrow and desktop widths. Mounted-view, private-board-bridge, and real SDK transport tests supplement cancellation and dispatch coverage; screenshots do not establish live delivery. No stored-data contract changes.

Evidence

What I checked:

  • Pinned introduction: Reviewed the merge-base-to-head introduced hunks across the supplied paths. Base-branch drift was excluded from PR ownership; the supplied verified test merge identifies the same resulting change surface. (c16fbbeedc38)
  • Still necessary on current main: The current-main message handler still invokes window.confirm. No merged fixing PR or shipped implementation of the pane confirmation was established. (ui/src/components/mcp-app-view.ts:511, e7090f6d88be)
  • Related merged work: The supplied GitHub-verified merged fix(mcp): keep app forms, file updates and context in sync after live testing #164277 explicitly deferred replacement of native app-to-conversation confirmation. This PR addresses that distinct remaining repair. (e9060685284b)
  • Confirmation lifecycle: The shared presentation owner rejects concurrent requests, cancels stale decisions, checks the current binding before accepting, and restores frame focus. The view checks session, agent, connection revision, client, resources, and ended state. (ui/src/components/mcp-app-confirm.ts:75, c16fbbeedc38)
  • Final dispatch safeguards: Message and widget dispatch preserve content and command validation and recheck frame interactability after confirmation. File opening rechecks disposal and frame focus before requesting the file, then checks disposal again before publishing its event; existing conversation custody remains intact. (ui/src/components/mcp-app-bridge.ts:157, c16fbbeedc38)
  • Inspected visual proof: Inspected all four prepared before/after images from the captured PR body. The synthetic browser fixture shows the new named message preview and Send/Cancel controls at narrow and desktop widths. These images establish visible presentation, not live provider delivery or security-boundary behavior. (c16fbbeedc38)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • RoboClaw: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-03T19:47:26.113Z sha c16fbbe :: needs maintainer review before merge. :: none

@steipete steipete self-assigned this Oct 3, 2026
@steipete
steipete marked this pull request as ready for review October 3, 2026 19:57
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Oct 3, 2026
@steipete
steipete merged commit 668c062 into main Oct 3, 2026
145 of 146 checks passed
@steipete
steipete deleted the steipete/mcp-app-message-confirm branch October 3, 2026 20:08
@steipete

steipete commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Oct 3, 2026
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.
steipete added a commit that referenced this pull request Oct 3, 2026
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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 4, 2026
… 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
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 4, 2026
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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 4, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant