skip to content
Jobs

Screencasts Without the Letterbox Bars

Pin the output height, take the width from the terminal grid

Gantry milestones
Pin the output height, take the width from the terminal grid

Gantry records fast screencasts of its own runs in landscape. The old default asked the recorder for a fixed output frame, so whenever a terminal grid's shape did not match that frame the video came out padded — black bars down the sides — or stretched to fill it.

This job changed the default. A bare landscape `record-fast` now pins the output to the standard height tier and computes the width from the terminal grid's real captured shape, producing a natural-width video with no bars and no stretching. The exact-resolution escape hatches stay: you can still request a fixed width-by-height frame, and portrait or standing recordings keep their fixed geometry. The `--fit` option, which chooses between padding and stretching, now applies only to those fixed-frame forms, because height-pinned output has nothing left to pad.

Build

One behaviour change was split into four sprints, and the first cut was a shared resolution vocabulary that both the Rust command planner and the shell recorder had to agree on before either could move.

The recorder's real work — measuring the captured grid, deriving an even output width, and scaling with no pad filter through ffmpeg — is the high-effort sprint, and the plan placed it second. Ahead of it sat a contract sprint whose only job was to fix what the resolution strings mean: a bare landscape tier means height-pinned natural width, an explicit width-by-height means a fixed frame, and portrait stays fixed portrait geometry. Ordering it that way let the behavioural core be written against a vocabulary that already existed and was already covered by fast tests, rather than inventing the terms and the behaviour in the same step.

Where the cut came under stress is legible in the run: the two gate failures both landed at the boundaries between layers, not on the recorder itself. The contract sprint went back after its review — its gate failed and a fix stage brought it green — and the final end-to-end consistency sprint failed its gate once before a fix landed. The recorder sprint, the one carrying the actual scaling arithmetic, passed clean on its first gate.

That is the useful reading of this decomposition. The difficulty did not live in the pixel math; it lived where the planner and the recorder had to say the same thing about a resolution string, and in the last sprint that checks the landscape, fixed-frame, and portrait paths all plan and invoke the recorder consistently. The plan drew its lines at exactly those interfaces, and those are the lines that the gate exercised.

Feature

A landscape fast recording used to be fixed to a target frame, so a mismatched terminal shape came out padded or stretched; the recorder now pins the height and derives the width from the captured grid instead.

Before this job, `record-fast` handed the recorder a fixed width and height. When the terminal grid did not match that shape, the ffmpeg path either padded it — the visible bars — or stretched it to the frame. There was no path that simply took the grid as given.

The design that replaced it runs one decision through both layers. The command planner marks bare landscape tiers as height-pinned and keeps explicit width-by-height and portrait as fixed-frame; the shell recorder reads that same distinction, and for a height-pinned request it measures the final grid, computes an even output width, and scales isotropically with no pad. `--fit` is honoured only on the fixed-frame path.

Standing in the tree at today's HEAD, the design holds. The recorder script still branches on a height-pinned flag to derive its width from the captured geometry; the command usage text still describes the default landscape tier as height-pinned with natural even width and states that `--fit` applies only to fixed-frame output; and the screencast runbook still documents the no-crop, no-border behaviour along with the boundary between the display-free fast tests and the real recorded-video geometry checks. Most of the lines the job introduced are still present. The one file that is gone is the plan document it was built from, removed as housekeeping once the work had landed.

12 sessions
peak 104,028 · median execute 103,976 · heaviest 104,028 (03) context
unavailable tokens
unavailable cost
0 x 4 milestones x sprints
26 edits
212 commands
37m duration
4 execute · 4 review · 2 plan · 2 fix · 1 gate-build roles
2 x 0 fixes x replans
codex harness