Repository navigation
Open a lab clicked in the side nav while the catalog is still loading - #85
Merged
Merged
Conversation
On a slow machine, a side-nav lab link clicked just after the catalog arrived was ignored: the URL listener still held the empty list from before the catalog loaded, so the page stayed on the previous lab while the address bar showed the new one. This failed the e2e test 'lab links land on the first step not yet completed' twice on the v2.4.0 tag build. The listener now reads the catalog from a ref that is filled as soon as it loads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GWoueV3yPeP5Q297rR85vN
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.
Requested by Chris · project thread
Why
The v2.4.0 tag build (run) failed the e2e test
lab links land on the first step not yet completedon both attempts. The main build of the same commit passed, so it's timing-dependent.The cause is a race in the Labs page: the side-nav click handler (
floci_navigatelistener) held the lab list from its last subscription. If a click landed after the catalog arrived but before the listener re-subscribed with the loaded list, the click was ignored. The page stayed on the previous lab while the address bar showed the new one. I reproduced this locally with CPU throttling (screenshot showed lesson #2 open, #3 highlighted in the nav).Change
LabsConsole.tsx: the listener reads the catalog from a ref that is filled the moment the catalog loads, so it no longer depends on a re-render. Rebuilt dist.Checks
ruff check .passes,npm run buildpasses.Generated by Claude Code