Skip to content

chore(recorder): unify action coalescing and simplify action types - #41958

Merged
dgozman merged 1 commit into
microsoft:mainfrom
dgozman:recorder-unify-coalescing
Jul 24, 2026
Merged

chore(recorder): unify action coalescing and simplify action types#41958
dgozman merged 1 commit into
microsoft:mainfrom
dgozman:recorder-unify-coalescing

Conversation

@dgozman

@dgozman dgozman commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Derive double click from event.detail in onClick and drop onDblClick.
  • Coalesce click/fill/navigate in the RecorderSignalProcessor so every action is emitted once; delete collapseActions/shouldMergeAction and the actionUpdated recorder event — actions are never updated or collapsed downstream.
  • Move signals off actions.Action onto ActionInContext, and drop the now-unused action timestamps and SignalInContext.timestamp.
  • The recorderMode: 'api' event sink now receives Action/Signal instead of the *InContext wrappers, and signalAdded carries the re-generated code for the action the signal attaches to.

Follow-up to #41902.

- Derive double click from event.detail in onClick and drop onDblClick.
- Coalesce click/fill/navigate in the signal processor so every action
  is emitted once; delete collapseActions/shouldMergeAction and the
  actionUpdated recorder event (actions are never updated downstream).
- Move signals from actions.Action onto ActionInContext and drop the
  now-unused action timestamps and SignalInContext.timestamp.
- The api recorder event sink receives Action/Signal instead of the
  *InContext wrappers, and signalAdded carries the re-generated code for
  the action the signal attaches to.
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

6 flaky ⚠️ [chromium-library] › library/video.spec.ts:495 › screencast › should capture static page in persistent context @smoke `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:736 › screencast › should work with video+trace `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/popup.spec.ts:260 › should not throw when click closes popup `@chromium-ubuntu-22.04-node24`
⚠️ [firefox-page] › page/page-event-request.spec.ts:181 › should return response body when Cross-Origin-Opener-Policy is set `@firefox-ubuntu-22.04-node20`
⚠️ [playwright-test] › ui-mode-test-update.spec.ts:202 › should update test locations `@ubuntu-latest-node24`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:827 › should update state on subsequent run `@windows-latest-node22`

50235 passed, 1190 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

2 failed
❌ [firefox] › mcp/annotate.spec.ts:446 › should switch screencast to -s session on show --annotate @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-core.spec.ts:57 › click link @mcp-windows-latest-firefox

7784 passed, 1262 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot and I took a first look at the CI failures here.

🟢 Both failures are pre-existing flakes — this PR looks clear

The two red MCP tests (annotate.spec.ts:446 and cli-core.spec.ts:57, both mcp-windows-latest-firefox) fail on SHAs unrelated to this PR, and the diff only touches recorder codegen/signals — no MCP tool code.

Details

This PR (chore(recorder): unify action coalescing) changes the injected recorder, isomorphic codegen, and recorderSignalProcessor/recorderApp. It touches no tools//MCP backend files, so the MCP CLI code path these tests exercise isn't in the diff. "tests 1" reported only flaky tests; the two real failures are both MCP.

Pre-existing flake / infra

  • [firefox] › mcp/annotate.spec.ts:446 › should switch screencast to -s session on show --annotate — established cross-browser flake. Across the test-results DB it failed 31 runs on SHAs unrelated to this PR: firefox 14/406, webkit 7/417, chrome 6/416, chromium 4/413 — spanning ~167 PRs. Not engine- or PR-specific, and screencast session switching doesn't touch recorder codegen.

  • [firefox] › mcp/cli-core.spec.ts:57 › click link — rarer, but flakes independently of this PR: it failed on msedge on unrelated PR feat(firefox): roll to r1538 #41938 (d5e9066). Firefox itself was green 406/406 before this, so this is a first-seen firefox blip rather than a regression. The failing assertions check post-click navigation output (Page URL/Title) and the snapshot, not generated code — the codegen changes in this PR don't reach them.

Weaker call than the annotate one (single prior failure, different browser), but the diff genuinely doesn't reach the MCP click path, so I'd re-run it rather than treat it as caused here.

Triaged by the Playwright bot - agent run

@dgozman
dgozman merged commit dea59db into microsoft:main Jul 24, 2026
49 of 50 checks passed
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.

2 participants