Skip to content

feat: images to try, floating around the middle of the empty page - #47

Merged
vlad-salone merged 2 commits into
mainfrom
feat/sample-images
Nov 4, 2026
Merged

vlad-salone merged 2 commits into
mainfrom
feat/sample-images

Conversation

@vlad-salone

Copy link
Copy Markdown
Contributor

What and why

ADR-0001 left sample images open (section 3). ADR-0009 records what they became over three rounds today.

Three samples float around the wordmark, each leaning a little and standing straight under the pointer or the focus:

aurora.jpg       "Zorza polarna, Lucim-01", Aneta p, CC BY 4.0. 2560 x 1707, 562.3 KB
zhuque-2e.jpg    "Zhuque-2E propellant dump over Wisconsin", Brainandforce, CC BY 4.0. 5488 x 3662,
                 20 MP, 2.1 MB
julia.png        a Julia set, c = -0.8 + 0.156i, drawn for the page, on transparency. 1194 x 688,
                 568.5 KB. MIT OR Apache-2.0, as the page

Each shows a different side of the page: a sky that bands, a picture large enough that zoom is how you see the artifacts, and a graphic that goes to lossless WebP. sqzer resized and re-encoded the two photographs.

Pressing a sample fetches it from the page's own origin and picks it as a file, so the workspace opens on it. If the fetch fails, the tile says so and can be pressed again.

The drop target is now a grid, with the middle in the centre cell and the samples in the cells around it. That way none of them covers the middle at any window size. On a wide screen they sit half-way from the corners to the middle. Their width follows the window, up to 36 to 42 rem on a 2K screen. The page fits its window down to 1280 x 680; at 1024 x 600 it runs 26 px over.

The empty page loads small AVIF copies, about 80 KB for the three, and fetches a file only when it's pressed. The repository gains 3.3 MB.

The CC BY photographs need credit. public/samples/CREDITS.txt gives the author, the licence, the source and what was changed, and the build appends it to licenses.txt, which the footer links. I left Schenna at dusk out because it's CC BY-SA, and the share-alike would apply to our resized copy too.

samples.test.tsx fetches each file and checks it against the size its tile states, so a sample swapped without updating its size fails. The end-to-end suite presses the Julia set on the built page, with the policy on, and gets julia.webp, lossless.

Browsers tried

Headless Chromium and Firefox through Playwright against the built page, light and dark, at 2560 x 1440, 1440 x 900, 1280 x 680, 1024 x 600 and 390 x 844. Not Safari.

New dependencies

None. The images are CC BY 4.0 and our own, as above.

Checklist

  • pnpm check passes locally, or CI shows it green
  • a path that depends on the browser got a Vitest test next to it, if one changed
  • a new ADR has its row in docs/adr/README.md and its entry in .greptile/files.json, if there is one
  • the Content-Security-Policy is unchanged, or the PR says why it had to change

🤖 Generated with Claude Code

Three samples float around the wordmark: an aurora and a Zhuque-2E
propellant dump from Wikimedia Commons under CC BY 4.0, and a Julia set
drawn for the page. Pressed, one is fetched from the page's own origin and
picked as a file. The drop target is a grid, so none covers the middle,
and their size follows the window. The credits go into licenses.txt.
ADR-0009.

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

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; both previous findings are addressed and no new actionable issues were found.

Summary

Adds three sample images to the empty page. Pressing one downloads the full image from the page’s own origin and opens it in the workspace.

  • The empty page now offers three images to try.
  • The build adds sample-image credits to the page’s licence list.

No new actionable issues were found. Tests were inspected, not run.

Reviews (2) · Last reviewed commit: "fix: one sample download at a time, ende..." · Reviewed by Greptile

Comment thread src/pages/compress/ui/samples.tsx Resolved
Comment thread src/pages/compress/ui/samples.tsx Resolved
… a failed one announced

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vlad-salone
vlad-salone merged commit 5008e9c into main Nov 4, 2026
2 checks passed
@vlad-salone
vlad-salone deleted the feat/sample-images branch November 4, 2026 14:59
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