Skip to content

feat: named image references and annotate command#147

Merged
backnotprop merged 3 commits intomainfrom
feat/image-names-and-annotate-command
Feb 13, 2026
Merged

feat: named image references and annotate command#147
backnotprop merged 3 commits intomainfrom
feat/image-names-and-annotate-command

Conversation

@backnotprop
Copy link
Owner

Summary

  • Named image references (Feature Request: Image names for referencing in feedback #67): Replaces raw temp file paths with human-readable ImageAttachment objects ({path, name}) throughout the annotation pipeline. Users can edit names inline under thumbnails. Exported feedback uses [name] /tmp/path... format. Sharing format is backward-compatible with old URLs.
  • Annotate any markdown ([Feature Request] plannotator annotate <file.md> - Annotate any markdown file #109): New plannotator annotate <file.md> CLI subcommand and /plannotator-annotate slash command. Opens any markdown file in the Plannotator annotation UI for structured feedback. Reuses the plan editor HTML with mode: "annotate" — no new build target needed.

Closes #67
Closes #109

Changed files

Area Files What
Types packages/ui/types.ts ImageAttachment interface, Annotation.images replaces .imagePaths
Server packages/server/index.ts, review.ts Upload returns originalName
Server packages/server/annotate.ts (new) Annotate server module
Server packages/server/package.json Export ./annotate
UI AttachmentsButton.tsx deriveImageName(), editable name inputs
UI AnnotationToolbar.tsx, Viewer.tsx, AnnotationPanel.tsx ImageAttachment[] props
Utils parser.ts [name] path export format
Utils sharing.ts, useSharing.ts Backward-compat ShareableImage type
Editor App.tsx annotateMode state, annotate feedback handler, UI conditionals
CLI apps/hook/server/index.ts annotate subcommand
Commands apps/hook/commands/plannotator-annotate.md (new) Claude Code slash command
OpenCode apps/opencode-plugin/index.ts Annotate event handler
Commands apps/opencode-plugin/commands/plannotator-annotate.md (new) OpenCode slash command

Test plan

  • Attach image to annotation → verify editable name input appears under thumbnail
  • Upload Login Mockup.png → verify default name is login-mockup
  • Paste clipboard image → verify auto-name image-1
  • Export diff → verify [image-name] /tmp/... format
  • Open old share URL with plain imagePaths → images still load (backward compat)
  • plannotator annotate README.md → browser opens → annotation tools work → Send Annotations
  • /plannotator-annotate README.md → same flow via slash command
  • bun run build:hook && bun run build:opencode → clean build

🤖 Generated with Claude Code

Add human-readable names to image attachments throughout the annotation
pipeline, and add a new `plannotator annotate <file.md>` command for
annotating arbitrary markdown files.

Image names: ImageAttachment type replaces plain string paths, upload
endpoints return originalName, editable name inputs under thumbnails,
[name] path format in exported feedback, backward-compatible sharing.

Annotate command: new server module reusing plan editor HTML with
mode:"annotate", CLI subcommand, slash commands for Claude Code and
OpenCode, annotate mode UI (hides Approve, shows Send Annotations).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The name input now appears on the full-screen annotator modal that opens
immediately when uploading/pasting an image, pre-populated from the
filename. Removes the disruptive inline name editing from thumbnails.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@backnotprop
Copy link
Owner Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

Fix race condition where globalAttachments was captured as empty array
in the paste event listener (missing dependency). Also update CLAUDE.md
to document ImageAttachment type, annotate server/flow, updated sharing
format with image support, and new slash commands.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@backnotprop backnotprop merged commit e46815d into main Feb 13, 2026
@backnotprop backnotprop deleted the feat/image-names-and-annotate-command branch February 13, 2026 04:23
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.

[Feature Request] plannotator annotate <file.md> - Annotate any markdown file Feature Request: Image names for referencing in feedback

1 participant