Skip to content

feat(highlights): only-notes filter, file export, shortcuts, spotlight shuffle#123

Merged
bndct-devops merged 3 commits into
mainfrom
feat/highlights-deferred
Jul 5, 2026
Merged

feat(highlights): only-notes filter, file export, shortcuts, spotlight shuffle#123
bndct-devops merged 3 commits into
mainfrom
feat/highlights-deferred

Conversation

@bndct-devops

Copy link
Copy Markdown
Owner

The four polish items deferred from the original commonplace-book release (PR #76), plus a real bug the verification pass surfaced.

  • Only-notes filter: toggle next to "On this day" showing just the highlights carrying a note (only_notes on GET /api/annotations; composes with search and on-this-day).
  • File export: download all matching highlights as tome-highlights-YYYY-MM-DD.md, alongside the existing clipboard copy.
  • Keyboard shortcuts on /highlights: / search, Esc clear, c collapse all, n only-notes, e export — listed in the ? help modal.
  • Spotlight shuffle: re-roll button on the Home highlight card; GET /annotations/spotlight?exclude=<id> returns a different highlight whenever more than one exists (a sole highlight comes back rather than emptying the card).

Fixed along the way: "copy all as Markdown" has been broken since the page shipped — it requested limit=2000 against the endpoint's le=1000 cap, got a 422, and failed with no feedback (no catch, no toast). Cap raised to 10000, both exports stay under it, failures now toast.

Verification: suite green (3 new endpoint tests); Playwright drive on the live dev app — filter 28→18→28 highlights, / focuses search, the export downloads a real .md file (the step that caught the 422), shuffle swaps the home quote.

…ts, shuffle

The four polish items deferred from the original commonplace-book release
(PR #76), plus a real bug the verification pass surfaced.

- Only-notes filter: a toggle next to "On this day" showing just the
  highlights that carry a note (server: only_notes param on GET
  /api/annotations; composes with q and on_this_day).
- File export: download all matching highlights as a Markdown file
  (tome-highlights-YYYY-MM-DD.md), alongside the existing clipboard copy.
- Keyboard shortcuts on /highlights: "/" search, Esc clear, "c" collapse
  all, "n" only-notes, "e" export — registered in the "?" help modal.
- Spotlight shuffle: a re-roll button on the Home tab's highlight card.
  GET /annotations/spotlight?exclude=<id> returns a different highlight
  whenever more than one candidate exists (on-this-day preference kept;
  a sole highlight comes back rather than emptying the card).

Fixed along the way: "copy all as Markdown" has been broken since the page
shipped — it requested limit=2000 against the endpoint's le=1000 cap, got
a 422, and failed with no feedback (no catch, no toast). Cap raised to
10000, both exports stay under it, and failures now toast.

Verification: 849 tests green (3 new: only-notes filtering + both exclude
edge cases). Playwright drive on the live dev app: filter 28→18→28
highlights, "/" focuses search, the export downloads a real .md file
(the step that caught the 422), and shuffle swaps the home quote.
Frontend build clean. Pre-existing hydration warning in HomeGoalRings
(<div> in <p>) noted but out of scope here.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bndct-devops

Copy link
Copy Markdown
Owner Author

Closed pending hands-on testing — opened prematurely; will reopen once the branch is verified on dev.

@bndct-devops bndct-devops reopened this Jul 5, 2026
@bndct-devops bndct-devops merged commit 9012cf5 into main Jul 5, 2026
2 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