Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
claude-previewtocode-previewacross all Lua modules, shell scripts, TypeScript, commands, and testshooks.luainto dedicatedbackends/claudecode.luaandbackends/opencode.luamodulesbackends/claudecode/andbackends/opencode/directories:ClaudePreview*commands so existing users aren't brokenvisible_onlymodeChanges
Rename:
claude-preview→code-previewlua/code-preview/(renamed fromlua/claude-preview/) — all modules updatedrequire("claude-preview.*")→require("code-preview.*")throughout Lua, shell scripts, and TypeScript:CodePreviewInstallClaudeCodeHooks,:CodePreviewUninstallClaudeCodeHooks,:CodePreviewCloseDiff,:CodePreviewStatus,:CodePreviewToggleVisibleOnly,:CodePreviewInstallOpenCodeHooks,:CodePreviewUninstallOpenCodeHooks:ClaudePreview*commands still work but emit a deprecation warning pointing to the new command namebin/nvim-send.sh—mktempprefix updated tocode-preview-nvim-cmdtests/minimal_init.luaand all spec files updatedBackend restructure
lua/code-preview/backends/claudecode.lua(new, replaceshooks.luaClaude Code logic) —install(),uninstall(), dual-marker uninstall ("code-preview"and"claude-preview") so users with old hooks can cleanly uninstall after upgradinglua/code-preview/backends/opencode.lua(new, replaceshooks.luaOpenCode logic) —install(),uninstall()lua/code-preview/hooks.lua— deleted (split into the two backend modules above)backends/claudecode/code-preview-diff.sh(moved frombin/claude-preview-diff.sh) — setsCODE_PREVIEW_BACKEND=claudecode, execsbin/core-pre-tool.shbackends/claudecode/code-close-diff.sh(moved frombin/claude-close-diff.sh) — execsbin/core-post-tool.shbackends/opencode/(moved fromopencode-plugin/) —index.tsenv var updatedCLAUDE_PREVIEW_BACKEND→CODE_PREVIEW_BACKEND; package name updated tocode-preview-opencodebin/core-pre-tool.sh/bin/core-post-tool.sh— all requires and env var references updatedHealth check
lua/code-preview/health.lua— dual-marker hook detection: reports OK for new marker, warns with migration hint for legacyclaude-previewmarker, and fails if neither is foundTests
tests/plugin/diff_lifecycle_spec.lua— new"diff layouts"describe block with 3 tests:tabopens a new tab with 2 windows,vsplitstays in the current tab,inlineopens a new tab with 1 windowtests/backends/claudecode/test_edit.sh— newtest_visible_only: verifies diff opens for a buffer visible in Neovim and is skipped for a file not open in any windowtests/backends/claudecode/(renamed fromtests/backends/claude/) — all test scripts updatedtests/helpers.sh— hook script paths updated tobackends/claudecode/Documentation
README.md— fully updated: new module paths, command names, architecture diagram, testing commands, migration guide for users upgrading from older versionsMigration guide (for existing users)
require("claude-preview")→require("code-preview")in your Neovim config:CodePreviewInstallClaudeCodeHooks(or OpenCode equivalent) to update hook script paths:ClaudePreview*commands still work with a deprecation warningTest plan
bash tests/run.sh) — 17 plugin + 22 backendtab/vsplit/inlinelayouts each produce the correct window structurevisible_onlyskips diff for files not open in Neovim, shows diff for visible filesbackends/claudecode/paths to.claude/settings.local.json:ClaudePreview*commands work with deprecation warningvisible_only,defer_claude_permissions, neo-tree reveal/indicators work on both backendsIssue:
#13