Skip to content

Deploy the library server: book highlights (registry API §11) - #45

Merged
sawradip merged 14 commits into
prodfrom
main
Nov 1, 2026
Merged

sawradip merged 14 commits into
prodfrom
main

Conversation

@sawradip

@sawradip sawradip commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Deploys main to prod. The Coolify app chalk-library (library.pathshalax.com) redeploys from prod.

What goes live:

npm: release.json is still 0.1.4, which is already on npm, so the release job publishes nothing and the v0.1.4 tag already exists.

After the deploy: GET https://library.pathshalax.com/v1/books/physics-9-10-bn/chapters answers {"items":[]} instead of 404. Then ChalkBook's highlights:move copies the highlights in (runagent-dev/chalkbook-internal#33).

🤖 Generated with Claude Code

sawradip and others added 14 commits November 1, 2026 02:12
The reader kept an asset's drawn URL for the life of an open book. When the
library moved an adopted key to another copy (a book pruned its file, or the
library switched location after its check), or a signed link expired, the
element stayed broken until the book was reopened.

- Book.renewUrl(id, failed): drops that id's cached answer (only if it is the
  one that failed; concurrent failures share one new resolution) and resolves
  again. Implemented for bookFrom (host resolver: a new signed link), streamed
  and library books (OpenedLibraryBook.forgetUrl drops the index shard and
  refetches it with cache: no-cache), withLibraries (Library.forget), and the
  author wrapper. A resolution that threw (not "not available") is retried too.
- useAssetSrc / mediaRenewer: an element's error event renews once after a
  short backoff and swaps the src; a renewed URL that fails before it loaded is
  left (no loop); a load resets it, so an expiring link renews again later.
  Wired to page/background/openable/modal images, thumbnails, posters, video,
  audio (resuming position), <model-viewer>, and host renderers (onError).
- assetBytes (labs, PDFs) renews once on a failed fetch.
- createResolver: forget(id), and locate drops a shard whose path failed.
- tools/reader-media-recover-e2e.ts: a disk library, media adopted at two
  paths, the drawn copy deleted while the book is open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er stays paused; onLoad for host players; no-cache shard in createResolver; forgetUrl optional

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nder its renewed URL; Resolver.forget optional in the type

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ys paused under its renewed URL

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…edia paused

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(reader): recover media whose URL fails while a book is open
…e records of a registry

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uestion links as editable records (registry-api §11)

Two tables (migration step 5) and the endpoints of §11: reading the lines of pages with their link counts, a line's or a
question's links, review lists, and the writes an editor and a matcher make (tag, change, move, take off, a question's
highlight, the matcher's place, the indexer's sync, an import with ids). A link taken off stays as a rejected row so a
matcher never puts it back; a question with a person's decision is never placed by a matcher. Writes to one question
are serialised. Db gains begin() for transactions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… link, lock lines while placing, one lock per id whatever its case, sync writes new words

Codex review round 1 (PR #44).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…from the body and from the URL

Codex review round 2 (PR #44).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed as own keys; bulk remove and move lock their questions and touch only those

Codex review round 3 (PR #44).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…moving a line onto itself still checks the line

Codex review round 4 (PR #44).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pter

Codex review round 5 (PR #44).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(library-server): book highlights as editable records (registry API §11)
@sawradip
sawradip merged commit cd465f6 into prod Nov 1, 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