feat(lanes): name the files behind a lane's uncommitted counts

GET /api/lanes/:id/git now returns `files`, the raw `git status --porcelain`
lines the dirty/untracked counts were already parsed from, capped at 20 so a
lane mid-`npm install` cannot ship thousands of paths through a polled
endpoint. The lane card hovers them as the tooltip on its
"N modified · N untracked" text, appending "… +N" when the cap bit.

No new subprocess and no new endpoint — statusCounts was counting those lines
and throwing them away.
This commit is contained in:
2026-09-17 13:19:07 +07:00
parent 2fe1dcd46f
commit af2ad63a18
8 changed files with 46 additions and 8 deletions
@@ -207,6 +207,7 @@ describe("LaneCard git block", () => {
subject: "free-text rule mode in the form",
dirty: 2,
untracked: 1,
files: [" M server/lib/alerts.js", " M client/src/lib/api.ts", "?? scratch.txt"],
};
it("renders the live branch, head, subject and uncommitted counts", async () => {
@@ -218,6 +219,10 @@ describe("LaneCard git block", () => {
expect(block.textContent).toContain("9b3e74a");
expect(block.textContent).toContain("free-text rule mode in the form");
expect(block.textContent).toContain("2");
// Hovering the counts names the files behind them.
expect(screen.getByText(/modified/).title).toBe(
" M server/lib/alerts.js\n M client/src/lib/api.ts\n?? scratch.txt"
);
// The live branch replaces the lane's recorded one rather than doubling it.
expect(screen.queryByText(/stale\/recorded/)).toBeNull();
});