Repository navigation
test(CommandPalette): the lookup-work test finds its options without a visibility check per option - #8725
Merged
Conversation
…a visibility check per option
The test counts the reads a mouseover makes to find its option (at most one, at 50 and at 500 items), but it found the options with getAllByRole('option'), which checks each one's visibility through jsdom's getComputedStyle, its ancestors' included: about 4.5 s per query at 500 options, twice per run, so the case took about 9 s alone and passed its 30 s budget only without load (it timed out in loaded full runs). The option queries now pass {hidden: true}; the combobox query still checks that the open palette is visible.
The 500-item case now takes about 0.6 s. With the test budget cut to 4 s (the 30 s budget under a sevenfold slowdown), it timed out before and passes after. A handler that scans the list (findIndex over the items) still fails it at both sizes (50 and 500 reads).
vjeux
requested review from
cixzhang,
imdreamrunner and
josephfarina
as code owners
October 27, 2026 18:04
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
AI review status for this pull request.
|
Contributor
There was a problem hiding this comment.
This test-only change looks good to merge: passing {hidden: true} to the option queries removes the per-option visibility checks that dominated the test's runtime, and the read-count assertion still fails a lookup that scans the list, at both 50 and 500 items. No changes are needed.
[Automated review]
4 tasks done
This branch was successfully deployed
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.
Review only this PR's change: vjeux/astryx@ad427c2...a883bdc
Maintainer impact
CommandPalette.perf.test.ts› "bounds lookup work with 500 items" times out at its 30 s budget in loaded full runs and passes alone. It counts the reads a mouseover makes to find its option, but it found the options withgetAllByRole('option'), which checks each option's visibility through jsdom'sgetComputedStyle, its ancestors' included: about 4.5 s per query at 500 options, twice per run, so the case took about 9 s alone.Intended invariant
A test's time goes to what it checks; here that is the lookup's reads, a count no load changes.
Change
The option queries pass
{hidden: true}, which skips the per-option visibility check; the combobox query still checks that the open palette is visible. The read-count assertion is unchanged.Evidence
findIndexover the items) still fails the test at both sizes (50 and 500 reads).Scope
Testing
check:changesets.