Skip to content

Fix WebMCP results for forms and navigation - #367

Open
rgarcia wants to merge 5 commits into
mainfrom
hypeship/fix-webmcp-invocations
Open

Fix WebMCP results for forms and navigation#367
rgarcia wants to merge 5 commits into
mainfrom
hypeship/fix-webmcp-invocations

Conversation

@rgarcia

@rgarcia rgarcia commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • return awaiting_submission with structured form state as soon as Chromium populates a non-autosubmit declarative form
  • keep terminal WebMCP invocations alive across frame navigation so late toolResponded events are preserved
  • add CDP fixtures covering a form that never emits a terminal response and a result delivered after navigation commits
  • document and type the new invocation status

Why

Non-autosubmit declarative forms intentionally remain active after Chromium fills them, so waiting for a terminal event turns successful form population into a timeout. Separately, navigation can begin before Chromium emits a valid terminal tool result. These states should not be reported as unknown outcomes.

Validation

  • go vet ./...
  • go test -race ./lib/webmcpclient ./cmd/api/api ./lib/oapi
  • full non-e2e race suite passed across the run; lib/devtoolsproxy required one retry after a transient Chromium TempDir cleanup failure
  • bun test runtime/*.test.ts
  • rebuilt the headful image from head commit e022a44 and exercised the full public Stripe checkout from one /playwright/execute request using webmcp.invokeTool: form fill returned awaiting_submission with form_populated: true and submitted: false in 8.9ms, submission returned completed in 80.0ms, and the confirmation page loaded successfully

Comment thread server/lib/webmcpclient/client.go
Comment thread server/lib/webmcpclient/client.go

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit eaf54ba. Configure here.

Comment thread server/lib/browsersurface/frames.go
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