Preview BMP conflicts; page the selection with Page up/down #9

Merged
cyplo merged 1 commit from bmp-preview-and-paging into main 2026-11-09 14:57:01 +00:00
Owner

Two features:

BMP preview

Bitmaps get the same treatment as JPEGs and PNGs: dimensions, the expand arrow, and side-by-side thumbnails - the image crate is now built with its bmp feature and .bmp joins the image extensions. Verified on screen: red original next to blue conflict, no text-diff garbage (binary bytes still never diff as text).

The is_image true-mutant stays excluded as equivalent and its reason is updated: the extensions treated as images still equal exactly what the crate can parse (jpeg+png+bmp features). The old bmp_stays_plain fixture flips to image/bmp_preview, pinning the full treatment.

Page up / Page down

Moves the selection a screenful of groups, clamped at the ends (no j/k-style wrap). The screenful is however many groups the previous frame actually drew, so it stays honest when groups are expanded or the terminal is short.

Pinned by fixtures

  • image/bmp_preview (new) - a BMP expands to dimensions and thumbnails, original | conflict
  • display/page_down_a_screenful - 4 of 6 groups fit at 24 rows; one Page down lands on the fifth
  • display/page_down_when_scrolled - 2 drawn at 14 rows; after j j, Page down pages by those 2
  • display/page_up_from_the_clamp - two Page downs stop at the last group (no wrap), one Page up returns a screenful

Checked

  • 74/74 tests pass, clippy clean with -D warnings.
  • Mutating this PR's whole diff against main, as CI will: 18 mutants tested, 16 caught, 2 unviable, 0 missed.
  • Docs updated: spec (image types, key names), README's file-type table, the fixture key table, PLAN checkboxes.
Two features: ### BMP preview Bitmaps get the same treatment as JPEGs and PNGs: dimensions, the expand arrow, and side-by-side thumbnails - the `image` crate is now built with its `bmp` feature and `.bmp` joins the image extensions. Verified on screen: red original next to blue conflict, no text-diff garbage (binary bytes still never diff as text). The `is_image` true-mutant stays excluded as equivalent and its reason is updated: the extensions treated as images still equal exactly what the crate can parse (jpeg+png+bmp features). The old `bmp_stays_plain` fixture flips to `image/bmp_preview`, pinning the full treatment. ### Page up / Page down Moves the selection a screenful of groups, **clamped at the ends** (no j/k-style wrap). The screenful is however many groups the previous frame actually drew, so it stays honest when groups are expanded or the terminal is short. ### Pinned by fixtures - `image/bmp_preview` (new) - a BMP expands to dimensions and thumbnails, `original` | `conflict` - `display/page_down_a_screenful` - 4 of 6 groups fit at 24 rows; one Page down lands on the fifth - `display/page_down_when_scrolled` - 2 drawn at 14 rows; after `j j`, Page down pages by those 2 - `display/page_up_from_the_clamp` - two Page downs stop at the last group (no wrap), one Page up returns a screenful ### Checked - 74/74 tests pass, clippy clean with `-D warnings`. - Mutating this PR's whole diff against `main`, as CI will: **18 mutants tested, 16 caught, 2 unviable, 0 missed**. - Docs updated: spec (image types, key names), README's file-type table, the fixture key table, PLAN checkboxes.
Preview BMP conflicts; page the selection with Page up/down
All checks were successful
CI / Lint (pull_request) Successful in 32s
CI / Run tests (pull_request) Successful in 38s
CI / Nix checks and package build (pull_request) Successful in 52s
CI / Mutation testing (pull_request) Successful in 1m21s
CI / Nix checks and package build (push) Successful in 10s
CI / Lint (push) Successful in 24s
CI / Run tests (push) Successful in 30s
CI / Mutation testing (push) Successful in 8m8s
a7217a7f83
Bitmaps now get the same treatment as JPEGs and PNGs - dimensions, the
expand arrow, side-by-side thumbnails - now that the image crate is
built with its bmp feature. Their binary bytes still never get a text
diff. The set of extensions treated as images still equals exactly the
set the image crate can parse, so the is_image true-mutant stays
equivalent and excluded.

Page down and Page up move the selection a screenful of groups,
clamped at the ends rather than wrapping. The screenful is however
many groups the previous frame actually drew, so it stays honest when
groups are expanded or the terminal is short.

Co-Authored-By: GLM 5.3 <noreply@anthropic.com>
cyplo merged commit a7217a7f83 into main 2026-11-09 14:57:00 +00:00
cyplo deleted branch bmp-preview-and-paging 2026-11-09 14:57:01 +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!9
No description provided.