Repository navigation
fix(demo): fit the narrow gate-demo GIF canvas to its content (648x432) + 34-column row assertion - #36
Merged
Conversation
The narrow clip was a fixed 648x900 canvas, so its first frame was 90% empty and the last 55% (planner measure: pixel rows whose luminance range over every 4th column is under 12). The recorder now derives the canvas height from the fullest frame (12 visible rows at 34 px, 12 px padding): 648x432, same 34 columns and 32 px font, so the capital-letter height is unchanged (20 px). Also adds the row.length <= COLS assertion on every wrapped row (whitespace-only and deeply indented lines included). wrapLine moves to scripts/narrow-wrap.mjs so tests/narrowWrap.test.ts can feed it over-long lines as negative controls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Reword the canvas comment (frames that are still filling are shorter than the canvas) and escape the backslash in the test fixture path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
What
The narrow gate-demo GIF (
docs/media/gate-demo-narrow.gif, embedded in the README at width 432) was a fixed 648x900 canvas, so a visitor on a phone saw a mostly empty terminal: frame 0 was 90% blank and the last frame 55% blank (blank = pixel row whose luminance range over every 4th column is under 12).row.length <= COLSassertion on every wrapped row, whitespace-only and deeply indented rows included.wrapLinereally does return over-long rows for a 40-space line, trailing spaces, or an indent wider than a row, so the assertion is load-bearing.wrapLinemoved toscripts/narrow-wrap.mjssotests/narrowWrap.test.tscan feed it those lines as negative controls without Playwright or ffmpeg.mainonly in six run-specific lines (gate timings and gate-state timestamps from the real runs).docs/media/gate-demo.gif(full width) and the README are untouched.scripts/record-gate-demo.mjsline 36 (import("playwright")) stays on line 36, whichtests/walkthrough.test.tsanchors.Measured (
blank.py, same measure on both)Known limit: text lines of a 32 px font carry about 26 ink pixel rows per 34 px line, so this measure cannot go much below about 0.26 for the last frame at any readable leading (a 30 px pitch, where lines start to collide, still gave 0.212). The remaining blank is inter-line leading and the transcript's own empty lines, not an empty canvas.
npm test: 36 files, 386 passed, 3 skipped (incl. the 5 new tests).Regenerate:
node scripts/record-gate-demo.mjs --narrow.🤖 Generated with Claude Code