mirror of
https://github.com/backnotprop/plannotator.git
synced 2026-09-14 14:17:26 +08:00
v0.14.2
29 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ea689d9745 |
Unify review core across Bun and Pi (#310)
* Unify review core across Bun and Pi
* Surface review diff failures
* fix: review core fixes from code review
- Handle unborn HEAD in runGitDiff("uncommitted") via rev-parse check
instead of assertGitSuccess, so fresh repos fall through to untracked diffs
- Bind Pi server to 0.0.0.0 for remote sessions (regression from e47eda0)
- Update CLAUDE.md: packages/shared/ description, PLANNOTATOR_SHARE env var,
/api/diff response shape
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: update favicon background to dark navy
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
||
|
|
93c0f035b3 |
feat: annotatable diff view with diff context in feedback
* refactor: extract useAnnotationHighlighter hook from Viewer Move annotation plumbing (web-highlighter lifecycle, toolbar/popover state, text-selection handlers, findTextInDOM, applyAnnotations) out of Viewer.tsx into a dedicated hook. Pure refactor — zero behavior change. Viewer consumes the hook and keeps its own code block, global comment, and pinpoint-specific logic. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat: block-level diff annotation with diffContext support Add annotation support to plan diff view using block-level hover. Hovering added/removed/modified sections shows the annotation toolbar. No web-highlighter in diff mode — annotations live in React state only. - diffContext field on Annotation type (added/removed/modified) - PlanCleanDiffView: hover handlers, toolbar, comment/quicklabel flows - Annotated blocks show persistent highlight ring via content matching - View isolation: diff annotations filtered to diff view, normal to normal - Share/draft restore filters diff annotations from Viewer DOM - AnnotationPanel: neutral "diff" badge for diff annotations - Export: [In diff content] label in feedback - Toolstrip visible during diff mode for mode switching - CLAUDE.md updated Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: scroll-to-selected and visible highlight ring for diff annotations Add scroll-to-selected when clicking a diff annotation in the panel — scrolls to the block and briefly glows (same focused effect as Viewer). Replace invisible ring-1 ring-primary/20 with ring-2 ring-accent for annotated blocks so they're visually distinct. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * cleanup: memoize annotation filters, fix timer leaks, use blockId for highlight rings Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: preserve normal annotations across diff toggle Replace ternary rendering with display:none so the Viewer stays mounted and web-highlighter DOM marks survive the toggle. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: store full block content in diff annotations instead of truncating to 500 chars Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|
|
e1bd27aae4 |
feat: custom theme system with 18 built-in themes (#294)
* feat: custom theme system with 15 built-in themes Consolidate CSS theming into a single source of truth (packages/ui/theme.css) and introduce a multi-theme architecture where each theme defines both dark and light mode variants. Users can pick a color palette (theme) and separately toggle dark/light mode within it. - Extract shared color tokens, Tailwind bridge, and base styles into packages/ui/theme.css - Replace hardcoded oklch values with token references (oklch from var syntax) - Fix 3 light-mode bugs in review-editor diff colors - Create 15 built-in themes: Plannotator (default), Claude+, Soft Pop, Adwaita, Caffeine, Cyberdyne, Cyberfunk, Doom 64, Dracula, Gruvbox, PaulMillr, Quantum Rose, Solar Dusk, Terminal, Tinacious - Expand ThemeProvider to manage colorTheme + mode independently - Add Theme tab to Settings with mode toggle, search, and swatch grid - Dark-only themes (Dracula, Terminal, etc.) suppress light class to prevent broken styling; light-only themes (Tinacious) force it - Cookie persistence: plannotator-color-theme for palette, existing key for mode - Include theme conversion script for FinSitter theme adaptation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat: refine themes, add Catppuccin/Rosé Pine/Monokai Pro/Synthwave 84/Tokyo Night Theme curation: - Replace Cyberdyne with Synthwave '84 (from robb0wen/synthwave-vscode) - Replace Cyberfunk with Catppuccin (Mocha dark + Latte light), Rosé Pine (dark + Dawn light), Monokai Pro (dark only), Tokyo Night (Storm + Day) - Rewrite Gruvbox from canonical source (morhetz/gruvbox) - Rewrite Adwaita from canonical VS Code theme (piousdeer/vscode-adwaita) - Rewrite PaulMillr from Ghostty canonical palette Theme fixes: - Fix faded Send Feedback button on Solar Dusk, Quantum Rose, Caffeine (accent colors were too dark/invisible at 15% opacity) - Fix Dracula/Terminal/PaulMillr/Tinacious light mode breakage — dark-only themes now suppress .light class via modeSupport in ThemeProvider - Fix code block backgrounds — use --code-bg token instead of --muted - Add faint green grid overlay for Terminal theme - Alphabetize theme registry (Plannotator first) Code review diff theming: - Pass theme colors into @pierre/diffs shadow DOM via unsafeCSS prop - Dynamic themeType based on resolved mode 18 built-in themes: Plannotator, Absolutely, Adwaita, Caffeine, Catppuccin, Doom 64, Dracula, Gruvbox, Monokai Pro, PaulMillr, Quantum Rose, Rosé Pine, Soft Pop, Solar Dusk, Synthwave '84, Terminal, Tinacious, Tokyo Night Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: increase settings modal height for theme grid visibility Remove 340px cap on theme grid, bump content area from 70vh to 85vh so all themes are visible without scrolling. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: memoize ThemeProvider context, deduplicate Mode type, clean up DiffViewer From /simplify review: - Export Mode type from ThemeProvider, import in ThemeTab (was duplicated) - Add resolvedMode to context — consumers no longer re-query matchMedia - Memoize context value with useMemo, setters with useCallback (prevents unnecessary re-renders of all useTheme consumers) - Consolidate DiffViewer's two pierre state vars into single object - Use resolvedMode from context in DiffViewer instead of classList check - Format crammed single-line extended tokens in 4 theme CSS files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: prevent FOUC, fix system mode stale read, restore marketing theme class P1: Marketing site inline script now sets theme-{name} class on <html> before first paint (reads plannotator-color-theme cookie). Without this, CSS tokens under .theme-* selectors were never active. P2: System mode effect now re-reads matchMedia.matches immediately when entering system mode, not just on future changes. Fixes stale resolvedMode when OS preference changed while pinned to explicit dark/light. P3: ThemeProvider applies theme class synchronously during render (not in a passive useEffect) to prevent flash of unstyled content on hard refresh. Also extracted resolveThemeClasses to module scope to avoid useCallback. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat: add Quick Copy button, fix import icon, comment out agent badge - Add Quick Copy button to annotation panel footer (splits horizontally with existing Quick Share). Copies annotations wrapped with the deny preamble so output is paste-ready for agent sessions. - Export Modal annotations copy also wraps with deny preamble - Extract wrapFeedbackForAgent() utility in parser.ts as single source of truth for the preamble text - Fix desktop import icon to match mobile (arrow-into-document, not download) - Comment out code review agent badge — unreliable across multiple harnesses Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|
|
d29dd08c13 |
feat: git add files from code review UI (#257)
* feat: add per-file git add from code review UI (#254) Adds the ability to `git add` individual files directly from the code review interface. Users can stage approved files then switch to the new "Unstaged changes" diff view to see only remaining work. - POST /api/git-add endpoint with worktree support - gitAddFile/gitResetFile utilities in packages/server/git.ts - "Staged changes" and "Unstaged changes" added to diff type dropdown - useGitAdd hook encapsulating all staging state and API logic - "Git Add" / "Added" toggle button in FileHeader (next to Viewed) - Visual indicator (left border) for staged files in sidebar FileTree Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * style: use green background tint for staged files instead of left border Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: support staged/unstaged diffs in worktrees and display stage errors Adds "staged" and "unstaged" to worktree sub-type allowlists (server parser, client parser, and runGitDiff switch), displays stageError in FileHeader, and documents /api/git-add in CLAUDE.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: clean up git add feature — fix stale closure, timeout leak, dedup validation - useGitAdd: use ref for stagedFiles to stabilize stageFile callback, clear error timeout on reset, drop unnecessary useMemo - App.tsx: wrap onFileViewed in useCallback - FileTree: merge duplicate staged count conditionals - review.ts: reuse exported validateFilePath for /api/file-content Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
472e17be3d |
feat: expandable diff context in code review (#247)
* feat: expandable diff context in code review (closes #243) Switch from PatchDiff to FileDiff component from @pierre/diffs to enable GitHub-style "show more lines" buttons between hunks. The library handles all expansion UI when provided full file contents via oldLines/newLines. - Add /api/file-content endpoint to serve old/new file content per diff type - Add getFileContentsForDiff() helper with ref mapping for all diff types - Parse patch client-side via getSingularPatch(), augment with file contents - Update @pierre/diffs from 1.0.4 to 1.0.11 (scroll sync fix, no breaking changes) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: upgrade @pierre/diffs to beta, re-parse patch with full file contents The previous approach spread file content arrays onto a partial-mode FileDiffMetadata, causing hunk index mismatches and Shiki decoration errors. Now uses processFile() to re-parse the patch with oldFile/newFile so hunk indices are computed against the full file (isPartial: false), which is required for expansion to work correctly. Also fixes a flash error on file switch by tagging fileContents with the filePath they were fetched for, preventing stale contents from being paired with the wrong patch during the render before useEffect fires. - Upgrade @pierre/diffs from ^1.0.x to ^1.1.0-beta.19 in all workspaces - Add test fixtures for disjoint hunks, deleted/renamed/new files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: abort stale file-content fetches, validate path params - Add AbortController to file-content fetch effect to cancel in-flight requests when switching files - Reject path traversal (.. or absolute paths) on /api/file-content - Document /api/file-content endpoint in CLAUDE.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
819948c724 |
docs: add editor annotations and shared package to CLAUDE.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
1701424b4e |
feat: VS Code extension for in-editor plan review (#229)
* feat: integrate VS Code extension from community (7tg/plannotator-vscode) Opens Plannotator plan reviews, code reviews, and annotations inside VS Code tabs instead of an external browser. Intercepts PLANNOTATOR_BROWSER via env var injection in integrated terminals, with cookie persistence and auto-close. Original repository: https://github.com/7tg/plannotator-vscode Closes #91 Co-Authored-By: Barbaros Gören <tayyipgoren@gmail.com> * chore: adapt VS Code extension for monorepo - Update package.json: publisher → backnotprop, repo → plannotator, add private - Replace node -e URL encoding with curl --data-urlencode in router script - Simplify panel-manager tests to keep only behavioral tests - Add dev:vscode, build:vscode, package:vscode scripts to root - Add *.vsix to .gitignore - Update bun.lock with new workspace member Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: address code review and duplicate panel issue - Fix macOS browser: detect script paths in PLANNOTATOR_BROWSER and invoke directly instead of via 'open -a' (which only accepts app names/.app bundles) - Update CLAUDE.md: add vscode-extension to project structure, development, and build sections - Fix command title: 'Simple Browser' -> 'Open URL in Editor' - Add 1s debounce to panel opens: Claude Code fires ExitPlanMode hook twice, spawning two plannotator processes on different ports that both hit the IPC server simultaneously - Add .vscode/launch.json + tasks.json for F5 debugging --------- Co-authored-by: Barbaros Gören <tayyipgoren@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
aa71ede0f3 |
Auto-save annotation drafts to survive server crashes (#217)
* feat: auto-save annotation drafts to survive server crashes Adds server-side draft persistence so annotations are not lost when the server process dies. Drafts are saved to ~/.plannotator/drafts/ keyed by a SHA-256 content hash, debounced at 500ms. On reload, a dialog prompts the user to restore or dismiss. Drafts are auto-deleted on approve/deny/feedback. Closes #212 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: remove duplicate imports and update CLAUDE.md for draft feature Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: wrap handleRestoreDraft in useCallback and update shared-handlers comment Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
e5f3cfffbb |
feat: Obsidian vault browser sidebar tab (#209)
* feat: add Obsidian vault browser sidebar tab (#207) Add a third sidebar tab that lets users browse their Obsidian vault's file tree, click any markdown file to open and annotate it as part of plan feedback. Includes wikilink support for navigating between vault files. - New /api/reference/obsidian/files and /api/reference/obsidian/doc endpoints - useVaultBrowser hook and VaultBrowser sidebar component - Wikilink [[filename]] and [[filename|display]] detection in Viewer - "Vault Browser" toggle in Settings > Obsidian - Bare filename search for wikilink resolution within vault Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: update docs and clear vault state on disable - Add new reference endpoints to CLAUDE.md API table - Update stale doc comments referencing "two tabs" in sidebar files - Clear vaultPath and activeFile when vault browser is disabled Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: simplify vault browser prop passing and derived state - Move VaultNode to packages/ui/types.ts (shared type location) - Pass useVaultBrowser return as single object prop through SidebarContainer - Replace showVaultTab/vaultPath useState with useMemo derivations - Extract buildVaultDocUrl helper to deduplicate URL template - Wrap onVaultFetchTree in useCallback - Fix toggle switch size to match existing toggles (h-6 w-11) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
b1f91936d6 |
Deploy paste service with E2E encryption (#203)
* feat: Deploy paste service with end-to-end encryption (zero-knowledge) Add AES-256-GCM client-side encryption to the short URL sharing flow. Plans are encrypted in the browser before upload — the paste service stores only ciphertext it cannot read. The decryption key lives only in the URL fragment (#key=...) and never leaves the browser. - New packages/shared/crypto.ts with encrypt/decrypt via Web Crypto API - Encrypt before POST in createShortShareUrl, decrypt on load - Parse #key= fragment in useSharing.ts for both direct and import URLs - Deploy Cloudflare Worker with KV namespaces to workers.dev - Add deploy-paste CI/CD job to deploy.yml - Fix Cache-Control from public to private, no-store - Update ExportModal strings with encryption messaging - Update README, docs, and blog with zero-knowledge encryption details Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Address code review: fix short URL fallthrough and regex anchor - Return false early when paste fetch fails on /p/<id> path instead of falling through to parseShareHash() (which can never succeed since the hash contains #key=, not plan data) - Add end-anchor to importFromShareUrl regex to prevent false matches on URLs with extra path segments (regression from PR #188) - Remove demo plan NOTE from README Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
c470dcebf1 |
Add short URL sharing via paste service to fix URL truncation (#188)
* Add short URL sharing via paste service to fix URL truncation on Slack/messaging apps Share URLs for large plans can be 10-40KB+ because the entire plan + annotations are compressed into the URL hash. Services like Slack, WhatsApp, and Twitter truncate these URLs, making shared plans unviewable (related: #142). This adds an optional paste-service backend that stores compressed payloads and returns short ~60-char URLs (e.g. share.plannotator.ai/p/aBcDeFgH). Changes: - Add Cloudflare Worker paste service (apps/paste-worker/) with KV storage and 90-day TTL for stored plans - Add createShortShareUrl() and loadFromPasteId() to sharing utils - Update useSharing hook to auto-generate short URLs with 1s debounce - Update ExportModal to show short URL as primary copy target with full hash URL as backup - Portal automatically supports /p/<id> paths via useSharing hook - Fully backward compatible: hash-based URLs continue to work unchanged - Graceful degradation: falls back to hash URLs if paste service is unavailable * Fix critical bugs found during code review of short URL feature - Worker: return only { id } so client constructs URL with its own shareBaseUrl (fixes self-hosted deployments) - importFromShareUrl: handle /p/<id> short URLs in addition to hash URLs (fixes teammate import via short links) - Anchor /p/<id> regex with ^ to prevent false matches on nested paths - Pass shareBaseUrl to loadFromPasteId (was always defaulting) - replaceState preserves base path instead of hardcoding / - Clear stale shortShareUrl immediately on debounce to prevent showing outdated link during the 1s delay - Add shareBaseUrl to dependency arrays for loadFromHash and importFromShareUrl callbacks - Remove unused url field fallback from paste API response parsing * Fix pasteApiUrl/shareBaseUrl confusion and add remote session share URLs Bug fix (addresses @backnotprop's code review): - useSharing hook now accepts separate `pasteApiUrl` parameter instead of incorrectly passing `shareBaseUrl` to `loadFromPasteId`. These are different domains (share portal vs paste backend). When omitted, the default `https://paste.plannotator.ai` is used correctly. - Fixed in all three call sites: loadFromHash, importFromShareUrl, and generateShortUrl (via createShortShareUrl options). Remote session share URLs (implements #192): - When running on a remote instance (SSH, devcontainer), Plannotator now generates a share.plannotator.ai URL and prints it to stderr so the user can open the plan review in their local browser. - Works for all three modes: plan review, code review, and annotate. - Uses the same deflate-raw + base64url encoding as the client. - Fails silently if URL generation fails — port forwarding still works. - New server utility: packages/server/share-url.ts * Address code review findings: fix spread limit, CORS, deps array - share-url.ts: Replace btoa(String.fromCharCode(...compressed)) with a loop to avoid RangeError on plans >65K compressed bytes - share-url.ts: Add cross-reference comment noting the server-side SharePayload is an intentional subset of the canonical UI type - paste-worker: Only return CORS headers for allowed origins; disallowed origins get no CORS headers instead of misleading partial headers - useSharing.ts: Remove unused shareBaseUrl from loadFromHash dependency array (loadFromHash only uses pasteApiUrl, not shareBaseUrl) * Restructure paste service with pluggable storage, fix consent flow and security issues Replaces monolithic paste-worker with multi-target paste-service architecture: - Core logic (handler, storage interface, CORS) separated from deployment targets - Filesystem store (self-hosted), KV store (Cloudflare), S3 stub (future) - Bun binary target + Cloudflare Worker target - Fix auto-upload removed: short URLs only created on explicit user click - Clear stale short URL state when content changes - Fix require('fs') in ESM module, add path-traversal guard in FsPasteStore - Return 400 (not 500) for malformed JSON in both targets - Fix compress() spread limit for large plans - Updated docs: self-hosting guide, sharing guide, env vars, API endpoints Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Simplify paste service: extract shared router, remove TOCTOU patterns - Extract duplicated HTTP routing from bun.ts and cloudflare.ts into handleRequest() in core/handler.ts — targets are now thin wrappers - Move ID_PATTERN regex to core (was duplicated in both targets) - Remove existsSync guard before mkdirSync({recursive:true}) in fs.ts - Remove file.exists() check before file.json() in fs.ts get() — the try/catch already handles missing files - Extract DEFAULT_SHARE_BASE constant in sharing.ts (was hardcoded twice) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Deduplicate compression, image parsing, and remote share URL logic - Create packages/shared/ with compress/decompress (single source of truth) — both @plannotator/server and @plannotator/ui import from here - Export parseShareableImages from sharing.ts, remove duplicate parseGlobalAttachments from useSharing.ts - Extract writeRemoteShareLink() helper in share-url.ts, replace 3 near-identical blocks in apps/hook/server/index.ts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix modulo bias in paste ID generation and remove nonexistent doc artifacts - Use rejection sampling in generateId() to eliminate modulo bias (bytes >= 248 discarded, uniform distribution over 62 chars) - Remove references to install-paste.sh and Docker image that don't exist yet; point self-hosting docs to GitHub Releases binaries Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Michael Ramos <mdramos8@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
93e9420cb4 |
feat: open linked .md files in read-only tabs with TOC navigation (#184)
* feat: open linked .md files in read-only tabs with TOC navigation When a plan references local .md files via markdown links, they now open in a new browser tab using the full Plannotator viewer in read-only mode. Changes: - server: add /api/doc?path= endpoint with 4-strategy path resolution (absolute, relative to project root, bare filename search). Returns 400 with match list on ambiguous filenames, 404 when not found, 403 on path traversal. Only resolves files within process.cwd(). - Viewer: detect local .md links in InlineMarkdown and route them to /?doc=<path>&readonly=true with a new-tab icon. Add isReadOnly prop that guards the web-highlighter init (prevents phantom highlights) and suppresses annotation toolbars. - App: parse ?doc= URL param on load and fetch from /api/doc instead of /api/plan. Set isReadOnly mode which shows a read-only banner, hides approve/deny/feedback buttons, ModeSwitcher, Settings, AnnotationPanel, and annotation panel toggle. Shows an error view (not a silent fallback) when the document cannot be found or is ambiguous. Opens the sidebar to the TOC tab automatically. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: upgrade linked docs to same-view annotatable navigation with aggregated feedback Replace the new-tab read-only approach with same-view navigation: clicking a .md link swaps the plan content in-place, preserving all annotations via a docCache. Users can annotate linked docs and all feedback (plan + linked docs) is aggregated into the deny/approve payload sent to Claude. Key changes: - New useLinkedDoc hook for state swapping, caching, and highlight restoration - React key on Viewer forces clean unmount/remount (fixes web-highlighter DOM crash) - exportLinkedDocAnnotations() aggregates linked doc feedback with filepath context - UI: 2px primary border, "Linked File" badge, "Copy file" button, TOC filepath indicator with back-to-plan button - Fix Tailwind v4 cascade: move * { border-color } to @layer base so utility classes like border-primary actually override it - Compact TOC spacing (padding, gaps, line-height) without affecting Version Browser - Exclude node_modules/.git from /api/doc bare filename glob Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: harden /api/doc endpoint and align linked doc annotation output Restrict /api/doc to .md/.mdx files only, fix heading hierarchy and sorting in exportLinkedDocAnnotations, and update CLAUDE.md docs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: complete linked doc annotations in getDocAnnotations and fix useMemo deps - getDocAnnotations() now includes the active linked doc's live annotations alongside the cache, removing the implicit requirement to call back() before reading - Remove unstable linkedDocHook object from annotationsOutput useMemo dependency array (was defeating memoization every render) - Guard Cmd+Enter shortcut against linkedDocHook.isActive to prevent accidental approve/deny while viewing a linked doc Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: include linked doc annotations in approve feedback gate The handleApprove gate only checked plan-level annotations, silently dropping linked-doc-only feedback on "approve with notes" (OpenCode). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: add getDocAnnotations to annotationsOutput useMemo deps Ensures memo recomputes when navigating to/from linked docs, preventing stale annotation output. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Michael Ramos <mdramos8@gmail.com> |
||
|
|
7145f190ec |
Add "Open in VS Code Diff" button to plan diff viewer (#180)
* Add feature plan for VS Code diff viewer button Scoping document for a new PlanDiffViewer button that opens the plan diff in VS Code's native diff viewer via `code --diff`. https://claude.ai/code/session_01FYcJkGsWfuiGy53x3pwCSW * feat: add "Open in VS Code" button to plan diff viewer Add a button in the PlanDiffViewer toolbar that opens the current plan diff in VS Code's native side-by-side diff viewer. The server writes both versions to temp files and spawns `code --diff`. - New POST /api/plan/vscode-diff endpoint in packages/server/index.ts - VS Code button with loading/error states in PlanDiffViewer.tsx - Wire currentPlan/basePlan/baseVersion props from App.tsx https://claude.ai/code/session_01FYcJkGsWfuiGy53x3pwCSW * chore: update bun.lock after install https://claude.ai/code/session_01FYcJkGsWfuiGy53x3pwCSW * refactor: server reads plan versions directly instead of receiving from client The server already has the current plan in its closure and can read any version from disk via getPlanVersion(). No need to send plan text from the UI — just send baseVersion. https://claude.ai/code/session_01FYcJkGsWfuiGy53x3pwCSW * chore: remove plan.md scoping document from repo Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: extract editor diff logic into shared packages/server/editor.ts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: use official VS Code SVG icon in plan diff viewer button Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: use history file paths directly for VS Code diff instead of writing temp files Both plan versions already exist on disk in ~/.plannotator/history/. Eliminates redundant file writes, fixes UPLOAD_DIR semantic misuse, and corrects HTTP status codes for editor errors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: rename editor.ts to ide.ts to avoid confusion with plan editor UI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: add ide.ts and vscode-diff endpoint to CLAUDE.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
819ba11f77 |
feat: plan diff UI with sidebar and dual view modes (#176)
* feat: add plan diff UI with sidebar, badge, and dual view modes Shows what changed between plan iterations when Claude revises after feedback. Adds a +N/-M badge below repo info that toggles the diff view, a shared left sidebar with TOC and Version Browser tabs, and two diff modes: rendered (color-coded borders) and raw markdown (+/- lines). Closes #138, closes #111 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: update CLAUDE.md project structure and align first-run dialog labels - Add plan-diff/ and sidebar/ component subdirectories to CLAUDE.md - Add new hooks and utils to CLAUDE.md project structure - Rename "Table of Contents" to "Auto-open Sidebar" in UIFeaturesSetup to match Settings.tsx label Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: address code review findings for plan diff UX - Fix badge stats mixing block counts with line counts (modifications now fold into additions/deletions) - Gate hasPreviousVersion on diffBasePlan being loaded to prevent "Show Changes" no-op and ModeSwitcher disappearing - Make sidebar reactive to Settings toggle (useEffect on tocEnabled) - Match PlanDiffViewer badge layout to Viewer (flex-col) so badge doesn't jump position on toggle - Add "Exit Diff" label to the close button in diff view - Remove dead CSS (plan-diff-removed-marker, plan-diff-modified) - Clean up stale header comment and unused lines prop Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: second-round review cleanup for plan diff UX - Fix stale "amber border" JSDoc in PlanCleanDiffView (actually green) - Rename sidebar tab from "diff" to "versions" for clarity - Gate VersionBrowser fetch on versionInfo being available - Move .sidebar-tab-flag CSS into its own Sidebar section Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: add loading state for version selection in sidebar Add isSelectingVersion to selectBaseVersion, mirroring the existing isLoadingVersions pattern. Shows "Loading..." on the selected version button while the fetch is in progress. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: address third-round code review findings - Fix duplicate border/backdrop on TOC inside sidebar (className override) - Fix loading indicator targeting wrong version button (fetchingVersion state) - Fix "Show Changes" button silent no-op (gate on hasPreviousVersion) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: move date to slug suffix, improve Other Plans UX - Slug format changed from YYYY-MM-DD-{heading} to {heading}-YYYY-MM-DD - Other Plans: single "coming soon" banner instead of per-item labels - Strip date suffix from plan names in sidebar for readability - Remove cursor-not-allowed from Other Plans items Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: add Plan Diff section to CLAUDE.md, alert on version fetch failure - Document plan diff feature: engine, view modes, state management, sidebar - Update slug format documentation to {heading}-YYYY-MM-DD - Show native alert when version fetch fails instead of silent swallow Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: add table rendering to clean diff view Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
bf9a15a185 |
feat: add plan version history backend and API (#175)
* feat: add plan version history (backend + API)
Save plan versions to ~/.plannotator/history/{project}/{slug}/ on every
plan arrival. Serves previousPlan and versionInfo via /api/plan, and adds
GET /api/plan/version?v=N for fetching any historical version. Enables
future diff UI. Deduplicates identical resubmissions.
Closes #138, closes #111
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add version listing and project history APIs
Add GET /api/plan/versions to list all versions of the current plan with
timestamps, and GET /api/plan/history to list all plans in the current
project. Both endpoints available in shared server and pi extension.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs: add version history section and API endpoints to CLAUDE.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
|
||
|
|
444934a654 |
refactor: rename diff → annotations in plan review context (#173)
* refactor: rename misleading "diff" terminology to "annotations" in plan review context The plan review flow used "diff" naming (exportDiff, diffOutput, .diff.md, "Raw Diff", "Download .diff") for what is actually user annotations/feedback on a plan. This was confusing since the code review flow legitimately uses "diff" for actual git diffs. Renames all plan-review-context "diff" references to "annotations" across code, UI labels, file extensions, and docs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: update stale exportDiff references in ANNOTATE.md Missed during the diff→annotations rename. Updates two references to exportDiff() → exportAnnotations() in the annotate flow docs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: rename remaining "Download Diff" label and tab type in App.tsx The quick-save dropdown button still showed "Download Diff" and the initialExportTab state type still used 'diff' instead of 'annotations'. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
0554bfc544 |
feat: migrate marketing site to Astro with docs and blog (#150)
Migrate marketing site from Vite React SPA to Astro 5 with documentation (15 pages) and blog. Preserves landing page design, OKLCH design system, and S3/CloudFront deploy pipeline. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
e46815d8ea |
feat: named image references and annotate command (#147)
* feat: named image references and annotate command (#67, #109) 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> * refactor: move image name input to ImageAnnotator screen 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> * fix: stale closure in paste handler, update CLAUDE.md for new features 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> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
0b47dd54a7 |
feat: add configurable share URL for self-hosted portals (#146)
Add PLANNOTATOR_SHARE_URL env var so users can point share links at their own self-hosted portal instance instead of share.plannotator.ai. Threads the base URL through the same path as sharingEnabled: env var → server options → API response → editor state → useSharing hook → generateShareUrl(). Includes self-hosting guide and documentation. Closes #12 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
c24e775292 |
fix: smart detection for agent switching in OpenCode (#96)
Closes #94 |
||
|
|
8019f73a44 |
Feat/code review system (#57)
## Summary Complete code review system for reviewing git diffs with annotations. ### Features - Interactive diff viewer with split/unified views - Line-level annotation system - Diff type selector (uncommitted, last commit, vs main branch) - Dynamic default branch detection - Empty state handling - Simplified UX with streamlined feedback flow Closes #51 Closes #56 |
||
|
|
cee2c7ff4c |
feat: add PLANNOTATOR_BROWSER for browser selection (#48)
Allow users to specify which browser opens plan files via environment variable.
Default behavior unchanged - only activates when env var is set.
- macOS: Set to app name ("Google Chrome") or path
- Linux/Windows: Set to executable path
Closes #42
|
||
|
|
f4dcdbffd6 |
Bump version to 0.4.10
- Update CLAUDE.md with new APIs and file structure - Remove unused helper functions (isAgentSwitchEnabled, isPlanSaveEnabled) - Sync all package versions to 0.4.10 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|
|
14e9aea0ec |
Fix/devcontainer & plan auto switching (opencode) (#31)
* Refactor: shared server package with PLANNOTATOR_REMOTE env var - Create packages/server/ with shared server implementation - Add PLANNOTATOR_REMOTE=1 env var for devcontainer/SSH mode - Deprecate SSH_CONNECTION detection (still works with warning) - Both Claude Code and OpenCode now use identical server logic - OpenCode gains Obsidian/Bear integrations and remote detection - Update documentation with environment variables section Fixes #27 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Remove PLANNOTATOR_ORIGIN env var, fix onReady callback timing - Remove PLANNOTATOR_ORIGIN hack from Claude Code hook (hardcode "claude-code") - Fix onReady callback to pass port directly (was referencing undefined server) - Create tests/manual/test-server.ts for testing either origin - Update test-hook-2.sh to use new test server with opencode origin 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Add devcontainer test setup, reduce logging verbosity - Add tests/devcontainer/ with devcontainer.json for testing remote mode - Add tests/opencode-local/ for local OpenCode testing - Update package.json build script for proper bundling - Remove verbose multi-line error messages, keep useful errors - Clean up unused deprecationWarned variable 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Add devcontainer support and documentation - Add PLANNOTATOR_REMOTE env var for container/remote detection - Remove console logging (silent operation) - Add devcontainer.md with full setup instructions - Add devcontainer section to OpenCode plugin README - Add port-only test setup to reproduce common misconfiguration - Update test devcontainers to forward port 4096 for opencode web - Bump version to 0.4.1 Fixes #27 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Update CLAUDE.md: legacy SSH detection, not deprecated Removed incorrect mention of deprecation warning - SSH_TTY/SSH_CONNECTION detection is silent by design. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Fix OpenCode agent switching after plan approval After approving a plan, the conversation context stayed in "plan" mode even though the TUI showed "build". This caused edits to fail because the plan agent has edit permissions denied. The fix uses session.prompt() to inject a message with agent: "build", which triggers a new agentic loop with proper build agent permissions. Fixes #29 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> |
||
|
|
22aae761e1 |
add global comments (#8)
* Add global comments annotation capability - Add GLOBAL_COMMENT type to AnnotationType enum - Add "Global comment" button next to "Copy plan" in Viewer header - Implement inline input form for entering global comments - Update AnnotationPanel to display global comments with purple styling - Update exportDiff to include global comments in feedback output - Update sharing utils to serialize/deserialize global comments with 'G' prefix * Add fallback for unknown annotation types and update docs - Add fallback config in AnnotationPanel for forward compatibility (prevents crash when portal encounters unknown annotation types) - Update CLAUDE.md with GLOBAL_COMMENT enum value - Update CLAUDE.md with 'G' ShareableAnnotation variant |
||
|
|
fede9ce837 | remove development docs | ||
|
|
d1a2f17626 | refine claude.md | ||
|
|
92fd9128f3 |
Add tater sprites and update docs
- Restore sprite packages (pullup, sitting, running) - Update CLAUDE.md with sharing architecture docs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|
|
92d4f73b66 |
Initial commit: Plannotator - Plan review UI for Claude Code
A React-based annotation tool that intercepts Claude Code's ExitPlanMode to provide visual plan review with collaborative features. Features: - Markdown plan rendering with syntax highlighting - Text selection annotations (delete, replace, insert, comment) - Redline mode for quick deletion marking - URL-based sharing via compressed hash (no server storage) - Tater identity system for anonymous collaboration - Export to diff format - Dark/light theme support - Tater sprite easter egg 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |