WIP: Show image thumbnails side by side when comparing images #1

Closed
ai-agent wants to merge 2 commits from ai-agent/wip-image-thumbnails into main AGit
Collaborator

Parking unfinished work so it is safe on the server while the agent testing harness lands first; this will be rebased onto it before continuing.

It shows the original and conflict images side by side in terminals that support kitty or sixel graphics, and includes a cargo-mutants pass that moved the event loop out of main.rs and added unit tests.

Not ready to merge. The extracted loop draws only after the first key, so the screen starts blank and lags one key. If the terminal never answers the image probe, the keyboard stops responding. mutants.out/ artifacts are committed.

Logic flow

flowchart TD
  A[scan directory] --> B[probe terminal for image support]
  B --> C[wait for key]
  C --> D[draw frame]
  D --> E[handle key]
  E --> C
  D --> F[render thumbnails when expanded]
  classDef pr fill:#ffd966,stroke:#b8860b,color:#000
  class B,C,D,F pr
Parking unfinished work so it is safe on the server while the agent testing harness lands first; this will be rebased onto it before continuing. It shows the original and conflict images side by side in terminals that support kitty or sixel graphics, and includes a cargo-mutants pass that moved the event loop out of `main.rs` and added unit tests. Not ready to merge. The extracted loop draws only after the first key, so the screen starts blank and lags one key. If the terminal never answers the image probe, the keyboard stops responding. `mutants.out/` artifacts are committed. ## Logic flow ```mermaid flowchart TD A[scan directory] --> B[probe terminal for image support] B --> C[wait for key] C --> D[draw frame] D --> E[handle key] E --> C D --> F[render thumbnails when expanded] classDef pr fill:#ffd966,stroke:#b8860b,color:#000 class B,C,D,F pr ```
Extracts the event loop into tui::run_event_loop and handle_key_event so
it can be driven by tests, and adds scanner unit tests, piped-output CLI
tests and display fixtures, following cargo-mutants runs.

Known issue: the extracted loop waits for the first event before its
first draw, so the screen starts blank and every frame lags one key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner

Superseded by #7, which landed the side-by-side image comparison this PR was heading for, rebuilt on top of the current event loop and fixture tests. Two notes for the record: the terminal query behind its thumbnails (Picker::from_query_stdio) could freeze the keyboard by blocking on stdin, and #7 avoids it entirely by drawing thumbnails as half-block characters - which also makes them snapshot-testable.

Superseded by #7, which landed the side-by-side image comparison this PR was heading for, rebuilt on top of the current event loop and fixture tests. Two notes for the record: the terminal query behind its thumbnails (Picker::from_query_stdio) could freeze the keyboard by blocking on stdin, and #7 avoids it entirely by drawing thumbnails as half-block characters - which also makes them snapshot-testable.
cyplo closed this pull request 2026-11-09 13:59:36 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
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!1
No description provided.