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

@ -49,6 +49,8 @@ pub struct State {
pub lsp: crate::lsp::Lsp,
/// git and the project's repository (`git.*`, M4.1).
pub git: crate::cmd::git::GitState,
/// Cached index texts for `git.lineChanges` (M4.4).
pub git_lines: crate::cmd::git_lines::GitLines,
/// Number of notifications emitted, for their ids.
notifications: u64,
/// Events queued for the host, oldest first.
@ -58,6 +60,7 @@ pub struct State {
impl State {
/// Queues an event for the host.
pub fn emit(&mut self, event: Event) {
crate::cmd::git_lines::observe(&mut self.git_lines, &event);
self.events.push(event);
}