chore(recorder): mint page aliases in the language generators#41728
Open
dgozman wants to merge 3 commits into
Open
chore(recorder): mint page aliases in the language generators#41728dgozman wants to merge 3 commits into
dgozman wants to merge 3 commits into
Conversation
Remove `FrameDescription.framePath` and instead prepend the chained frame selectors, separated by `internal:control=enter-frame` tokens, straight into `action.selector`. `asLocator()` already renders that token as `contentFrame()`, so the four language generators no longer need to build the frame chain by hand. Also fixes `JsonlLocatorFactory.chainLocators()` clobbering an existing `next` chain, which dropped the `frame` step from JSONL output.
Remove `ActionBase.preconditionSelector`. The injected recorder now passes the precondition selector to the server as a separate binding argument, and the server turns it into an `ExpectSignal` routed through the signal processor, so it attaches to the preceding action like any other signal. Each language generator renders the signal itself, appending an `assertVisible` after the action it is attached to. `generateAction()` now receives `LanguageGeneratorOptions` so generators can honour `generateExpectSignal`, renamed from `generateAutoExpect`.
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.
Contributor
Test results for "MCP"3 failed 7757 passed, 1249 skipped Merge workflow run. |
Contributor
Test results for "tests 1"1 flaky49531 passed, 1161 skipped Merge workflow run. |
Skn0tt
approved these changes
Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.