FitHeight draws the tree view only as tall as its rows (ATC-225) #28

Merged
merge-queue merged 1 commit from fit-height into main 2026-11-28 13:56:49 -08:00
Owner

Work package: https://openproject.home.romaine.life/wp/ATC-225

The session always drew the tree view at the host's full height, so a list shorter than that left empty rows inside the box. at-claude's command menu is anchored by its bottom row above its composer, so those rows showed as empty space in it.

Added

  • core.FitRows(s, cfg, h): the rows the tree view needs, at most h. That's the rows above the list (firstItemRow: border, panel, prompt bar, headers), one per visible item and the border's bottom. While the / pop-up is open it is tall enough for the pop-up to sit under the row it acts on, which is where KeyPopupBox then puts it.
  • Config.FitHeight, a renderer flag: the session draws in FitRows rows and its frame has that many lines. Clicks map through the fitted screen, since ClickRowResult reads its size.

Unchanged: with FitHeight off (every current host), Render draws at the host's height as before. The session now keeps the host's size itself, and Resize sets it.

Tests: FitRows for a short menu, capped at the host's height, while searching, and with the pop-up placed under its row inside the border; the session's frame and draw height with the flag on and off. fzt-terminal's go test ./... passes against this branch.

🤖 Generated with Claude Code

Work package: https://openproject.home.romaine.life/wp/ATC-225 The session always drew the tree view at the host's full height, so a list shorter than that left empty rows inside the box. at-claude's command menu is anchored by its bottom row above its composer, so those rows showed as empty space in it. **Added** - `core.FitRows(s, cfg, h)`: the rows the tree view needs, at most `h`. That's the rows above the list (`firstItemRow`: border, panel, prompt bar, headers), one per visible item and the border's bottom. While the `/` pop-up is open it is tall enough for the pop-up to sit under the row it acts on, which is where `KeyPopupBox` then puts it. - `Config.FitHeight`, a renderer flag: the session draws in `FitRows` rows and its frame has that many lines. Clicks map through the fitted screen, since `ClickRowResult` reads its size. **Unchanged**: with `FitHeight` off (every current host), `Render` draws at the host's height as before. The session now keeps the host's size itself, and `Resize` sets it. **Tests**: `FitRows` for a short menu, capped at the host's height, while searching, and with the pop-up placed under its row inside the border; the session's frame and draw height with the flag on and off. fzt-terminal's `go test ./...` passes against this branch. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
FitHeight draws the tree view only as tall as its rows (ATC-225)
All checks were successful
Suite release / finalize (pull_request) Has been skipped
Suite release / scope (pull_request) Successful in 24s
Suite release / build (none, ubuntu-latest) (ubuntu-latest, none) (pull_request) Has been skipped
Suite release / reused-checks (pull_request) Has been skipped
Suite release / reserve (push) Has been skipped
Suite release / check-package (push) Has been skipped
Suite release / finalize (push) Has been skipped
Suite release / reused-checks (push) Has been skipped
Suite release / publish (push) Has been skipped
Suite release / home-sync (push) Has been skipped
Suite release / deploy-image (push) Has been skipped
Suite default / check-fetches (pull_request) Has been skipped
Suite release / check-build (none, ubuntu-latest) (ubuntu-latest, none) (pull_request) Has been skipped
Suite default / scope (pull_request) Successful in 24s
Suite release / check-package (pull_request) Has been skipped
Suite default / check-rules (pull_request) Has been skipped
Suite release / deploy-image (pull_request) Has been skipped
Suite go / scope (pull_request) Successful in 22s
Suite go / check-services (pull_request) Has been skipped
Suite default / check-logs (pull_request) Successful in 23s
Suite go / check-test-linux (pull_request) Has been skipped
Suite release / publish (pull_request) Has been skipped
Suite release / module (pull_request) Has been skipped
Suite go / check-format (pull_request) Successful in 29s
Suite release / reserve (pull_request) Has been skipped
Suite release / home-sync (pull_request) Has been skipped
Suite default / reused-checks (pull_request) Successful in 28s
Suite go / check-test-windows (pull_request) Successful in 2m51s
Suite go / reused-checks (pull_request) Successful in 19s
merge-queue landed on main
8d7a3c35d7
core.FitRows is the rows the tree view needs, at most the host's height:
the rows above the list, one per visible item and the border's bottom, and
room for the / pop-up under its row while it is open. With Config.FitHeight
the session draws at that height and its frame has that many lines, so a
host placing the box by its bottom row (at-claude's menu over its composer)
gets no empty rows in it.
merge-queue deleted branch fit-height 2026-11-28 13:56:50 -08:00
Sign in to join this conversation.
No reviewers
No labels
queue
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
romaine-life/fzt!28
No description provided.