Skip to content

Badge composite frames on the film strip - #817

Merged
marcinz606 merged 2 commits into
mainfrom
feat/composite-thumnails
Aug 12, 2026
Merged

Badge composite frames on the film strip#817
marcinz606 merged 2 commits into
mainfrom
feat/composite-thumnails

Conversation

@marcinz606

@marcinz606 marcinz606 commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Why

NegPy builds one frame from several files four ways — RGB triplet, stitch, HDR merge, and the reverse, the half-frame split. None of it shows on the contact sheet. The thumbnail grid paints the pixmap and nothing else, and the display name that carries (HDR) / (Stitch) / [1] is never drawn. So a merged frame looked exactly like a plain one, and the right-click menu was the only way to find out.

What

A badge in the bottom-left corner of the thumbnail, one glyph per kind:

Glyph Frame
Two overlapping panes stitched composite
Three stacked bars merged bracket (HDR)
Three red/green/blue dots RGB-scan triplet
Split box, one side filled one half of a half-frame scan — the filled side says which

Plus a tooltip line with the count: HDR merge of 5 exposures, Stitched composite of 3 frames.

The chip is neutral grey, not the triage red. Red already means "you marked this" (bottom-right keeper/reject) and "this failed" (top-right decode error) in this delegate; what a frame is built from is a fact about the asset, not a state the user set. Each corner now owns exactly one meaning, and bottom-left stays clear of the keeper check at both ends of the thumbnail-size slider.

The one non-obvious bit

composite_kind() tests stitch before rgb. A stitch built from triplets also carries the primary part's green_path/blue_path_on_stitch_registered copies them so thumbnail decode can find them — so the reverse order badges a stitch as a triplet. There is a test pinning this.

Changes

  • negpy/desktop/session.pycomposite_kind() / composite_summary() next to the other asset-dict readers; AssetListModel.data appends the summary to ToolTipRole. Failure tooltips untouched.
  • negpy/desktop/view/sidebar/files.py_draw_composite_badge() beside the two existing badge painters, same r=9 / inset-4 geometry. Called on the normal paint path and on the failed-decode placeholder card, so a composite whose part went missing still says what it is.
  • docs/USER_GUIDE.md — a "Reading the badges" table under Triage covering all four corners and all four glyphs, plus a clause in the RGB Scan, Half Frame, Stitching and Merging sections.
  • docs/PIPELINE.md — unchanged, no pixels move.

Tests

12 new cases in tests/test_file_browser_widget.py (nothing touched the delegate before): composite_kind per asset shape, the stitch-of-triplets precedence case, the summary strings, the tooltip through the real model, and paint checks that each kind marks the bottom-left corner and that no two kinds draw the same glyph.

Verification

  • make lint, make type, make test: pass. One failure, test_stitch.py::test_stitch_real_rgb_triplet_samples — a PreviewManager.load_linear_preview_rgb() signature mismatch that fails identically on a clean main. Pre-existing, unrelated, not fixed here.
  • Glyphs checked by rendering the real delegate offscreen over highlight, shadow and mid-grey thumbnails, at both ends of the thumbnail-size slider. Not yet exercised in a live make run session against real stitched/merged frames.

A stitched composite, a merged bracket, an RGB triplet and a half-frame
split all looked identical to a plain frame on the contact sheet — the
thumbnail grid paints the pixmap only, and the name that carries "(HDR)"
or "(Stitch)" is never drawn. The right-click menu was the only way to
find out what a frame was.

Add a top-left badge, one glyph per kind, plus a tooltip line naming the
frame count. The chip is neutral grey rather than the triage red: red
already means "you marked this" and "this failed", and what a frame is
built from is a fact about the asset, not a state the user set.

composite_kind() tests stitch before rgb on purpose — a stitch of
triplets also carries the primary part's green/blue pair, so the reverse
order badges it as a triplet.
Preference, not a fix. Bottom-left is still free of the other marks, so
each corner keeps owning exactly one meaning, and the badge stays clear
of the keeper/reject check at both ends of the thumbnail-size slider.
@marcinz606
marcinz606 merged commit 2c46460 into main Aug 12, 2026
1 check passed
@marcinz606
marcinz606 deleted the feat/composite-thumnails branch August 12, 2026 18:37
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.

1 participant