Skip to content

Inspect linked and pasted images in place with zoom and pan - #2037

Merged
max-sixty merged 5 commits into
mainfrom
codex/image-inspection
Oct 8, 2026
Merged

max-sixty merged 5 commits into
mainfrom
codex/image-inspection

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Clicking a screenshot linked to its own file now opens an image viewer inside Leaf, with actual-size zoom, mouse and touch panning, a persistent caption, and focus and scroll restoration on close. Pasted images and interactive offline exports use the same viewer.

PhotoSwipe supplies image manipulation through one lazy module containing its styles. Leaf retains native modality and canonical command activation. Keyboard input cannot manipulate an image behind another dialog. The startup comparison retains 225 requests on both versions and adds approximately 6 KB of eager code; PhotoSwipe is fetched only when inspection opens.

Validated with four browser cases covering live and offline inspection, pasted reply images, and the phone editor; 247 runtime tests; 83 browser framework tests and the browser build check; deterministic vendor rebuilds; and independent desktop, phone, dark-mode, touch, and keyboard review. The examples, authoring instructions, and capture catalogue include the new viewer.

This was written by Codex on behalf of max-sixty

Retained controls use canonical command activation. PhotoSwipe handles only unclaimed arrows inside the active viewer, so Command reference text cannot zoom or pan the image behind it. Fit remains available after wheel or pinch enlargement even when the image originally fit at 100%.
@max-sixty
max-sixty merged commit 289465c into main Oct 8, 2026
6 checks passed
@max-sixty
max-sixty deleted the codex/image-inspection branch October 8, 2026 07:19
max-sixty added a commit that referenced this pull request Oct 8, 2026
Main's in-place image inspector (#2037) conflicted with this phase's viewer layer: the viewer records its opener with openLayer as it opens, and closing destroys the inspector and empties its stage inside closeLayer, handing the user back to that opener. The drawers keep main's label beside this phase's record of no openedBy.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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.

2 participants