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

@ -8,7 +8,8 @@
* `theme.ts`; a failed theme report raises an error toast) and the global
* keymap with the UI commands (see `commands/store.ts`), and loads the settings so the
* editor font size applies from the start (see `stores/settings.ts`).
* Starts autosave (see `stores/autosave.ts`).
* Starts autosave (see `stores/autosave.ts`) and the Git status colours
* (see `stores/vcsStatus.ts`).
*/
import { onMounted, onUnmounted } from "vue";
import { useCommandsStore } from "./commands/store";
@ -24,6 +25,7 @@ import { useAppStore } from "./stores/app";
import { useAutosaveStore } from "./stores/autosave";
import { useNotificationsStore } from "./stores/notifications";
import { useSettingsStore } from "./stores/settings";
import { useVcsStatusStore } from "./stores/vcsStatus";
import { startTheme } from "./theme";
const app = useAppStore();
@ -31,6 +33,7 @@ const notifications = useNotificationsStore();
const commands = useCommandsStore();
const settings = useSettingsStore();
const autosave = useAutosaveStore();
const vcsStatus = useVcsStatusStore();
/** Stops following the theme; set while mounted. */
let stopTheme: (() => void) | null = null;
@ -41,6 +44,7 @@ onMounted(() => {
void commands.start();
void settings.start();
autosave.start();
vcsStatus.start();
void app.loadAbout();
});
@ -49,6 +53,7 @@ onUnmounted(() => {
stopTheme = null;
commands.stop();
autosave.stop();
vcsStatus.stop();
settings.stop();
notifications.stop();
});