Skip to content

feat: Scan Ledger — versioned scan history + trajectory UI#25

Open
New1Direction wants to merge 10 commits into
redesign/bright-inspectorfrom
feat/scan-ledger
Open

feat: Scan Ledger — versioned scan history + trajectory UI#25
New1Direction wants to merge 10 commits into
redesign/bright-inspectorfrom
feat/scan-ledger

Conversation

@New1Direction

Copy link
Copy Markdown
Owner

Summary

Adds Scan Ledger — a versioned history of every repo scan that surfaces each repo's trajectory, making the product's "evaluations compound" thesis real (previously saveRepo overwrote history on every re-scan).

  • New snapshots IndexedDB store — one record per repo, additive v3→v4 migration (existing data untouched). A trimmed snapshot (health, fit, stars, flag titles, version, ts) is appended on every saveRepo, ring-buffer capped at 30/repo. An existing repo's first re-scan seeds the prior scan so its history isn't lost.
  • New pure, fully-tested snapshots.jstoSnapshot / appendSnapshot / snapshotTrend / sparkline. FIT_ORDER is now exported from diff-analysis.js (instead of a 4th copy).
  • UI: a health sparkline on library cards + a "History" strip on the Verdict tab (health/fit/flags over time). Both hidden until a repo has ≥2 scans; static under prefers-reduced-motion.
  • Backup round-trip: snapshots join the envelope (BACKUP_VERSION → 2, each row clamped to 30 on import). Also fixes a pre-existing bug where decisions were silently omitted from backups.

Built subagent-driven from a committed spec + plan (docs/superpowers/specs|plans/2026-06-15-scan-ledger.*), each task TDD-gated. Two independent reviewers (spec-compliance + code-quality) ran over the diff; all flagged items fixed.

Test plan

  • npm test752 passing (new snapshots / store / backup cases)
  • npm run lint0 errors
  • Independent spec + code-quality review of the diff
  • Manual: load the unpacked extension → scan a repo twice → confirm the health sparkline shows on its library card and the History strip on its Verdict tab; a single-scan repo shows neither
  • Manual: export the library → clear → re-import → confirm snapshot history survives

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant