Skip to content

Images: IMG id labels and a large viewer that comments on a spot - #78

Merged
changl merged 4 commits into
changl/nextfrom
changl/image-view
Nov 1, 2026
Merged

changl merged 4 commits into
changl/nextfrom
changl/image-view

Conversation

@changl

@changl changl commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Chang's request (2026-10-31): give every image a short, stable ID, and a way to view an image larger while still commenting on it. He rejected the first prototype (tap opens a full-size viewer) and asked for fixed scales of 25%, 50%, 75% and 100%.

What changes

  • IMG id. Each image shows a small IMG F665 label. The ID is the first 4 hex characters of the image file's sha256, which is also the hash that starts a staged asset's file name (assets/f665a6bf0296-flow.png). It stays the same while the image does. If two different images on one page share 4 characters, both get 6.
    • Publish writes it as data-img (long_pages.image_ids), and older versions read it from the file name.
    • plain_images strips it again, so it never marks a section as changed.
  • Scales. Under each image, next to the label, a magnifier button group 25% 50% 75% 100% opens the image at exactly that share of its real pixels; at 100%, one image pixel is one screen point.
    • The view loads the original file whenever the 1,200 px preview lacks the pixels, and scrolls when the image is larger than the screen.
    • The same four choices sit in the view's top bar, and switching keeps the middle of the view on the same spot. ✕ or Esc returns to the same place on the page.
    • A tap on the image there opens the normal composer for that spot. The comment stores target.image, target.image_src and the point. Its pin shows there and on the page image.
  • A tap on an image in the page still comments, exactly as before.
  • Agents. The annotate inbox line and round answers print IMG F665 (assets/f665a6bf0296-flow.png), using the path stored on the comment. Only paths under assets/ or attachments/ are printed. The rail card and the composer show the ID. Skill files are untouched.

Proof

  • Shots on an FLD copy (WebKit, iPad Pro 11 portrait) are in shared/agents/shots/image-view/. INDEX-3.md walks through the path step by step (v3-step-1..5), and INDEX-2.md covers the scales.
  • tests/browser/test_image_view.py (WebKit, iPad) covers:
    • labels and scales on every image;
    • a click on the image still opens the composer and no viewer;
    • 25% and 50% render at exact sizes;
    • one tap plus Save at 50% creates exactly one comment, on the tapped spot, with the ID;
    • the rail shows the ID, and closing keeps the scroll position;
    • the page pin lands on the image;
    • a 1,440 px compare pane at 100% is 1,440 px wide, scrolls, and loads the original instead of the preview.
  • Python tests cover ID stability, collisions, and the inbox and round lines.

Draft until Chang approves on his page.

🤖 Generated with Claude Code

changl and others added 4 commits October 31, 2026 17:11
Every image shows IMG + the first hex of its file's sha256 (the hash its
staged asset name starts with). A tap opens it large with pinch/wheel zoom;
a tap there comments on that point, carrying the id to the rail, inbox and
round answers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The inbox line and round answers print IMG F665 (assets/f665…-flow.png) from
the comment's target, so agents need no lookup rule; the SKILL.md notes are
reverted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Chang rejected opening an image by tapping it. A tap on an image comments
again, as before. Under each image, next to its IMG id, a magnifier button
group opens it at exactly that share of its real pixels, from the original
file when the preview lacks them, scrolling when larger than the screen; a tap
there comments on that spot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changl
changl marked this pull request as ready for review November 1, 2026 01:19
@changl
changl merged commit 384eff6 into changl/next Nov 1, 2026
1 check passed
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