Skip to content

chore(recorder): mint page aliases in the language generators#41728

Open
dgozman wants to merge 1 commit into
microsoft:mainfrom
dgozman:chore-recorder-page-alias
Open

chore(recorder): mint page aliases in the language generators#41728
dgozman wants to merge 1 commit into
microsoft:mainfrom
dgozman:chore-recorder-page-alias

Conversation

@dgozman

@dgozman dgozman commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The recorder no longer names the pages of the generated source code. Actions and signals carry only pageGuid; each language generator lazily mints page, page1, … into its own pageGuid -> alias map, cleared by a new LanguageGenerator.reset() that generateCode() calls.
  • PopupSignal.popupAlias was literally the popup page's own pageAlias, so it becomes popupPageGuid and resolves through the same map.
  • FrameDescription held nothing but pageGuid once the alias was gone, so it is inlined into ActionInContext/SignalInContext.
  • Drops Recorder._pageAliases, _lastPopupOrdinal, _describeMainFrame, mainFrameForAction(), C#'s _formatPageAlias(), and the pageAlias parameter of RecorderSignalProcessor.signal().

Generated output is unchanged. JSONL records now carry pageGuid only.

ProgrammaticRecorderApp generates one action at a time against a long-lived generator, so it calls generateAction() directly rather than generateCode(), which would reset the alias map on every action.

@dgozman dgozman requested a review from Skn0tt July 10, 2026 12:48
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

The recorder was naming the pages of the generated source code (page,
page1, ...) and stamping the name onto every action. Drop it: actions and
signals now carry only `pageGuid`, and each language generator lazily mints
its own aliases into a pageGuid -> alias map, cleared by a new `reset()`
that `generateCode()` calls.

`PopupSignal.popupAlias` was the popup page's own alias, so it becomes
`popupPageGuid` and resolves through the same map. `FrameDescription` held
nothing else, so `pageGuid` moves onto `ActionInContext`/`SignalInContext`
directly, and `mainFrameForAction()` goes away — the caller already has the
frame the action came from.
@dgozman dgozman force-pushed the chore-recorder-page-alias branch from 950baa8 to dacd060 Compare July 11, 2026 14:06
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@dgozman dgozman closed this Jul 11, 2026
@dgozman dgozman reopened this Jul 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

6 failed
❌ [chrome] › mcp/cli-navigation.spec.ts:56 › goto chrome:// page that closes the tab does not crash the response @mcp-windows-latest-chrome
❌ [chromium] › mcp/cli-killall.spec.ts:42 › kill-all kills filtered dashboard pid @mcp-macos-latest-chromium
❌ [chromium] › mcp/annotate.spec.ts:292 › should enter annotate mode on fresh dashboard.tsx mount with -s --annotate @mcp-windows-latest-chromium
❌ [firefox] › mcp/annotate.spec.ts:173 › user-initiated annotate downloads zip with feedback.md @mcp-macos-latest-firefox
❌ [firefox] › mcp/cli-killall.spec.ts:42 › kill-all kills filtered dashboard pid @mcp-macos-latest-firefox
❌ [webkit] › mcp/cli-killall.spec.ts:42 › kill-all kills filtered dashboard pid @mcp-ubuntu-latest-webkit

7754 passed, 1249 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

2 flaky ⚠️ [chromium-library] › library/popup.spec.ts:260 › should not throw when click closes popup `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:717 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node24`

49546 passed, 1161 skipped


Merge workflow run.

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