diffback-review 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -13
- package/dist/cli.js +850 -158
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@ A local web tool to review AI-generated code changes. Think GitHub PR reviews, b
|
|
|
4
4
|
|
|
5
5
|
Instead of manually reading `git diff` output and typing feedback into a chat, `diffback` gives you a visual interface to browse changes, mark files as viewed, leave comments on specific lines, and generate a structured feedback prompt you can paste directly into your AI agent.
|
|
6
6
|
|
|
7
|
+

|
|
8
|
+
|
|
7
9
|
## Why
|
|
8
10
|
|
|
9
11
|
When working with AI coding agents (Claude Code, Cursor, Copilot, etc.), the review loop is painful:
|
|
@@ -18,15 +20,39 @@ When working with AI coding agents (Claude Code, Cursor, Copilot, etc.), the rev
|
|
|
18
20
|
|
|
19
21
|
## Features
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
### File browser with diff stats
|
|
24
|
+
|
|
25
|
+
Browse all changed files with status indicators (Added, Modified, Deleted, Renamed) and line stats (+/-). Filter by review status: All, Pending, Viewed, or Feedback.
|
|
26
|
+
|
|
27
|
+

|
|
28
|
+
|
|
29
|
+
### Inline comments with line ranges
|
|
30
|
+
|
|
31
|
+
Click line numbers to reference them (shift+click for ranges). Comments appear as bubbles directly in the diff. Quick comment presets for common feedback.
|
|
32
|
+
|
|
33
|
+

|
|
34
|
+
|
|
35
|
+
### Generate feedback prompt
|
|
36
|
+
|
|
37
|
+
One click to produce a structured, token-efficient markdown prompt. Auto-copied to clipboard, ready to paste into your AI agent.
|
|
38
|
+
|
|
39
|
+

|
|
40
|
+
|
|
41
|
+
### Themes
|
|
42
|
+
|
|
43
|
+
Three built-in themes: Solarized Dark (default), Monokai, and GitHub Light. Syntax highlighting adapts to each theme. Preference persists across sessions.
|
|
44
|
+
|
|
45
|
+
| Solarized Dark | Monokai | GitHub Light |
|
|
46
|
+
|:-:|:-:|:-:|
|
|
47
|
+
|  |  |  |
|
|
48
|
+
|
|
49
|
+
### More features
|
|
50
|
+
|
|
27
51
|
- **Persistent state between rounds** -- files you viewed stay viewed if unchanged; modified files get flagged automatically
|
|
52
|
+
- **Review round history** -- comments from previous rounds are archived and shown as violet markers in the diff
|
|
28
53
|
- **Auto-refresh** -- detects external file changes every 3 seconds without manual reload
|
|
29
54
|
- **Code fold/expand** -- hidden code between hunks shown as expandable sections
|
|
55
|
+
- **Resizable sidebar** -- drag to adjust the file list width
|
|
30
56
|
- **Keyboard shortcuts** -- `j/k` navigate files, `a` mark viewed, `c` comment, `g` generate feedback
|
|
31
57
|
|
|
32
58
|
## Requirements
|
|
@@ -82,9 +108,9 @@ Review state is stored in `.diffback-local-diffs/<branch_name>/state.json` insid
|
|
|
82
108
|
Between review rounds:
|
|
83
109
|
|
|
84
110
|
- **File unchanged** since last review -- stays marked as viewed
|
|
85
|
-
- **File modified** since last review -- automatically flagged as "changed since review", status reset to pending
|
|
111
|
+
- **File modified** since last review -- automatically flagged as "changed since review", status reset to pending. Previous comments are archived with their round number.
|
|
86
112
|
- **File no longer in diff** (reverted or committed) -- removed from state
|
|
87
|
-
- **"Finish Review"** button -- deletes all state for the current branch
|
|
113
|
+
- **"Finish Review"** button -- deletes all state for the current branch, shows goodbye screen, shuts down the server
|
|
88
114
|
|
|
89
115
|
## Generated feedback format
|
|
90
116
|
|
|
@@ -97,7 +123,7 @@ The output is designed to be token-efficient and easy for AI agents to parse:
|
|
|
97
123
|
|
|
98
124
|
## src/users/model.py
|
|
99
125
|
- L42: Handle the null case before accessing user.name
|
|
100
|
-
-
|
|
126
|
+
- L15-22: Use a dataclass instead
|
|
101
127
|
```
|
|
102
128
|
@dataclass
|
|
103
129
|
class UserProfile:
|
|
@@ -111,11 +137,11 @@ The output is designed to be token-efficient and easy for AI agents to parse:
|
|
|
111
137
|
|
|
112
138
|
## Tech stack
|
|
113
139
|
|
|
114
|
-
- **TypeScript + Node.js** --
|
|
115
|
-
- **
|
|
140
|
+
- **TypeScript + Node.js** -- server, feedback generator, and state manager as separate modules
|
|
141
|
+
- **Vanilla JS client** -- HTML + CSS + JS, no frameworks
|
|
116
142
|
- **Node built-in `http`** -- no Express or framework dependencies
|
|
117
|
-
- **diff2html** -- diff rendering (loaded via CDN)
|
|
118
|
-
- **
|
|
143
|
+
- **diff2html** -- diff rendering with syntax highlighting (loaded via CDN)
|
|
144
|
+
- **3 themes** -- Solarized Dark, Monokai, GitHub Light
|
|
119
145
|
|
|
120
146
|
## Development
|
|
121
147
|
|
|
@@ -124,6 +150,7 @@ git clone https://github.com/verabravo/diffback.git
|
|
|
124
150
|
cd diffback
|
|
125
151
|
npm install
|
|
126
152
|
npm run build
|
|
153
|
+
npm test
|
|
127
154
|
```
|
|
128
155
|
|
|
129
156
|
Test against any repo with uncommitted changes:
|