[codex] simplify Photos image viewer#80
Open
philipnee wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Photos app should feel like a dedicated image viewer, not another dashboard table. In relay testing, burst-loading many images dropped the tunnel and left broken thumbnail placeholders. Refresh made this worse: browsers may revalidate cached images, so even fast
304responses can still traverse the relay and hit rate limits.What changed
pnee.uk/life.IntersectionObserverso image network requests start only when tiles approach the viewport.304responses cannot drain the whole queue in one burst.How
Photos still uses only the shared cookie-authenticated FS API:
/api/fs/sources,/api/fs/list, and/api/fs/file. It renders folder buttons separately from the masonry photo grid, observes each photo tile before assigningsrc, and pushes image tasks through a paced queue. Infinite scrolling appends the next batch of tiles instead of rebuilding the grid, so scrolling does not replay old cached image requests. Clicking a photo opens the same file URL in a minimal lightbox.Out of scope: server-side thumbnails, HEIC transcoding, relay-side rate-limit splitting,
/api/fs/listpagination, and a separate photo metadata API.Changed files
src/apps/photos/manifest.ts- replaces the dashboard-style Photos UI with the minimal masonry/lightbox viewer, viewport-driven image loading, and paced request queue.tests/server.test.ts- updates app-serving assertions for the simplified viewer, queue, auto-load sentinel, viewport observer, and no extra dashboard chrome.Verification