Skip to content

Fix live show "Go to Page" navigation for pages 100+#876

Merged
Tim020 merged 1 commit intodevfrom
fix/875-live-show-jump-to-page
Jan 26, 2026
Merged

Fix live show "Go to Page" navigation for pages 100+#876
Tim020 merged 1 commit intodevfrom
fix/875-live-show-jump-to-page

Conversation

@Tim020
Copy link
Copy Markdown
Contributor

@Tim020 Tim020 commented Jan 26, 2026

Summary

  • Fixes string comparison bug in loadCompiledScript() that prevented "Go to Page" from working for pages 100+
  • Object.entries() returns page numbers as strings, causing "100" > "99" to evaluate false (lexicographic comparison)
  • Added parseInt() to convert page keys to integers before comparison
  • Added Number() defense-in-depth in navigateTo() check

Root Cause

When comparing page numbers to find maxLoadedPage, string comparison was used:

  • "100" > "99" compares "1" vs "9"false
  • This caused maxLoadedPage to incorrectly cap at "99"
  • Navigation to page 100+ would fail silently

Test plan

  • Verified bug with diagnostic logging (maxLoadedPage was "99" with 117 pages loaded)
  • Manual test: Jump to page 100 now highlights line correctly
  • Manual test: Subsequent navigation maintains position
  • ESLint passes
  • Vitest passes (83 tests)

Fixes #875

🤖 Generated with Claude Code

Parse page numbers as integers in loadCompiledScript() to fix string
comparison bug. Object.entries() returns keys as strings, causing
"100" > "99" to evaluate false (lexicographic comparison).

Also add Number() defense-in-depth in navigateTo() check.

Fixes #875

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Tim020 Tim020 added the claude Issues created by Claude label Jan 26, 2026
@github-actions github-actions bot added client Pull requests changing front end code xsmall-diff labels Jan 26, 2026
@Tim020 Tim020 linked an issue Jan 26, 2026 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown

Client Test Results

83 tests   83 ✅  0s ⏱️
 3 suites   0 💤
 1 files     0 ❌

Results for commit 7ce75cc.

@github-actions
Copy link
Copy Markdown

Python Test Results

  1 files    1 suites   38s ⏱️
313 tests 313 ✅ 0 💤 0 ❌
318 runs  318 ✅ 0 💤 0 ❌

Results for commit 7ce75cc.

@Tim020 Tim020 merged commit 46c9d6f into dev Jan 26, 2026
24 checks passed
@Tim020 Tim020 deleted the fix/875-live-show-jump-to-page branch January 26, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude Issues created by Claude client Pull requests changing front end code xsmall-diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Live show jump to page loses location

1 participant