Let an expanded image comparison take the screen #10

Merged
cyplo merged 1 commit from big-image-preview into main 2026-11-09 15:23:04 +00:00
Owner

The thumbnails were a fixed eight rows whatever the terminal size, so a photo preview was too small to recognise. Now:

  • The preview grows to fill the screen. An expanded image group sizes its thumbnail block to the height left after the rest of the group - 13 rows at 24 lines, 19 at 30 - instead of a constant 8. List density gives way to the picture; text conflicts keep their compact layout.
  • Expanding an image scrolls the group to the top, so nothing cuts the preview off - pinned by a fixture with three conflicts where the last is an image: the list jumps to it and its preview owns the screen.

The options and action lines stay pinned below the preview, so deciding and applying never scroll out of sight.

Pinned by fixtures

  • image/preview_scrolls_to_top (new) - three conflicts, image last; j j enter puts its preview at the top with full height
  • image/preview_fills_tall_terminal (new) - the block grows with the terminal: 19 thumbnail rows at 30 lines
  • The eight expanded-image fixtures re-accepted with their larger blocks; every text fixture unchanged

Checked

  • 77/77 tests pass, clippy clean with -D warnings.
  • Mutating this PR's whole diff against main, as CI will: 15 mutants tested, 14 caught, 1 unviable, 0 missed.
  • Rendered the screens as PNGs and looked at them: a structured test image is now clearly recognisable at the new size.
The thumbnails were a fixed eight rows whatever the terminal size, so a photo preview was too small to recognise. Now: - **The preview grows to fill the screen.** An expanded image group sizes its thumbnail block to the height left after the rest of the group - 13 rows at 24 lines, 19 at 30 - instead of a constant 8. List density gives way to the picture; text conflicts keep their compact layout. - **Expanding an image scrolls the group to the top**, so nothing cuts the preview off - pinned by a fixture with three conflicts where the last is an image: the list jumps to it and its preview owns the screen. The options and action lines stay pinned below the preview, so deciding and applying never scroll out of sight. ### Pinned by fixtures - `image/preview_scrolls_to_top` (new) - three conflicts, image last; `j j enter` puts its preview at the top with full height - `image/preview_fills_tall_terminal` (new) - the block grows with the terminal: 19 thumbnail rows at 30 lines - The eight expanded-image fixtures re-accepted with their larger blocks; every text fixture unchanged ### Checked - 77/77 tests pass, clippy clean with `-D warnings`. - Mutating this PR's whole diff against `main`, as CI will: **15 mutants tested, 14 caught, 1 unviable, 0 missed**. - Rendered the screens as PNGs and looked at them: a structured test image is now clearly recognisable at the new size.
Let an expanded image comparison take the screen
All checks were successful
CI / Nix checks and package build (pull_request) Successful in 25s
CI / Lint (pull_request) Successful in 27s
CI / Run tests (pull_request) Successful in 34s
CI / Mutation testing (pull_request) Successful in 1m10s
CI / Nix checks and package build (push) Successful in 10s
CI / Lint (push) Successful in 24s
CI / Run tests (push) Successful in 32s
CI / Mutation testing (push) Successful in 8m21s
ec4c4ac52f
The thumbnails were a fixed eight rows whatever the terminal size, so a
photo preview was too small to recognise. An expanded image group now
sizes its preview to the height the screen has left after the rest of
the group - thirteen thumbnail rows at 24 lines, nineteen at 30 - and
expanding scrolls the group to the top so nothing cuts the preview off.
List density gives way to the picture; text conflicts keep their
compact layout.

Co-Authored-By: GLM 5.3 <noreply@anthropic.com>
cyplo merged commit ec4c4ac52f into main 2026-11-09 15:23:04 +00:00
cyplo deleted branch big-image-preview 2026-11-09 15:23:05 +00:00
Sign in to join this conversation.
No reviewers
No labels
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
cyplo/deescalate!10
No description provided.