refactor: move source packages into app/ directory#49
Conversation
move all Go packages (annotation, diff, highlight, keymap, theme, ui) and entry point (cmd/revdiff) into app/. update all internal import paths, build configs, and documentation. drop go install instructions, keep brew and binary releases only. remove root llms.txt duplicate.
There was a problem hiding this comment.
Pull request overview
Refactors the repository layout by moving the Go entry point and all first-party packages under app/, and updates build tooling + documentation accordingly to match the layout used in related projects.
Changes:
- Move
cmd/revdiffand all Go packages intoapp/and update internal import paths to include/app/. - Update build/run configs (
Makefile,.goreleaser.yml,.zed/tasks.json) to build/run from./app. - Remove/adjust installation docs and delete redundant/stale documentation files (
llms.txt, old plan).
Reviewed changes
Copilot reviewed 31 out of 60 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| site/llms.txt | Removes obsolete go install .../cmd/revdiff instruction. |
| site/docs.html | Removes obsolete “Go install” section from site docs. |
| README.md | Removes go install installation path to avoid documenting the new ./app binary naming mismatch. |
| Makefile | Builds ./app from repo root and adjusts site target behavior. |
| llms.txt | Deletes root duplicate; site/llms.txt remains as single source. |
| docs/plans/completed/20260407-move-code-to-app.md | Adds completed plan documenting the refactor steps/results. |
| docs/plans/2026-04-06-stdin-scratch-buffer-review.md | Removes stale plan file. |
| CLAUDE.md | Updates project structure and path references to app/.... |
| app/ui/styles.go | UI styles implementation under new app/ui path. |
| app/ui/styles_test.go | Tests for style normalization and construction. |
| app/ui/search.go | Search input/match navigation logic under new app/ui path. |
| app/ui/model.go | Updates internal imports to github.com/umputun/revdiff/app/.... |
| app/ui/model_test.go | Updates internal imports to github.com/umputun/revdiff/app/... (including mocks). |
| app/ui/mocks/syntax_highlighter.go | Updates mock import path to app/diff. |
| app/ui/mocks/renderer.go | Updates mock import path to app/diff. |
| app/ui/mocks/blamer.go | Updates mock import path to app/diff. |
| app/ui/mdtoc.go | Updates import path to app/diff. |
| app/ui/mdtoc_test.go | Updates import path to app/diff. |
| app/ui/filetree.go | File tree implementation under new app/ui path. |
| app/ui/filetree_test.go | Tests for file tree behavior and rendering/truncation. |
| app/ui/diffview.go | Updates import path to app/diff. |
| app/ui/diffview_test.go | Updates import path to app/diff. |
| app/ui/collapsed.go | Updates import path to app/diff. |
| app/ui/collapsed_test.go | Updates imports to app/annotation and app/diff. |
| app/ui/annotlist.go | Updates imports to app/annotation and app/keymap. |
| app/ui/annotlist_test.go | Updates imports to app/annotation, app/diff, app/keymap. |
| app/ui/annotate.go | Updates imports to app/annotation and app/diff. |
| app/theme/theme.go | Theme implementation under new app/theme path. |
| app/theme/theme_test.go | Theme parsing/dumping/loading tests under new app/theme path. |
| app/theme/bundled.go | Bundled theme definitions under new app/theme path. |
| app/main.go | Moves entry point to app/main.go and updates internal imports to app/.... |
| app/main_test.go | Updates imports to app/diff and app/theme. |
| app/keymap/keymap.go | Keymap implementation under new app/keymap path. |
| app/keymap/keymap_test.go | Keymap tests under new app/keymap path. |
| app/highlight/highlight.go | Updates import path to app/diff. |
| app/highlight/highlight_test.go | Updates import path to app/diff. |
| app/diff/testdata/simple_remove.diff | Adds/moves diff parser fixture under app/diff/testdata. |
| app/diff/testdata/simple_add.diff | Adds/moves diff parser fixture under app/diff/testdata. |
| app/diff/testdata/multi_hunk.diff | Adds/moves diff parser fixture under app/diff/testdata. |
| app/diff/testdata/mixed_changes.diff | Adds/moves diff parser fixture under app/diff/testdata. |
| app/diff/testdata/empty.diff | Adds/moves empty diff fixture under app/diff/testdata. |
| app/diff/testdata/binary.diff | Adds/moves binary diff fixture under app/diff/testdata. |
| app/diff/stdin.go | Adds/moves stdin-backed renderer under app/diff. |
| app/diff/fallback.go | Adds/moves fallback renderer and context readers under app/diff. |
| app/diff/exclude.go | Adds/moves exclude-filter renderer wrapper under app/diff. |
| app/diff/exclude_test.go | Tests for exclude filter under app/diff. |
| app/diff/directory.go | Adds/moves all-files directory reader under app/diff. |
| app/diff/directory_test.go | Tests for directory reader under app/diff. |
| app/diff/diff.go | Adds/moves git diff renderer and unified diff parsing under app/diff. |
| app/diff/diff_test.go | Tests for git diff renderer and unified diff parsing under app/diff. |
| app/diff/blame.go | Adds/moves git blame support under app/diff. |
| app/diff/blame_test.go | Tests for blame parsing and behavior under app/diff. |
| app/annotation/store.go | Adds/moves annotation store under app/annotation. |
| app/annotation/store_test.go | Tests for annotation store under app/annotation. |
| .zed/tasks.json | Updates Zed run tasks to go run ./app .... |
| .goreleaser.yml | Updates GoReleaser build entry to main: ./app. |
| .claude-plugin/skills/revdiff/SKILL.md | Updates plugin skill install guidance (removes go install). |
| .claude-plugin/skills/revdiff/scripts/launch-revdiff.sh | Updates install hint to Homebrew/releases instead of go install. |
| .claude-plugin/skills/revdiff/references/install.md | Removes go install from plugin install reference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -9,7 +9,7 @@ REV=$(if $(filter --,$(GIT_REV)),latest,$(GIT_REV)) | |||
| all: test build | |||
|
|
|||
| build: | |||
There was a problem hiding this comment.
make build writes the output binary to .bin/revdiff.$(BRANCH) but the .bin/ directory is not created anywhere in the Makefile. In a clean checkout this target will fail with “no such file or directory”. Consider adding a mkdir -p .bin step (or using $(shell mkdir -p .bin) via a dedicated prerequisite) before go build/cp.
| build: | |
| build: | |
| mkdir -p .bin |
Move all Go packages (annotation, diff, highlight, keymap, theme, ui) and entry point into
app/directory, matching the layout used in secrets and cronn projects.cmd/revdiff/main.go→app/main.go(no morecmd/)/app/prefixgo installinstructions (binary namedappafter move, not worth documenting)llms.txtduplicate, keptsite/llms.txtas sole copy