Skip to content

Fit the skip list and loop-invariant visualizers on phones - #69

Open
A7med7x7 wants to merge 1 commit into
mainfrom
autopilot/fit-skip-list-and-invariant
Open

A7med7x7 wants to merge 1 commit into
mainfrom
autopilot/fit-skip-list-and-invariant

Conversation

@A7med7x7

@A7med7x7 A7med7x7 commented Nov 6, 2026

Copy link
Copy Markdown
Member

The rest of quality item 9 (from the visualizer audit): the last two visualizers that didn't fit a phone.

Visualizer Lesson Before (390 px) After
SkipListVisualizer (perfect and randomized) Advanced Algorithms skip-lists +184 px fits
Binary search with its invariant Discrete Mathematics loop-invariants +136 px fits

Change: below the sm breakpoint only, skip-list columns are 24 px (from 38 px) and the invariant cells 22 px (from 40 px), with 11 px text and tighter gaps. Desktop sizes are unchanged.

Checked, with Playwright against the production build, at 390 px (light and dark) and 1280 px:

  • no sideways scroll, and the layout stays horizontal: the skip-list grid keeps all 12 columns (header + 10 keys + ∞) and the invariant cells stay on one row;
  • screenshots: search path, current node, lo..hi window and mid all readable.
  • npm run lint (0 errors), tsc (app and node), npm run test (50 files, 2,503 tests), npm run build.

The CSS variable for the skip-list column width is defined on the same element that uses it, avoiding the collapse bug caught in #64.

Note for local builds: after #68, npm run build runs out of Node's default heap on a 16 GB machine. NODE_OPTIONS=--max-old-space-size=6144 npm run build works. CI builds with Bun and is unaffected.


Generated by Claude Code

The last two visualizers from the audit's quality item 9 were too wide
at 390 px: skip lists by 184 px (fixed 38 px columns) and the
loop-invariant binary search in Discrete Mathematics by 136 px (fixed
40 px cells). Below the sm breakpoint, skip-list columns are now 24 px
and invariant cells 22 px, with 11 px text and tighter gaps, so both
fit with every column on one row. Desktop sizes are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EC6Zzt5akQu7TEHdGquZzp

This branch has not been deployed

No deployments
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