Problem
The pane footer's `structuralKey` (`src/pane.ts:751`) includes `gs?.lines_added ?? ""` and `gs?.lines_removed ?? ""` as raw integers. Every 1-line edit in a watched pane bumps the key and triggers a full footer-row repaint.
By contrast, RSS uses `formatResidentSize` (`src/tab-state.ts`) to bucket-quantize the display string ("156M" vs "157M"), so the key only changes when the bucket label actually flips. RSS sees ~1 repaint per second of meaningful change; lines-changed sees one per line.
In practice this is bounded by the 3-second git-status cache, so the worst case is one repaint per pane per 3 seconds during active editing. Not visible to users, but inconsistent with how RSS is handled and unnecessarily noisy in performance traces.
Fix
Bucket-quantize the badge string the same way RSS does:
```ts
function formatDiffCount(n: number): string {
if (n <= 0) return "";
if (n < 10) return String(n);
if (n < 100) return `${Math.floor(n / 10) * 10}+`;
if (n < 1000) return `${Math.floor(n / 100) * 100}+`;
return "1k+";
}
```
Then key on `formatDiffCount(gs?.lines_added ?? 0) + formatDiffCount(gs?.lines_removed ?? 0)` instead of the raw count, and render the same bucket string in the badge.
Side benefit: a +482 -317 badge isn't more useful than "+400+ -300+" — the precision past 2 sig figs is noise in an at-a-glance footer.
Files
- `src/pane.ts:751` (structuralKey)
- `src/pane.ts:780` (badge render)
- `src/tab-state.ts` (add the formatter alongside formatResidentSize)
Out of scope
- The +N -M color split. Keep green/red on the bucketed strings.
Problem
The pane footer's `structuralKey` (`src/pane.ts:751`) includes `gs?.lines_added ?? ""` and `gs?.lines_removed ?? ""` as raw integers. Every 1-line edit in a watched pane bumps the key and triggers a full footer-row repaint.
By contrast, RSS uses `formatResidentSize` (`src/tab-state.ts`) to bucket-quantize the display string ("156M" vs "157M"), so the key only changes when the bucket label actually flips. RSS sees ~1 repaint per second of meaningful change; lines-changed sees one per line.
In practice this is bounded by the 3-second git-status cache, so the worst case is one repaint per pane per 3 seconds during active editing. Not visible to users, but inconsistent with how RSS is handled and unnecessarily noisy in performance traces.
Fix
Bucket-quantize the badge string the same way RSS does:
```ts
function formatDiffCount(n: number): string {
if (n <= 0) return "";
if (n < 10) return String(n);
if (n < 100) return `${Math.floor(n / 10) * 10}+`;
if (n < 1000) return `${Math.floor(n / 100) * 100}+`;
return "1k+";
}
```
Then key on `formatDiffCount(gs?.lines_added ?? 0) + formatDiffCount(gs?.lines_removed ?? 0)` instead of the raw count, and render the same bucket string in the badge.
Side benefit: a +482 -317 badge isn't more useful than "+400+ -300+" — the precision past 2 sig figs is noise in an at-a-glance footer.
Files
Out of scope