M4.4: Git gutter change markers and status colours in tree and tabs

- git.lineChanges {id} -> {ranges: [{kind, startLine, endLine}], version}:
  the buffer against its index blob, line diff with similar (Myers +
  Replace, no Compact) off the lock, CRLF-safe; index texts cached per
  path and dropped on gitChanged (State::emit -> git_lines::observe)
- editor gutter markers for added, modified and deleted lines, queried
  150 ms after edits, on show and on gitChanged, mapped through edits
- vcsStatus store (git.status on projectOpened and gitChanged, no
  polling) colouring file names in the project tree and editor tabs with
  the --lt-vcs-* tokens; contrast also checked on the active tab
- tests: unit and property tests, real-repo engine tests, Vitest
- docs: architecture, parity, gaps, roadmap, ui-parity, ROADMAP

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-10-25 17:36:59 +01:00
parent 56dadc91dc
commit fc8ae6c2e3
24 changed files with 1970 additions and 20 deletions

View file

@ -9,7 +9,7 @@
* meant to vanish into it is exempt per theme (`TERMINAL_EXEMPT`). Every
* diagnostic severity (`--lt-diag-*`) and version-control status
* (`--lt-vcs-*`) colour reaches 4.5:1 on the editor background, the active
* line and the window background, and every completion kind icon colour
* line and the window background (and on the active tab, M4.4), and every completion kind icon colour
* reaches 3:1 on the popup and its selected row (H5). The
* themes come from
* `themes.json`, a snapshot that the Rust test `ui_snapshot_is_current`
@ -88,6 +88,13 @@ const STATUS_PAIRS: [string, string, number][] = [
...VCS.map((name) => `vcs-${name}`),
].flatMap((fg) => STATUS_BACKGROUNDS.map((bg): [string, string, number] => [fg, bg, TEXT]));
/** Status colours as tab names on the active tab (M4.4). */
const TAB_STATUS_PAIRS: [string, string, number][] = VCS.map((name): [string, string, number] => [
`vcs-${name}`,
"tab-active-bg",
TEXT,
]);
/** Every completion kind icon colour on the popup and its selected row. */
const KIND_PAIRS: [string, string, number][] = [...new Set(Object.values(KIND_COLOURS))].flatMap(
(fg): [string, string, number][] => [
@ -196,7 +203,7 @@ describe.each(themes)("theme $id", (theme) => {
expect(defined).toHaveLength(ANSI.length * 2);
});
it.each([...PAIRS, ...SYNTAX_PAIRS, ...STATUS_PAIRS, ...KIND_PAIRS, ...terminalPairs(theme.id)])("%s on %s reaches %d:1", (fg, bg, min) => {
it.each([...PAIRS, ...SYNTAX_PAIRS, ...STATUS_PAIRS, ...TAB_STATUS_PAIRS, ...KIND_PAIRS, ...terminalPairs(theme.id)])("%s on %s reaches %d:1", (fg, bg, min) => {
expect(contrast(token(fg), token(bg))).toBeGreaterThanOrEqual(min);
});
});