Skip to content

heronin: tiles show the photo when the store has one - #37

Merged
fizzy-pm[bot] merged 1 commit into
mainfrom
heronin/thumbnails-shown
Nov 11, 2026
Merged

fizzy-pm[bot] merged 1 commit into
mainfrom
heronin/thumbnails-shown

Conversation

@fizzy-publish

@fizzy-publish fizzy-publish Bot commented Nov 11, 2026

Copy link
Copy Markdown

heronin: tiles show the photo when the store has one

Part of fizzyedit/work#1190

In plain words

Photos supplied by the library now appear in their tiles and when opened. Photos without a thumbnail keep their coloured wash, so the library remains useful while pictures are unavailable.

What changes

  • Keep supplied pictures until the library reloads.
  • Draw pictures before the status badge and bird outline.
switch (result catch return) {
    .wash => |w| thumb.wash = w % 6,
    .encoded => |bytes| {
        thumb.image = thumb.owner.arena.allocator().dupe(u8, bytes) catch return;
    },
}

What you will notice

Available pictures replace plain washes in the library and photo view. Existing box sizes and controls stay the same.

How we know it works

A new test uses a 390 × 844 window and an in-process store with a one-pixel PNG. It checks the retained picture bytes, the image inside the first tile, the second tile's wash without an image, and the opened photo's image. The former callback discarded encoded pictures, so it cannot satisfy these assertions.

How this serves fizzy

The platform lets stores supply pictures that people can recognise in their library.

For agents: technical summary

Goal

Display encoded store thumbnails in the existing library and photo boxes.

What changed and why

Thumb owns a wash and an arena-backed image slice. Requests pass the Thumb context; reload clears thumbnails with the arena. Image widgets use explicit placement so they do not affect box layout and overlays draw afterward.

Budget: 53 added non-test source lines; 115 added-plus-deleted source lines including tests, from git diff --numstat HEAD. No new source files (new-file source line count: 0). Requested PR/report delivery artifacts are separate from the source patch.

How it was verified

All six requested gates pass: formatting; native build (66/66); server (3/3); tests (67/67 steps, 68/68 executed tests); web (54/54); public check (3/3). The 15 view tests include the new regression. It asserts Thumb bytes and public widget rectangles; texture retention and rendered pixels are not directly asserted. No screenshots or device check were performed.

Not done / follow-ups

Stores, species rows, the tag queue and readability/layout changes remain outside this change.

Part of fizzyedit/work#1190

Signed-off-by: fizzy pop-os-codex-3 <slot+pop-os-codex-3@fizzy.invalid>
@fizzy-pm
fizzy-pm Bot merged commit bfdcf0e into main Nov 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants