Skip to content

Rename /tmp/claude-diff-* tempfiles to /tmp/code-preview-* #60

@Cannon07

Description

@Cannon07

Motivation

The plugin was renamed claude-preview.nvimcode-preview.nvim. Everything visible to the user uses code-preview — except the tempfile names used by the core handler:

  • ${TMPDIR}/claude-diff-original-<pid>
  • ${TMPDIR}/claude-diff-proposed-<pid>
  • ${TMPDIR}/claude-patch-input-<pid>.json
  • ${TMPDIR}/claude-patch-out-<pid>/

Cosmetic, but inconsistent — a reader poking around /tmp after a hook fires sees claude-* names and wonders if there's a separate claude-specific path.

Scope

  • Rename all tempfile prefixes from claude-diff / claude-patch to code-preview-diff / code-preview-patch across bin/core-pre-tool.sh, bin/core-post-tool.sh, and any other shell that references them.
  • Update tempfile cleanup globs in core-post-tool.sh to match.
  • Worth pairing with a minor version bump in case any user has a stale tempfile from before the rename mid-upgrade.

Out of scope

  • Any other rename. The nvim-call.sh tempfile (code-preview-args.XXXXXX) already uses the new convention — leave it.

Acceptance

  • No claude-* tempfile references remain in bin/.
  • Existing integration tests pass; cleanup globs match new names.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions