Skip to content

[#188] Add illustration upload validation and preview sanitizer#190

Merged
realproject7 merged 2 commits into
mainfrom
task/188-illustration-pending-editor
May 14, 2026
Merged

[#188] Add illustration upload validation and preview sanitizer#190
realproject7 merged 2 commits into
mainfrom
task/188-illustration-pending-editor

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Custom rehype-sanitize schema matching plotlink.xyz — allows img with src, alt, title so Preview renders illustrations accurately
  • Pre-publish validation: scans content for ![...](...) markdown patterns, warns on non-IPFS URLs and malformed markdown
  • Confirmation dialog before publishing content with illustrations — warns that content is immutable after publish
  • Updated generated ~/.plotlink-ows/CLAUDE.md with illustration workflow and immutability warning

Fixes #188

Test plan

  • Preview tab renders ![alt](url) images (previously blocked by sanitizer)
  • Add a non-IPFS image URL in plot content — amber warning appears in action bar
  • Add malformed image markdown (missing bracket) — warning appears
  • Click Publish on a plot with illustrations — confirmation dialog appears with immutability warning
  • Cancel the dialog — publish does not proceed
  • Confirm the dialog — publish proceeds normally
  • Plots without illustrations publish without confirmation (no dialog)
  • Restart app — ~/.plotlink-ows/CLAUDE.md includes illustration workflow docs

🤖 Generated with Claude Code

realproject7 and others added 2 commits May 14, 2026 17:45
- Custom rehype-sanitize schema matching plotlink.xyz (img with src,
  alt, title) so Preview renders illustrations accurately.
- Pre-publish validation: scans for markdown image refs, warns on
  non-IPFS URLs and malformed markdown.
- Confirmation dialog before publishing content with illustrations,
  warning that content is immutable after publish.
- Updated generated CLAUDE.md with illustration workflow and
  immutability warning.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Only append ellipsis when URL exceeds 60 chars.

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 expected pre-publish image-reference warnings, publish confirmation for plots containing illustration markdown, Preview sanitizer support for img src/alt/title, and generated CLAUDE.md guidance with the immutability warning.

Findings

  • No blocking findings.

Decision

Approved. CI lint-and-typecheck is passing, and the implementation satisfies issue #188 acceptance criteria within the locally reviewable scope.

@realproject7 realproject7 merged commit b1a2e2a 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.

Add illustration upload to pending plot editor + agent skill docs

2 participants