diffstalkerd 0.13.0 → 0.13.1

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/CHANGELOG.md CHANGED
@@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.13.1] - 2026-08-26
9
+
10
+ ### Changed
11
+
12
+ - **Compare's "include uncommitted" is now three independent toggles: staged,
13
+ unstaged, untracked.** One switch could not answer the question a reader
14
+ actually has — "what am I about to commit" and "what have I touched" are
15
+ different reviews, and with one flag there was no way to tell which of the
16
+ three a row belonged to, or to leave one of them out. Each folded-in row is
17
+ now tagged with the side it came from and its ref-pair label names that
18
+ side's own comparison (`HEAD → index`, `index → working tree`,
19
+ `HEAD → working tree`, `nothing → new file`). Staged and unstaged asked for
20
+ together are still read as ONE `git diff HEAD`, never two diffs — a file
21
+ changed on both sides is one row, not two chunks of which only the first
22
+ survives.
23
+ - **Wire:** `GET /compare?uncommitted=` is replaced by
24
+ `?staged=&unstaged=&untracked=`, and `GET /compare/file?uncommitted=` by
25
+ `?side=staged|unstaged|both|untracked`. A `CompareFileDiff`'s
26
+ `isUncommitted: boolean` becomes `uncommitted?: UncommittedSide`.
27
+ - **Whole-file mode works on an untracked compare row.** It used to ask git
28
+ for a diff of a file git does not track and get nothing back; the row is now
29
+ read from disk, which is what its hunks were already doing.
30
+ - The TUI's `u` key still toggles all three categories at once — the
31
+ per-category control is the web UI's.
32
+
8
33
  ## [0.13.0] - 2026-08-26
9
34
 
10
35
  ### Added
package/README.md CHANGED
@@ -210,8 +210,8 @@ values are rejected with a 400 so they can never be parsed as git flags.
210
210
  | GET | `/repos/:id/base-branches` | Candidate compare bases (remote branches in recent history) |
211
211
  | GET | `/repos/:id/compare/base` | Effective compare base: `{base}` (persisted choice or discovered default, null when none) |
212
212
  | PUT | `/repos/:id/compare/base` | Persist the compare base: `{"branch": "origin/main"}` → `{base}`; the ref is validated first (400 on an unknown ref, nothing persisted) |
213
- | GET | `/repos/:id/compare?base=&uncommitted=` | Base-vs-HEAD `CompareDiff` (three-dot); base defaults to the effective base — a stale persisted base falls back to the discovered default, 422 when nothing usable resolves; an explicit unknown `base` is a 400; a base with no common history is a 422; `uncommitted=true` merges working-tree changes |
214
- | GET | `/repos/:id/compare/file?path=&base=&uncommitted=&whole=` | One file's diff inside a comparison, as a `DiffResult`. The stacked views pull a range whole and split it client-side, so they have no per-file request of their own to widen. `uncommitted=true` reads the row against HEAD instead of against the base — Compare's stack mixes the two and they are genuinely different comparisons. Same rename-preserving pathspec as above. 400 without `path` |
213
+ | GET | `/repos/:id/compare?base=&staged=&unstaged=&untracked=` | Base-vs-HEAD `CompareDiff` (three-dot); base defaults to the effective base — a stale persisted base falls back to the discovered default, 422 when nothing usable resolves; an explicit unknown `base` is a 400; a base with no common history is a 422. The three uncommitted categories are independent flags, each defaulting to false; a row folded in carries `uncommitted: 'staged' \| 'unstaged' \| 'both' \| 'untracked'`. `staged` and `unstaged` together are read as ONE `git diff HEAD` (side `both`), never two diffs |
214
+ | GET | `/repos/:id/compare/file?path=&base=&side=&whole=` | One file's diff inside a comparison, as a `DiffResult`. The stacked views pull a range whole and split it client-side, so they have no per-file request of their own to widen. `side` names the row's own comparison — `staged` (HEAD vs index), `unstaged` (index vs working tree), `both` (HEAD vs working tree) or `untracked` (read from disk, git diff would answer empty) — and absent means a committed row against the base. Compare's stack mixes them and they are genuinely different comparisons. Same rename-preserving pathspec as above. 400 without `path`, or on an unknown `side` |
215
215
  | GET | `/repos/:id/tree?dir=&hidden=&ignored=` | One directory level (`name`, `path`, `type`), gitignored/hidden filtered by default (`hidden=true` / `ignored=true` include them, mirroring the TUI toggles), files annotated with `gitStatus` + `staged`, changed dirs with `hasChanges` (400 outside the repo root, on a file, or on the git directory, 404 unknown dir). The git directory is never listed, even with `hidden=true` |
216
216
  | GET | `/repos/:id/file?path=` | File content for display with flags: `{content, binary, truncated, tooLarge, size, totalLines, media?}` — binary/oversized come back with empty content and the flag set, never prose; `media` carries the image verdict (`{image, refusal, version}`) when the bytes say something about it; 400 for anything that is not a regular file (directory, FIFO, device), resolves outside the repo root, or addresses the git directory |
217
217
  | GET | `/repos/:id/media?path=&staged=` | Image metadata for one changed file, both sides resolved server-side (renames included): `{old, new}`, each side `{path, side, bytes, oid, image, refusal, version}` or `null` when the file does not exist there. `staged` must be spelled `0` or `1`. 404 when the path is not in status. See [Image bytes](#image-bytes) |