Repository navigation
Conversation
textContent() could read below-the-fold elements while all() and element() could not even find them, and getTree returned null on the live renderer, so the paint-independent text path had no way to resolve a locator. Add getFullTree to the automation protocol (validated like every other method, served by both backends) and build allInTree()/elementInTree() on it; textContent() now resolves through it too.
Owner
|
Closing: |
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.
Closes #146.
What this adds
A paint-independent locator view over the retained tree, so automation can find and read elements regardless of how they painted:
getFullTreeprotocol method — same shape asgetTree, but it does not force a render. The retained tree already holds every mounted element; paint state is only in the bounds map.locator.allInTree()/elementInTree()— resolve selectors against that tree. An element below the fold in anoverflow: scrollcontainer, clipped byoverflow: hidden, or outside a virtual list's window still carries its id, testId and text.textContent()now resolves throughelementInTree(). Text reads never needed paint; only the resolution did.Why
#146: on a live app
getTreereturns{ tree: null },getAllText()never reached the JS client, and a below-the-foldtestId="sidecar-info"footer could be read bytextContent()but not located by text or testId — exactly the M4 case in the Voce prototype evidence logs (https://github.com/espetro/voce-gpuix-prototype,evidence/m3-automation.log,evidence/m4-packaged-automation.log).Companion to #144 (scrollIntoView), which makes such elements clickable once found; this one makes them findable and readable first.
Notes
protocol.tsgains one validated method,client.tsgains the in-process handler plus the three locator methods, README gains a paragraph. No Rust changes; the live napi renderer already accepts aforceRenderflag ongetAutomationTreeand the test renderer's tree is retained.@gpuix/nativeand@gpuix/react(minor).Testing
packages/react/src/__tests__/automation.test.tsx: 100pxoverflow: scrollviewport, 600px content, footer at the bottom; asserts the footer resolves throughallInTree()/textContent()/getByTextwhile painted bounds stay clipped. Full automation suite: 8 passed;packages/reactsuite green except a pre-existing flakyeventsframe-loop timing test unrelated to this change.packages/native:tsc --noEmitclean;bun run build:jsregeneratesdist/automation.Harness: Maki CLI
Agent: none
Model: bifrost/zai-coding-plan/glm-4.5-air
User prompts
MANDATORY GUI HYGIENE RULES — the following block is reproduced verbatim from /Users/josocjoq/voce-next-phase/E-m4-hygiene-rules.txt and overrides everything:
MANDATORY GUI HYGIENE RULES (user pain point: prior lanes opened dozens of instances and the constant focus capture made the computer unusable):
Upstream contribution strategy (mandatory): issue+PR pair in the espetro/gpuix fork, contribute upstream to remorses/gpuix; never approve deployments. Keep every diff minimal and reviewable. Use branches off espetro/gpuix, open PRs against remorses/gpuix, reference the M3/M4 evidence logs in issue bodies for reproduction context, and never merge upstream PRs yourself.
M5 objective from STATUS.md: turn the documented GPUIX blocker list into filed issue+PR pairs against remorses/gpuix, not new prototype features. Prioritize in this order:
Constraints: do not redesign the prototype; do not start extra app instances; prefer headless evidence and automation-protocol assertions. GUI use is only for contribution validation evidence if truly required, under the hygiene rules above. Heavy compiles/tests must use flock /tmp/tsc.lock. Never use npm or pip. Commit atomically with conventional messages and no co-author trailers. Push contribution branches as needed for PR creation, but do not push unrelated prototype history. If a contribution is blocked by missing upstream access, missing tests, or an unclear API, document the blocker precisely and continue with the next contribution rather than stalling.
Completion requirements: update /Users/josocjoq/voce-gpuix-prototype/STATUS.md with an M5 section listing each issue/PR URL, branch, validation performed, and remaining blocker if any. End with a final ps verification showing zero prototype/sidecar/ffmpeg/app strays. Report in your last message: M5 status, issue/PR links, validation evidence, blockers and disposition, and confirmation that zero stray processes remain.