Repository navigation
fork: command palette test clears a leaked last-used project (upstream #35107) - #11
Merged
Merged
Conversation
…ngdotgg#35107) Upstream's own fix, cherry-picked unchanged. Browser test files share one origin's localStorage, so a last-used project left by an earlier file hides the "New thread in <project>" row. "New thread in..." then becomes the first row and ArrowDown moves past it, which fails Test Web 2 on fork PRs whenever such a file runs before CommandPalette.browser.test.tsx in the same worker. (cherry picked from commit 5fae2b5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes the random Test Web 2 failure
CommandPalette.browser.test.tsx > highlights the first project when New thread in... opens from the root list(PR #8 both attempts, PR #4 run 43233261391, PR #6 run 43218151901; 4 of the 11 finished Test Web 2 runs).Cause (test, not component). Browser test files run one after another in the same browser context and share one origin's localStorage. A file that leaves
t3code:last-used-project:v1pointing at a project that this test does not list hides the default "New thread in " row. "New thread in..." is then the first row, already highlighted, so the test's ArrowDown moves past it to "Go to file" and thedata-highlightedwait times out (the 15 s failure in CI). Whether it fails depends on which files the shard runs before it in the same worker, which is why it looked random and never failed when run alone.Fix. Upstream's own fix, cherry-picked unchanged: pingdotgg/t3code 5fae2b5 (pingdotgg#35107, 2026-11-12), which is newer than the fork's upstream base dc032d7.
setup()removes the remembered project before each test. Upstream had the same flake, so this goes away for the fork the next time it follows upstream as well; this PR only gets it sooner.Repro, locally.
beforeEach, as an earlier file does: 20/20 fail, with the same assertion as CI.Lint and format are clean for the file. Known red on fork PRs from fork main (Lint, schema check) is fixed by #8, not here.
General vs project
General: a test fix taken from upstream, nothing specific to this fork.
🤖 Generated with Claude Code