Repository navigation
fix(ci): pin COLUMNS=80 to stabilize visual snapshot tests - #1441
Conversation
test/visual/tui-snapshot.test.tsx renders OpenTUI components without forcing an explicit terminal width — OpenTUI auto-detects from $COLUMNS. Local developer terminals default to 80 cols (where the committed snapshots were originally captured); Blacksmith CI runners default to ~100+ cols, producing wider card borders that break every visual snapshot diff. Diagnosis: identical failure pattern across 3 unrelated open PRs (#1432 channel-envelope, #1435 partition-default-drain, #1440 tui-overlay-narrow-pane) — all fail the same 5 visual snapshot tests plus the same Quality Gate umbrella job. Code in those PRs is fine; the env was inconsistent between snapshot capture and CI render. Snapshot diff signature: - ╭──── 80 chars ────╮ (left-padded, expected) + ╭──── 100+ chars ────╮ (unpadded, actual) Fix: pin COLUMNS=80 at the workflow level so every step in every job (unit-tests > Visual regression, pg-tests > Test) inherits the same render width as the snapshots. After this lands, the 3 open PRs should rerun CI green via rebase or re-push trigger. Future visual tests inherit the pin without per-step plumbing.
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
After #1441 pinned COLUMNS=80 at the workflow level, the existing SystemStats snapshots (5 frames: low/mid/high/critical CPU + Nav cold start) drifted by 1 trailing space per line — the prior captures came from a terminal that emitted slightly different right-padding for the "genie vX.Y.Z" header row. Regenerated locally with `COLUMNS=80 bun test test/visual/ -u` to match the CI render exactly. Diff is purely whitespace; visible chars and colour spans unchanged. Unblocks PR #1432 channel-envelope CI. Same baseline now applies to any future visual test addition in this PR or downstream.
After #1441 pinned COLUMNS=80 at the workflow level, the existing SystemStats snapshots (5 frames: low/mid/high/critical CPU + Nav cold start) drifted by 1 trailing space per line — the prior captures came from a terminal that emitted slightly different right-padding for the "genie vX.Y.Z" header row. Regenerated locally with `COLUMNS=80 bun test test/visual/ -u` to match the CI render exactly. Diff is purely whitespace; visible chars and colour spans unchanged. Unblocks PR #1432 channel-envelope CI. Same baseline now applies to any future visual test addition in this PR or downstream.
Summary
test/visual/tui-snapshot.test.tsxlets OpenTUI auto-detect width from$COLUMNS. Local terminals default to 80 (snapshots captured here); Blacksmith CI runners default to ~100+, producing wider card bordersCOLUMNS=80at the workflowenv:level in.github/workflows/ci.ymlso every step in every job inherits the same render widthEvidence
Failing test pattern across all 3 PRs:
Snapshot diff signature (same shape across all 5 tests):
Local repro on dev (
bun test test/visual/tui-snapshot.test.tsx):Local passes, CI fails — pure terminal-width drift.
Why workflow-level env
Both
unit-tests > Visual regression(line 83-86) andpg-tests > Test (serial)(which runs the full suite, includingtest/visual/) need the same value. Workflow-levelenv:is the single source of truth and future-proofs new visual tests.Test plan
.github/workflows/ci.yml; no risk to runtime behavior