Beagle SCM
WORK-005: work view — wt rows fade with age, black to grey by the day
Context
Follow-up to the WORK-004 button row (gritzko, chat 2026-07-19). Work-view wt rows currently render their text in the default fg regardless of age; nothing signals which trees are stale. Evidence, be tip (///be):
- views/work/work.js:396 renders the row's ts via
render.dateCol(d.ts||0n) (repo rows :425 alike); d.ts is the wt's tip commit ts (ron60).
- Age idiom exists: view/render.js:41
relAge(ts, now) compares ron60 ts vs ron60 now via ronToMs.
- "now" is
be.now — the run's start ts, refreshed per verb invocation (core/loop.js:461, POST-029 ruling); never scavenge time elsewhere.
- The tok tag palette (view/bro.js THEME) is FULL — WORK-004 took the last free tag 'A'; nine grey shades can NOT be nine tags.
- UNLANDED overlap: work/WORK-004 (
///be#896ed3d8) rewrites the same row-render region (ahbehSpans/wtSpans) and test/work/view/check.js; work/WORK-003 also touches work.js.
Goals
RULING (gritzko, chat 2026-07-19): each wt line's fg reflects the ENTRY's freshness.
- Age < 24h: black
#000; then ONE grey shade per each further 24h: #111, #222, ...; top off at #888 for age over a week.
- Shade =
#111 * min(floor(age/24h), 8) — 9 levels, days 0..7 then the 8+ cap.
- Age =
be.now minus the row's ts (d.ts, the wt tip commit ts).
- The fade paints the row's TEXT (key, leader, time, hashlet, subject); buttons/O-invites keep their own colors.
Constraints
- Tag space is full — the shade needs a per-row fg mechanism (e.g. direct SGR in the theme idiom), not new tok tags; keep the plain (btns=false) path sane.
- Overlaps UNLANDED work/WORK-004 and work/WORK-003 in views/work/work.js + test/work/view/; build on be tip, reference those wts read-only, expect a weave.
- Amending test/work/view/check.js to pin the fade is AUTHORIZED; no other test edits.
- Rulings in force: be.now is the truth for "now" (no log read-back); pty verification through the real UI path; errors in plain words.
WIP
Design decisions
- Mechanism = the WHY-001 idiom, fg twin: the work hunk already carries
O
tokens (button spells) so the pager paints it via view/bro.js paintWhyRow.
Each pager wt row now leads with a hidden bare #rrggbb O marker; a new
rowFgAt reads it and tints ONLY THEME-default cells (fm/fg==0), so buttons/
ahbeh/invites keep their colours. No new tok tag (space full).
- fadeHex(d.ts) in work.js: level = min(floor((be.now-ts)/24h), 8), channel =
level*0x11; emitted only when btns (pager), so the plain path stays sane.
- render.js exports ronToMs (the age idiom) for the day delta.
- Fixtures pin ages by seed COMMIT ts (SOURCE_DATE_EPOCH), never mock now;
the plain date-normalizer gained the this-week
Dow15 form (ext two ~3.5d).
TODOs
Blockers and bummers
- Pre-existing reds at tip UNRELATED to this change (verified with lib reverted):
test/bro/color, test/bro/view (golden mismatch, fixture readdir order).
- Overlaps UNLANDED work/WORK-004 (same wtSpans/check.js region) — a weave is
expected; built on be tip f168d856 without it.
Outcome
- Local commit
2e02815a (///be) + 2d4617ff (//WORK-005/test sub); NOT
landed/merged. Files: view/bro.js, view/render.js, views/work/work.js,
test/work/view/{check.js, run.sh}.