Repository navigation
test(agent): pin the tab picker popover - TabPickerPopover (Closes #1535) - #1966
Merged
Merged
Conversation
Summary by t27-beesThis PR adds a pin test for Worth a look
Read: 1 files, +127 -0, the whole diff. Head |
β Tests passed β 3632/3702
|
Collaborator
Author
|
CI gates on this SHA:
Dmitrii Fedorov (@dmitrii-f-t27) |
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 #1535
What changed
One new file:
trios/agent-server/apps/agent/components/elements/tab-picker-popover.test.ts(the path the issue's Success Criteria names). The subjecttab-picker-popover.tsxis untouched.The 1 exported symbol is exercised (1
it(block; 0 blocked). The picker reads the browser's tab list through useAvailableTabs, so that seam is stubbed with a full stand-in - every field the picker destructures (the filtered tabs, the whole list and the loading flag), the chrome query never running in its effect. Radix portals never flush through a static render, so the popover kit is stubbed with a portal-free stand-in that keeps the real kit's contract for the pieces the picker reads: the trigger always renders, the content only while open (the flag passed down through a closure the factories of one render share). Measured, the pins read both variants the export dispatches on: the mention variant renders nothing while closed, and while open answers the tab list - the header with its filter hint, and the tab titles with their URLs; the selector variant answers its trigger with the children handed in.Not pinned, and why (issue User Story 2): the picking flow itself - the keyboard navigation, the tab toggling, the scroll into view - they live in handlers and effects that need a live document and window. The port env seam is seeded before any import can reach the env module (its one-time snapshot - the trap the agent-outputs suite documented), with the subject imported dynamically for that reason.
How it was verified (FR-004)
1 pass / 0 fail / 7 expect() calls, Ran 1 test across 1 file.0 pass / 1 fail / 2 expect() calls. The subject was restored byte-identical (git checkout;git diff --name-onlyprints nothing) and the suite passes again.bun run typecheckrunswxt prepare, whose generated.wxt/tsconfig.jsonmakes bun 1.3.6 stop resolving@/aliases for test runs until that generated directory is removed. CI's Tests jobs never runwxt prepare; every run quoted above is from a checkout without.wxt/.Not verified
Tests / agentjob re-runs the suite on this SHA.Dmitrii Fedorov (@dmitrii-f-t27)