141 Commits

Author SHA1 Message Date
Michael Ramos 2832d70bd9 chore: bump version to 0.6.6
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.6.6
2026-01-18 09:14:35 -08:00
Michael Ramos 8fc6b80476 fix: OpenCode plugin updates (CVE + sub-agent fix) (#90)
## Summary

- Bump `@opencode-ai/plugin` to >=1.1.10 for CVE-2026-22812
- Prevent sub-agents from triggering plannotator

## Changes

1. **CVE Fix**: Updated dependency to address critical RCE vulnerability in OpenCode < v1.1.10

2. **Sub-agent Fix**: 
   - Replace `experimental.chat.system.transform` with `chat.message` hook (only injects for "plan" agent)
   - Add runtime block for sub-agents ("general", "explore") in `execute()`

Fixes #89, fixes #15, fixes #86
2026-01-18 09:11:54 -08:00
Michael Ramos f1087efc7c chore: bump version to 0.6.5
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.6.5
2026-01-17 14:42:02 -08:00
Michael Ramos c9b25a5e30 fix: increase hook timeout to 4 days (#88)
Increases the plannotator hook timeout from 30 minutes to 4 days
(345600 seconds) to prevent the server from being killed during
extended plan review sessions.

Fixes #84

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 13:38:01 -08:00
Michael Ramos e5e59d0740 fix: preserve newlines in copy and add Cmd+C shortcut (#87)
* fix: use @plannotator/web-highlighter for proper newline handling

- Switch from web-highlighter to @plannotator/web-highlighter@0.8.1
- Use source.text from highlighter (preserves newlines in cross-block selections)
- Update dependency to ^0.8.1 which fixes exports field for bundlers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: add Cmd+C keyboard shortcut for copying selected text

Closes #60

When text is selected and the annotation toolbar is visible, Cmd+C (Mac)
or Ctrl+C (Windows/Linux) will copy the selected text with proper newlines
preserved between block elements.

This works because @plannotator/web-highlighter@0.8.1 now captures text
using Selection.toString() which preserves newlines for cross-block
selections.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: don't intercept Cmd+C in input/textarea fields

Prevents the custom copy handler from intercepting Cmd+C when the user
is focused in an input or textarea (e.g., annotation comment input).
Previously, copying text from an input would copy the original plan
selection instead.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 13:13:00 -08:00
Michael Ramos 4ed4d15171 chore: bump version to 0.6.4 v0.6.4 2026-01-15 20:55:54 -08:00
Michael Ramos cc3c3fe2bf feat: add Cmd+Enter keyboard shortcut to submit (#80) (#81)
- No annotations → Approve (proceed with implementation)
- With annotations → Send Feedback (request revision)

Works in both plan review and code review UIs. Respects input focus
to avoid conflict with existing Cmd+Enter to save annotation edits.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 20:51:57 -08:00
Michael Ramos 49c6575370 fix: restore both cache paths in install.sh
Keep clearing both ~/.cache/opencode and ~/.bun/install/cache paths
to match Windows behavior (belt and suspenders).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 10:13:26 -08:00
Michael Ramos b1883d38e8 fix(opencode): include HTML files in npm package
The `files` array in package.json was missing plannotator.html and
review-editor.html, causing them to be omitted from npm publishes.
This explains why users were stuck on old versions.

Also fixes incorrect cache path in docs and install script.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.6.3
2026-01-15 10:04:26 -08:00
Michael Ramos dcc1ad108a chore: bump version to 0.6.2
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.6.2
2026-01-15 07:54:14 -08:00
Michael Ramos 4f6af14f02 Merge pull request #78 from stranger2904/fix/skip-title-generation-prompt
fix(opencode): skip Plan Submission prompt for title generation
2026-01-15 07:52:16 -08:00
Michael Ramos 4dd67c1157 chore: bump version to 0.6.1
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.6.1
2026-01-15 07:45:14 -08:00
Aleksey Bragin 7cd2484461 fix(opencode): skip Plan Submission prompt for title generation
The Plan Submission system prompt was being injected into ALL requests,
including title generation. This caused the title generator to see the
wrong system prompt and attempt to call submit_plan instead of generating
a title.

This fix detects title generation requests by checking for "title generator"
or "generate a title" in the existing system prompt and skips injecting
the Plan Submission instructions for those requests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 10:44:45 -05:00
Michael Ramos 02c2b032a4 Merge pull request #76 from backnotprop/feat/obsidian-custom-path
feat: allow custom path for Obsidian integration (#68)
2026-01-14 14:29:34 -08:00
Michael Ramos 12385beef5 fix: use correct placeholder for custom vault path
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 14:28:29 -08:00
Michael Ramos 80bcb99493 feat: allow custom path for Obsidian integration (#68)
Add "Custom path..." option to vault dropdown so users can save plans
to any folder, not just registered Obsidian vaults.

- Add customPath field to ObsidianSettings interface
- Add CUSTOM_PATH_SENTINEL and getEffectiveVaultPath() helper
- Show conditional text input when custom path is selected
- Resolve effective path before sending to server

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 14:22:04 -08:00
Michael Ramos 652e1fa0a7 Merge pull request #75 from backnotprop/feat/disable-sharing-config
feat: add config to disable URL sharing
2026-01-14 13:49:23 -08:00
Michael Ramos 78a30eab49 fix: OpenCode config read and lazy evaluation
- Fix config access: use response.data.share instead of response.share
- Make config read lazy to avoid blocking plugin init
- Add --disable-sharing and --keep flags to sandbox script
- Add sharingEnabled to test-server.ts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 13:48:05 -08:00
Michael Ramos 131d1b9d0e feat: add config to disable URL sharing (#69)
Add deployment-level configuration to disable URL sharing for
security/privacy concerns.

Configuration methods:
- Claude Code: PLANNOTATOR_SHARE=disabled env var
- OpenCode: "share": "disabled" in opencode.json (primary), env var fallback

When disabled:
- Quick Share button hidden in annotation panel
- Share tab hidden in export modal (shows only Raw Diff)

Closes #69

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 13:12:37 -08:00
Pedro Paulo Pinheiro dos Santos ecbaf17e22 bugfix: Add WSL detection for browser opening utility (#74)
* bugfix: Add WSL detection for browser opening utility

* fix: add empty title param to Windows start command

The Windows `start` command interprets the first quoted argument as
a window title. Without an empty title `""`, paths with spaces like
"C:\Program Files\..." would be misinterpreted, causing custom
browser settings to fail silently.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Michael Ramos <mdramos8@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 09:33:46 -08:00
stranger2904 fb59c14b43 fix: respect XDG environment variables in install script (#73) 2026-01-14 06:13:34 -08:00
Michael Ramos 128417600d chore: bump version to 0.6.0
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.6.0
2026-01-13 20:36:38 -08:00
Michael Ramos 0e07425116 feat: permission mode preservation for Claude Code hooks (#71)
* feat: add permission mode utility and setup dialog

Add cookie-based storage for permission mode preference with first-time
setup dialog for Claude Code users. Supports three modes:
- Auto-accept Edits (default)
- Bypass Permissions (equivalent to --dangerously-skip-permissions)
- Manual Approval

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: integrate permission mode in editor and settings

- Show first-time setup dialog for Claude Code users
- Add permission mode dropdown to Settings (Claude Code only)
- Pass selected mode in approve request

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: output updatedPermissions in hook response

Use Claude Code 2.1.7+ hook protocol to preserve permission mode after
plan approval. Extracts permission_mode from hook input, allows client
to override via request, and outputs setMode in updatedPermissions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 20:31:23 -08:00
Gregson Murcia 4e18e3dccc feat: enable inline editing for annotations (#58) 2026-01-13 20:29:47 -08:00
stranger2904 482a0d361e fix: respect XDG_CONFIG_HOME in postinstall script (#72)
The postinstall script previously hardcoded ~/.config/opencode/command
as the destination for slash command files. This causes issues for users
running OpenCode in portable/XDG-compliant environments where
XDG_CONFIG_HOME is set to a custom location.

This change uses ${XDG_CONFIG_HOME:-$HOME/.config} which:
- Uses XDG_CONFIG_HOME when set (for portable installations)
- Falls back to ~/.config for standard installations (no behavior change)

This follows the XDG Base Directory Specification and ensures the plugin
works correctly in containerized, portable, or multi-user environments.

Co-authored-by: Aleksey Bragin <ab@alfabox.net>
2026-01-13 20:29:13 -08:00
Michael Ramos 8108546c10 chore: simplify install scripts
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 14:56:44 -08:00
Malik Tafheem 01ee1be666 fix(installer): handle byte array response in Windows PowerShell 5.1 (#65)
In Windows PowerShell 5.1, Invoke-WebRequest returns .Content as a byte
array (System.Byte[]) for non-HTML responses, not a string. This causes
the installer to fail with:

  Method invocation failed because [System.Byte] does not contain a
  method named 'Split'.

This fix:
- Adds -UseBasicParsing to avoid security warning prompts
- Detects if Content is byte[] and converts to string using UTF8 encoding
- Maintains compatibility with PowerShell 7+ where Content is already a string

Fixes installation on Windows PowerShell 5.1 (the default on Windows 10/11).

Co-authored-by: Tafheem Malik <maliktafheem@yvp5c.onmicrosoft.com>
2026-01-13 14:38:54 -08:00
Michael Ramos 461437a1d6 fix: make agent automatically respond to code review feedback
Removed noReply flag so agent addresses feedback immediately

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.5.7
2026-01-13 05:30:02 -08:00
Michael Ramos bcc84fd11e fix: remove agent_cycle from review to prevent wrong agent switch
session.prompt with agent parameter handles the switch correctly

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.5.6
2026-01-13 05:26:52 -08:00
Michael Ramos dff226f9ba docs: add Windows install script to OpenCode section
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 05:12:33 -08:00
Michael Ramos c58439bf82 fix: use win32 platform name in Windows install script
GitHub releases use win32-x64, not windows-x64

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 05:11:54 -08:00
Michael Ramos 4d2481e812 fix: rebuild with correct version embedded in bundle
0.5.4 was published with stale build containing 0.5.2 version string

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.5.5
2026-01-13 04:57:14 -08:00
Michael Ramos d599563f56 docs: update README with OpenCode install script instructions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 04:50:16 -08:00
Michael Ramos f5f59a3d34 fix: add OpenCode cache clearing to Windows install script
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 04:47:36 -08:00
Michael Ramos 806e5536d6 feat: unified install script for all platforms
- Add Windows PowerShell install script (install.ps1)
- Install slash commands for both Claude Code and OpenCode
- Update OpenCode README with install script instructions
- Simplify UpdateBanner to use same install command for both platforms

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.5.4
2026-01-13 04:45:51 -08:00
Michael Ramos 1ee40ef144 fix: always open review UI, allow switching diff types
Remove early exit when no uncommitted changes - user can switch to
"Last commit" or other diff types via dropdown.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.5.3
2026-01-12 20:16:07 -08:00
Michael Ramos 70f4ea429e docs: add date tag to code review feature 2026-01-12 20:12:47 -08:00
Michael Ramos e1153ebeac fix: add update banner to code review screen
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.5.2
2026-01-12 20:10:52 -08:00
Michael Ramos a427405201 fix: code review UI improvements for v0.5.1
- Show correct origin badge (Claude Code orange, OpenCode gray)
- Always show file tree sidebar when diff options available
- Update README with v0.5.0 label

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.5.1
2026-01-12 20:06:00 -08:00
Michael Ramos 0a909fa6ca fix: add restart note to install script and symlink for deploys
- Add "after you restart Claude Code" to /plannotator-review message
- Symlink install scripts to marketing/public for automatic deploys

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 20:00:00 -08:00
Michael Ramos 41eecc4480 chore: bump version to 0.5.0 for release
- Update version in root, opencode-plugin, and server packages
- Add code review feature to README
- Build artifacts for release

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.5.0
2026-01-12 19:41:42 -08:00
Michael Ramos 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
2026-01-12 19:36:09 -08:00
Michael Ramos 459a089a96 Bump version to 0.4.16
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.4.16
2026-01-11 09:39:33 -08:00
Michael Ramos 046ca06fcb feat: improve dark mode contrast and add success/warning tokens (#54)
- Lift background from 13% to 15% lightness (softer than pure black)
- Soften foreground from 95% to 90% (reduces glare)
- Increase surface elevation separation (card 22%, popover 28%)
- Make muted-foreground more readable (65% → 72%)
- Make borders more visible (28% → 35%)
- Add --success and --warning design tokens
- Replace all hardcoded Tailwind colors (green-500, purple-500, yellow-500)
  with design tokens for consistent theming
- Boost annotation highlight opacity in dark mode for better readability

Closes #53

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 09:37:42 -08:00
Michael Ramos c9a42af86a Bump version to 0.4.15
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v0.4.15
2026-01-09 10:34:55 -08:00
Michael Ramos 39ebb9e0be feat: support custom agents for agent switching (#50)
Add "Custom" option to agent switching dropdown that shows a text input
for specifying any custom agent name. This allows OpenCode users with
custom agents to switch to them after plan approval.

- Add 'custom' option with customName field to AgentSwitchSettings
- Add getEffectiveAgentName() helper for resolving actual agent name
- Show text input in Settings when Custom is selected
- Use effective agent name when sending to server

Closes #47

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 10:32:36 -08:00
Michael Ramos a0eb0fcc59 improve: clarify post-decision messaging (#49)
Make it explicit that users can close the tab after approving/denying:
- "You can close this tab and return to [Agent]."
- "Your response has been sent."

Related to #41

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 10:24:07 -08:00
Michael Ramos 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
2026-01-09 10:18:54 -08:00
Michael Ramos 03a19f5846 refactor: consolidate annotation toolbars into single component (#46)
- Create shared AnnotationToolbar component replacing duplicate code
- Delete old Toolbar.tsx and inline CodeBlockToolbar from Viewer.tsx
- Add copy button to toolbar (left side, separated from annotation icons)
- Fix copy to preserve line breaks using window.getSelection().toString()
- Net reduction of ~175 lines of duplicate code
2026-01-09 10:11:41 -08:00
Manh Luong 6736589446 fix: agent name in UI (#44)
* refactor: remove unused `DecisionBar`

* fix: coding agent name in UI
2026-01-09 09:33:07 -08:00