Skip to content

Open a lab clicked in the side nav while the catalog is still loading - #85

Merged
returnvalue merged 1 commit into
mainfrom
claude/project-thread-gzl07l
Nov 8, 2026
Merged

returnvalue merged 1 commit into
mainfrom
claude/project-thread-gzl07l

Conversation

@returnvalue

Copy link
Copy Markdown
Collaborator

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 completed on 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_navigate listener) 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 build passes.
  • The test passes repeatedly under CPU throttling with the fix.

Generated by Claude Code

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
@returnvalue returnvalue self-assigned this Nov 8, 2026
@returnvalue
returnvalue merged commit 06430ac into main Nov 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants