Skip to content

[#184] Support inline image upload in plot editor#186

Merged
realproject7 merged 2 commits into
mainfrom
task/184-inline-image-upload
May 14, 2026
Merged

[#184] Support inline image upload in plot editor#186
realproject7 merged 2 commits into
mainfrom
task/184-inline-image-upload

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • New POST /api/publish/upload-plot-image endpoint: accepts WebP/JPEG up to 500KB, signs with OWS wallet, forwards to plotlink.xyz, returns { cid, url }
  • Plot editor now shows "Add illustrations in the plot" checkbox below the save bar
  • When checked, a drag-and-drop upload area appears; after upload, copyable markdown reference is shown
  • Supports multiple image uploads per editing session
  • Updated repo CLAUDE.md and generated ~/.plotlink-ows/CLAUDE.md with new endpoint

Fixes #184

Test plan

  • Open a plot file in the editor, verify "Add illustrations in the plot" checkbox appears
  • Check the checkbox — upload area should expand with drag-and-drop support
  • Upload a WebP or JPEG image (under 500KB) — should show copyable markdown
  • Verify oversized files and non-WebP/JPEG are rejected with error messages
  • Upload multiple images — all should appear with individual copy buttons
  • Verify the checkbox does NOT appear for genesis.md or structure.md
  • Uncheck the checkbox — upload area should collapse
  • Switch to a different file — illustration state should reset

🤖 Generated with Claude Code

realproject7 and others added 2 commits May 14, 2026 16:47
Add POST /api/publish/upload-plot-image endpoint mirroring the cover
upload pattern: accepts WebP/JPEG up to 500KB, signs with OWS wallet,
forwards to plotlink.xyz, returns { cid, url }.

In PreviewPanel, plot files now show a "Add illustrations in the plot"
checkbox. When checked, a drag-and-drop upload area appears. After each
upload, copyable markdown is displayed for pasting into the plot text.
Multiple uploads are supported.

Updated both repo CLAUDE.md and generated ~/.plotlink-ows/CLAUDE.md
with the new endpoint.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Revert version to 1.0.30 (patch bump, not minor). Refactor illustration
upload to accept File directly so drag-and-drop calls uploadIllustration()
without going through native DOM events.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Summary

The PR adds the authenticated local POST /api/publish/upload-plot-image proxy, signs and forwards uploads with the message format expected by PlotLink, and adds the plot-editor illustration upload UI with copyable markdown. The generated and repo CLAUDE.md API docs include the new endpoint.

Findings

  • No blocking findings.

Decision

Approved. The updated drag-and-drop handler uploads the dropped File directly, CI lint-and-typecheck is passing, and the implementation satisfies issue #184 acceptance criteria.

@realproject7 realproject7 merged commit 9ed7cb1 into main May 14, 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.

Support inline image upload in plot editor

2 participants