fix(claude): statusline distinguishes an empty graph from a missing one (#185) - #194
Conversation
…ne (trailhq#185) Co-authored-by: Cursor <cursoragent@cursor.com>
🌱 graft blast radiusNothing outside this diff depends on it. 1 area changed; no indexed dependents at depth 2. Test signal per changed area — 1 ✓Reached = a node under a test path has a resolved edge into the changed symbol. It undercounts anything called indirectly — through a CLI, a spawned process or a dynamic import — so read a low ratio as “look here”, never as a coverage gate.
Open the interactive graph → — click an area to see its dependent symbols at file:line. |
|
Verified locally on top of current Before/after (statusline line, ANSI-stripped):
Fix is |
Summary
graft buildthat produces an empty wiring.json (docs-only repos, skipped languages) renders as◤ graft · 0 nodes / 0 edges · ✓ synced.wiring.jsonstill render◤ graft · not built · run graft build.Cause
As analyzed in #185:
renderStatusline()treatednodeCount === 0as never-built, andresolveStats()could not tell a legitimate empty graph from a missing one — both look like zero.graft buildalready succeeds (✓ wiring: 0 nodes ...); only the bar was lying.Built is now artifact presence (
wiring.jsonviareadWiring()).renderStatuslineonly shows "not built" when stats arenull. A 0-node cache without wiring is still missing, not empty-and-built.Test plan
node --import tsx --test test/claude-format.test.ts test/claude-statusline.test.ts test/claude-stats.test.ts(31/31)npm run build && npm test(882/882)README.mdonly,git init+ commit,graft build):Closes #185
Made with Cursor