Shelf progress and book metadata #10

Merged
arne merged 12 commits from shelf-progress-and-metadata into main 2026-04-13 10:43:47 +02:00
Owner

Summary

  • Reading progress shown on shelf entries and book page as a hair-thin leaf-green fore-edge rule
  • New --leaf semantic color token reserved for reading state
  • New book metadata fields: read_state (unread/reading/read, manual with Kobo auto-promotion at ≥95%), first_published_year, goodreads_url
  • Shelf now sorts reading-first (by progress desc), then unread, then read

Design spec: docs/superpowers/specs/2026-04-13-shelf-progress-and-metadata-design.md
Implementation plan: docs/superpowers/plans/2026-04-13-shelf-progress-and-metadata.md

Test plan

  • Verify shelf shows progress rule with correct fill for books with Kobo progress
  • Verify shelf sort order: reading (by progress desc) → unread → read
  • Edit form: set read state, first published year, goodreads URL on a book; verify persistence and display
  • Book page: verify goodreads arrow link opens externally

🤖 Generated with Claude Code

## Summary - Reading progress shown on shelf entries and book page as a hair-thin leaf-green fore-edge rule - New `--leaf` semantic color token reserved for reading state - New book metadata fields: `read_state` (unread/reading/read, manual with Kobo auto-promotion at ≥95%), `first_published_year`, `goodreads_url` - Shelf now sorts reading-first (by progress desc), then unread, then read Design spec: `docs/superpowers/specs/2026-04-13-shelf-progress-and-metadata-design.md` Implementation plan: `docs/superpowers/plans/2026-04-13-shelf-progress-and-metadata.md` ## Test plan - [ ] Verify shelf shows progress rule with correct fill for books with Kobo progress - [ ] Verify shelf sort order: reading (by progress desc) → unread → read - [ ] Edit form: set read state, first published year, goodreads URL on a book; verify persistence and display - [ ] Book page: verify goodreads arrow link opens externally 🤖 Generated with [Claude Code](https://claude.com/claude-code)
arne added 11 commits 2026-04-13 10:34:29 +02:00
Adds a design spec for reading progress on the shelf (fore-edge rule in
new leaf green), and three new book metadata fields: read_state,
first_published_year, goodreads_url.

Includes the shelf-mock.html design preview used during brainstorming.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Ten-task TDD plan that implements the design spec from
docs/superpowers/specs/2026-04-13-shelf-progress-and-metadata-design.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Also fix UpsertReadingState to use input values directly when inserting a
new row (isNew guard), so callers need not supply LastModified timestamps.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The previous effective-state logic only promoted to "read" at ≥95%
progress; books with partial Kobo progress stayed "unread" because
that's the stored default, so the shelf rule stayed empty for every
actively-read book. Now a book with stored state "unread" and any
progress > 0 shows as "reading" in the UI.

Also refactored the shelf query to a second CTE so the effective_state
CASE is written once instead of four times.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
arne merged commit 2ed2ca2577 into main 2026-04-13 10:43:47 +02:00
arne referenced this pull request from a commit 2026-04-13 10:43:48 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
arne/books!10
No description provided.