Repository navigation
Conversation
…ghts A book has no URL, so it becomes a save whose body is its highlighted passages in book order, each highlighted there. It lands on the Shelf (archived, in an "Imported from Kindle" collection) and its highlights reach review, search and the Highlights page like any other. The same book is matched by title and author across Kindle and Readwise and across imports. A re-import adds only passages the body doesn't hold yet, so the reader's removed highlights stay removed. Versions of one highlight Kindle keeps after it was extended are merged to the longest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014mh1a2cRqFB3pi6toag4uk
- Match a book by its whole title; a title without its subtitle matches only when it names one book, so two volumes of a series stay apart. - Remember the import key in the body, so a renamed book is still found. - Merge versions of a highlight only when they start in the same place, join their notes, and give book highlights prefix/suffix context so a short one anchors to its own paragraph. No intro text in the body. - Cap a book after setting aside passages it already holds (1,000 passages), and say how many were left out. - Keep Readwise author lists as written; whole-number locations only. - Read matched books' bodies in one query. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014mh1a2cRqFB3pi6toag4uk
disnet
marked this pull request as ready for review
October 31, 2026 07:32
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Tim · project thread
Settings → Import saves now accepts Kindle's
My Clippings.txt. It also turns the book rows of a Readwise highlights CSV into books, instead of dropping them as unmatched. This is the atplan goal "Import Kindle highlights".How a book with no URL works
url = ''andcontent_type = 'book'.<p class="book-passage">each, in book order (Kindle location or page), with nothing else in the text.TextQuoteSelectorwhose prefix and suffix are the neighbouring passages. A short highlight whose words also appear inside a longer passage still anchors to its own paragraph (checked in e2e).BookIndex) for the preview and its "Already saved" marks.highlightslabel with the existingMERGE_HIGHLIGHTS_CONFLICT(now exported).My Clippings.txtkeeps both versions. A passage inside another one that starts within 20 locations is treated as an old version: the longest stays, with the notes of all versions joined. A short highlight elsewhere in the book is kept as its own. Each note attaches to the highlight whose range ends at, or holds, the note's location. A note with no highlight is left out, with a warning.skippedHighlights) and shown when the import finishes.isReferenceKind,shelfKind→ Book), in an "Imported from Kindle" or "Imported from Readwise" collection. They are never copied into a Semble/Margin backing collection, because they have no URL, and the dialog says so.bookitems, and Edit details labels the field "Authors".Screenshots
These are in the project files under
kindle-import/: the import preview, the Shelf, the reader with the passages highlighted and a note in the margin, and the Highlights page.Docs
guide/importing-your-library.mdhas a new section, "Books from Kindle or Readwise". It covers:The front page, Getting started and the Settings row now mention Kindle.
Review
I ran the code-review skill at high effort, plus an independent adversarial reviewer that reproduced each finding with a probe test.
Fixed:
saved-import.spec.ts, frontend 13 inbooks.test.ts, and an e2e anchoring check.Left alone:
finishImportcall is duplicated on the books-only path (code-review nit).Tests
.dev.varswithE2E_TEST_MODEmakes the saved-search, search-index and channel-order specs return 403 on main too; they pass without it.readLaterImport/34 pass.npm run checkhas 0 errors.import-saves.spec.ts, 5 tests, passes locally, including the new Kindle case.npm run checkpasses.🤖 Generated with Claude Code
https://claude.ai/code/session_014mh1a2cRqFB3pi6toag4uk