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.
Files changed (3) hide show
  1. package/README.md +40 -13
  2. package/dist/cli.js +850 -158
  3. 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
+ ![diffback diff view with syntax highlighting](docs/screenshot-diff-view.png)
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
- - **Web UI on localhost** -- file list + diff viewer + comment panel, opens in your browser
22
- - **Mark files as viewed** -- track your progress across many files
23
- - **Line comments** -- click a line number to reference it, add text or code suggestions
24
- - **General comments** -- feedback not tied to any file ("run the tests", "don't generate config files")
25
- - **Inline comment display** -- comments appear as bubbles directly under the referenced line
26
- - **Generate feedback prompt** -- one click to produce a structured markdown prompt, auto-copied to clipboard
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
+ ![File list with filters and stats](docs/screenshot-overview.png)
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
+ ![Inline comment on a line range](docs/screenshot-inline-comment.png)
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
+ ![Generated feedback modal](docs/screenshot-feedback.png)
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
+ | ![Solarized Dark](docs/screenshot-diff-view.png) | ![Monokai](docs/screenshot-monokai.png) | ![GitHub Light](docs/screenshot-github-light.png) |
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
- - L58: Use a dataclass instead
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** -- single `cli.ts` file for the server (~400 lines)
115
- - **Single HTML file** -- all CSS and JS inline, served from the server
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
- - **Solarized Dark theme** -- designed for accessibility
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: