skip to content
Jobs

A Sensible Default for the Untouched Split

Give the never-dragged sidebar/feed divider an adaptive layout, and leave a dragged one alone

Gantry sprints
Give the never-dragged sidebar/feed divider an adaptive layout, and leave a dragged one alone

Gantry's build monitor is a terminal UI whose upper body is divided into a sidebar rail on the left, a one-column gutter, and an activity feed on the right. A draggable divider sets how the width is shared. Until this job, that divider had a single behaviour: a fixed fraction filling the terminal edge to edge, an even half-and-half that ignored how wide the terminal actually was. On a wide screen that is the wrong answer — the low-density sprint rail is handed far more room than it needs, and the feed's cards stretch uncomfortably wide.

This job taught the monitor to tell two situations apart: a layout the user has never touched, and one they have deliberately dragged. The never-touched case gets a considered default — capped columns, centered in the terminal with even margins — so a fresh run reads well on any width. The moment the user drags the divider even once, the old proportional fill returns and stays, because from then on the ratio is theirs to own. The point is a good first impression that never overrides an explicit choice.

Build

The plan refused to fragment: one tightly coupled feature stayed one sprint, and the run never went red because the trickiest invariant lived inside a single agent's context.

The architectural decision here is one the planner made by not splitting. The change spans a new state field, a branch in the renderer, a fix in the mouse-input path, background paint for the new margins, and reworked tests across three files — the kind of spread that often gets carved into separate sprints. The brief argues the opposite and keeps it whole, on the grounds that the pieces are one mechanism: the renderer's untouched branch has no meaning without the state bit that selects it, and the input fix has no meaning without the centered layout it corrects for.

What that whole-cut buys is visible in the one genuinely hard part: the divider must not jump the instant it is first grabbed. In the centered default the sidebar does not start at the left edge, so a naive drag would compute its fraction off by the left margin and the divider would leap. The fix seeds the fraction from the divider's currently rendered position at drag-start, which only works if the rendered geometry and the input handler are reasoned about together. Split across a sprint boundary, the agent owning the input path could not test the no-jump property, because the property is defined against a layout owned by another sprint. Keeping them together let one agent hold both and prove the invariant in the same test file.

The run bears this out by being quiet. The single sprint executed, passed its gate, and cleared review with nothing sent back and no re-plan. For a change with this many moving parts, a green run is itself the evidence that the boundary was drawn where the coupling actually was — the difficulty was absorbed into one unit rather than pushed onto a seam between two.

Feature

The monitor now distinguishes an untouched split from a user-owned one, giving the former capped centered columns while preserving the exact old proportional fill for the latter — and the design still stands today.

Before this job the split geometry had no memory of intent. Whether or not anyone had ever touched the divider, the renderer computed the same proportional fill and stretched it wall to wall, so a wide terminal always showed an oversized rail and over-wide feed cards, with no way to say "this is only a default."

The design adds a sticky boolean to the monitor's state that records whether the user has ever set the split. It defaults to off and, once flipped, stays on for the life of the run. The renderer branches on it: when off, it computes a capped sidebar and a capped feed, centers that block with even left and right margins painted in the same near-black field as the rest of the screen, and records the divider's real offset column so the drag hit-test still finds it; when on, it runs exactly the previous proportional code, unchanged. The first drag seeds the stored fraction from where the divider is actually drawn, so grabbing it does not make it jump, and then flips the bit so the ratio becomes the user's.

Standing in the tree today, the mechanism is intact. The state field is still there and still defaults off; the renderer still branches into an untouched centered path and a user-set proportional path; the tests for the wide capped case, the narrow no-margin degrade, the sticky property, and the no-jump first drag are all present. The one drift is a tuning change: the sidebar and feed caps were later widened from the values the brief specified, adjusting how much room each column may claim without touching the two-mode structure the job established.

unavailable sessions
unavailable context
24,684 in / 34,800 out tokens
$5.49 cost
0 x 1 milestones x sprints
unavailable edits
unavailable commands
11m duration
unavailable roles
0 x 0 fixes x replans
- harness