Git-status indicators in the Code-tab "All files" view
Browsing the whole repo should still tell you what's changed. Gives the Code-tab "All files" view the same git-status colors Local/Branch already show, by overlaying a local-status layer (primary) on a branch-status layer (fallback). Shipped in #1185.
Shipped in #1185 .
Before this, the All files view was the only Code-tab mode with no git signal — you switched to Local/Branch to see what changed, losing whole-repo context. Now it looks like:
Behavior
Each row reflects the union of two questions, the more immediate one winning:
| Row color | Source |
|---|---|
| ”editing now” (incl. new files) | working tree |
| ”this branch changed it” (committed, now clean) | branch base — tagged via branch |
| both | working tree wins prefer Local |
| unchanged | none |
Branch is best-effort: a repo with no origin/<default> has no base, so that
layer is simply absent and the view falls back to the always-available
working-tree layer (no error toast in this passive view).
Architecture
One derivation (treeGitStatus) already is the sole source of row decoration;
the change only widens what it reads in browse mode. No new contract, no server
or schema change — both git-status streams already exist; All files just
subscribes to both and overlays them client-side.
Local / Branch ─────────▶ status.files ───┐
All files ──┬─ local ───▶ overlay(local, ├─▶ treeGitStatus ─▶ <FileTree> ─▶ Pierre
└─ branch ──▶ branch) ← new ─┘ data-item-git-status
local wins on conflict
Folder tint. Pierre marks every ancestor of a changed file with
data-item-contains-git-change but only paints a half-opacity dot, and exposes
no --trees-* variable to tint the folder itself. So solid-pierre’s
<FileTree> gains a generic shadowCss escape hatch — a constructable
stylesheet appended to Pierre’s shadow root — and kolu owns the one rule
(pierreTreesShadowCss) that colors the folder name
([data-item-section='content']) in the modified color. The boundary stays
clean: the wrapper offers the capability (domain-agnostic), the host supplies
the rule (which knows Pierre’s row anatomy).
Tests
- Unit — the overlay rule: local wins on a shared path; branch-only keeps its color; untracked preserved; empty ⇒ none.
- E2E — in All files, a modified file’s row carries
data-item-git-statusand an unchanged row carries none; and an ancestor folder of a change is markeddata-item-contains-git-changeand computes a different name color than a clean sibling — proving the injected tint lands (packages/tests/step_definitions/code_tab_steps.ts:1).