Skip to content

Release: a rolled pick stands until the owner rolls again, and the AI accuracy ledger says what its numbers are - #230

Merged
manager merged 1 commit into
mainfrom
dev
Sep 11, 2026
Merged

Release: a rolled pick stands until the owner rolls again, and the AI accuracy ledger says what its numbers are#230
manager merged 1 commit into
mainfrom
dev

Conversation

@manager

@manager manager commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

What ships

  • The magic book keeps its pick through every edit to the shelf. It was keyed to a digest of the shelf, so rating a book, writing a note, adding a tag or renaming the shelf emptied the slot and pushed the owner into another roll, the only path that spends the engine. A pick now gives up its place for two free reasons only: the owner owns that book now, or has banned it. Both the load path and the daily-cap path answer by that rule.
  • The AI accuracy ledger explains its own numbers: a legend names the hundred points once, every row carries its unit, the count it was read from is drawn under its meter, and the hover keeps only the next step.
  • The tag-filter comment states its invariant instead of an incident.

Evidence

Wolf, 2026-09-11: "push to staging, and then further to prod".

… accuracy ledger says what its numbers are (#229)

The magic book keeps its pick through every edit to the shelf, and gives up its place only when the owner owns that book or has banned it. The accuracy ledger names its hundred points once, carries the unit on every row and draws the counts it was read from. The tag-filter comment states its invariant.
@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown

Claude finished @manager's task in 2m 33s —— View job


Review complete

  • Gather context (PR body, changed files)
  • Read diff (git diff origin/main HEAD)
  • Review magic-book pick/digest logic
  • Review AiAccuracyStatus component + SCSS
  • Review DashboardContext, aiAccuracy.ts, LIBRARY.md
  • Check for stale/dangling references after the fingerprint removal
  • Post final summary

Summary

This is a clean, well-scoped release PR: two behavior changes (pick persistence, accuracy ledger UI) plus a doc-only comment fix, all consistent across code and LIBRARY.md.

src/pages/api/library/magic-book.ts / magic/digest.ts / magic/store.ts — pick persistence rework

  • The fingerprint mechanism is fully removed with no dangling references — confirmed no remaining fingerprint usage anywhere in src/.
  • The new gone() predicate (owned or banned) correctly replaces the "shelf changed → idle" rule everywhere it needs to: the load path (fromStore), and the daily-cap fallback path. Both were updated, so behavior is consistent between the two response paths.
  • digest.ownedTitles (built from every book on every shelf) and stored.banned are both normalised with the same normaliseTitle before comparison, so title matching is consistent with how bans are recorded elsewhere.
  • Minor, non-blocking: in the daily-cap branch (magic-book.ts ~line 168), a pick that's stale because it was just banned/owned still gets the note "The engine has done its day of work. Roll again tomorrow." — slightly misleading in that specific overlap case, but it's a pre-existing pattern and a very small edge case, not worth blocking on.

AiAccuracyStatus.tsx / .module.scss — ledger UI

  • Detail text moved from tooltip-only to always-visible (.rowDetail), which is a genuine a11y improvement — the count behind each score is no longer hover-only.
  • New font-size: 13px (.legend) and 12px (.rowDetail, .rowMax) are both in the allowed font-passport sizes; both reuse the existing --gray-darker token already used elsewhere in this file, so no new contrast risk is introduced.
  • Math.round(row.earned) in the row header intentionally displays whole points while row.earned (from round1) stays fractional for the meter fill (row.earned / row.max) — fine, since the fill isn't user-facing text, but worth knowing that the displayed sum of per-row rounded points can differ by a point or two from report.total if anyone eyeballs it as a checksum. Cosmetic only.
  • Component usage (LibraryToolbar.tsx) and props are unaffected.

aiAccuracy.ts / DashboardContext.tsx / LIBRARY.md

  • aiAccuracy.ts changes are copy-only (detail-string rewording to match the new always-visible rows) — no logic touched.
  • DashboardContext.tsx diff is comment-only; the tag-reset effect logic is byte-identical to before, just re-explained as an invariant instead of an incident report, matching the PR description.
  • LIBRARY.md §7 accurately reflects the new persistence rule (stands until rolled away; owned/banned are the only free evictions).

No violations of AGENTS.md conventions found (import order, aliases, SCSS modules, barrel exports, any usage, SSR safety) in the changed files. No UX Core bias data touched. No secrets, dangerouslySetInnerHTML, or unsanitized input in this diff.

Not run: yarn lint / yarn type-check / yarn test — shell tool calls (npx, chained commands) were denied approval in this session, so these weren't executed locally. The PR body states type-check is green and AI review passed on a second pass, which I have no reason to doubt given the diff is small and self-contained.

@manager
manager merged commit 1630eb6 into main Sep 11, 2026
4 checks passed
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