Skip to content

diff: the docked pane starts at its header, under the engine's own head row - #99206

Merged
poteat merged 1 commit into
mainfrom
poteat/diff-docked-pane-starts-at-its-header
Oct 7, 2026
Merged

poteat merged 1 commit into
mainfrom
poteat/diff-docked-pane-starts-at-its-header

Conversation

@poteat

@poteat poteat commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Summary

TLDR: docked, /diff shows one blank row above its header where it showed two.

Docked, /diff no longer pads a blank row of its own above its header: the engine now keeps a docked pane's first row for its close mark, and that row is the blank one.

Notes

What Detail
Before on an engine that keeps the head row, two blank rows stood over the header and the hunks had one row fewer
The change PANE_TOP_PAD_ROWS is removed with its four uses: the tree's paddingTop, the row insetOf took off, and the row bodyLayoutOf counted into visibleRows and listTop
Kept the blank last column (PANE_RIGHT_PAD_COLUMNS); the inline dialog and the wider-terminal line, which never padded
The rows header, list, rules and hunks land where the built-in panel draws them, as they did before the engine kept the row
The wheel over the list listTop moves up by one with the list; a scroll's pointer.row counts from the body's first row, so the two still agree
An engine without the head row the header is drawn on the pane's first row and the close mark sits on that row, over the mod's own blank last column: nothing is hidden, and after a turn the mark stands right beside the source picker

Test Plan

  • tests/views/pane-view.test.ts: two new cases (the window takes every row under the list; the list takes the wheel from its first row and not from the margin above it), two rewritten (no top pad; the empty state on the built-in's row).
  • With the tests alone applied those four fail. With the whole change, claude plugin test mods/diff: 212 pass, 0 fail.
  • The mods' own typecheck (tsc -p mods/tsconfig.json): clean.
  • Driven in a 40-row terminal at 120 and 160 columns, two changed files: one blank row over the header where there were two, 29 body rows where there were 28; a click on a file row, on [ ask ], on the source picker and on the close mark each lands on its row; a wheel tick moves the list on the list's rows and the body on every other.
  • Not docked (the classic renderer, or a terminal under 110 columns): the same screen as before.

Changelog

Fixed /diff showing two blank rows above its header when docked

…ad row

Docked, the pane no longer pads a blank row of its own above its header: the engine keeps a docked pane's first row for its close mark, and that row is the blank one.

@qing-ant qing-ant left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/stamp

@poteat
poteat merged commit 765f236 into main Oct 7, 2026
3 checks passed
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