chore(recorder): mint page aliases in the language generators#41728
chore(recorder): mint page aliases in the language generators#41728dgozman wants to merge 1 commit into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
950baa8 to
dacd060
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Test results for "MCP"6 failed 7754 passed, 1249 skipped Merge workflow run. |
Test results for "tests 1"2 flaky49546 passed, 1161 skipped Merge workflow run. |
Summary
pageGuid; each language generator lazily mintspage,page1, … into its ownpageGuid -> aliasmap, cleared by a newLanguageGenerator.reset()thatgenerateCode()calls.PopupSignal.popupAliaswas literally the popup page's ownpageAlias, so it becomespopupPageGuidand resolves through the same map.FrameDescriptionheld nothing butpageGuidonce the alias was gone, so it is inlined intoActionInContext/SignalInContext.Recorder._pageAliases,_lastPopupOrdinal,_describeMainFrame,mainFrameForAction(), C#'s_formatPageAlias(), and thepageAliasparameter ofRecorderSignalProcessor.signal().Generated output is unchanged. JSONL records now carry
pageGuidonly.ProgrammaticRecorderAppgenerates one action at a time against a long-lived generator, so it callsgenerateAction()directly rather thangenerateCode(), which would reset the alias map on every action.