Commit Graph
32 Commits
Author SHA1 Message Date
Lucas Winther 207c92bb4d merge: task 8 sync engine 2026-10-30 20:35:37 +01:00
Lucas WintherandClaude Opus 5.5 1975e971f9 feat(core): sync engine and changes inbox
runSync snapshots and diffs source records, applies new records and
never-edited fields, files pending changed/conflict/removed/merged
events, de-duplicates plays across sources and ingests listens.
listChanges/resolveChange drive the Changes inbox.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 20:26:03 +01:00
Lucas WintherandClaude Opus 5.5 37a0b0ba94 feat(core): source record snapshots with stable hash and gzipped versions
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 20:26:03 +01:00
Lucas WintherandClaude Sonnet 5.5 66b155876f fix(core): atomic restore with aliases, snapshot export, hardened backups
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-30 20:24:10 +01:00
Lucas WintherandClaude Sonnet 5.5 a047020d54 feat(core): export bundle, restore, backups
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-30 20:17:25 +01:00
Lucas WintherandClaude Opus 5.5 c6865b2522 fix(core): drill-down lists descendants under untracked intermediates
listEntries({ parentId: X }) now applies the top-level rule relative to X: this user's
live entries on descendants of X (up to three levels) with no live-entry work strictly
between them and X, so it agrees with childSummary. Restoring an engagement's re-parenting
onto a soft-deleted entry throws ValidationError("entryId", "target entry is deleted").

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 20:05:12 +01:00
Lucas WintherandClaude Opus 5.5 7154ca0a61 fix(core): race-safe entry upsert and lossless per-user moves
- upsertEntry inserts with ON CONFLICT DO NOTHING and patches through the update path,
  so a concurrent creator never aborts the caller's transaction on Postgres.
- Undoing a move deletes the forward alias and writes no reverse alias.
- Merging into an existing entry keeps 'user' field_sources on combined fields, carries
  the moved entry's field_sources as-is when reviving a deleted target, concatenates
  differing review/private notes, records a dropped rating in history, and writes history
  for re-parented engagements (restorable).
- Moves re-point this user's copies (with history) and list items to the target work.
- rejectSuggestion requires a pending suggestion; engagements of a deleted entry are not
  editable; restoring an entry does not re-check custom fields against current definitions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 19:59:54 +01:00
Lucas WintherandClaude Opus 5.5 512e6e9464 fix(core): roll up descendants and surface orphaned entries; SQL-derived title cursor
- childSummary counts the user's live entries up to three levels below the work.
- The default library view (parentId null) lists entries with no ancestor (up to three
  levels) carrying a live entry of this user, so episodes of an untracked show still show.
- The title keyset cursor carries the SQL lower(w.title) value, so SQLite no longer skips
  non-ASCII titles.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 19:59:09 +01:00
Lucas Winther 4c65939d61 merge: feat/phase1 into task/6 2026-10-30 19:54:33 +01:00
Lucas WintherandClaude Opus 5.5 a13d9cd476 merge: task 5 works and matching
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 19:35:57 +01:00
Lucas WintherandClaude Opus 5.5 c7471f7761 feat(core): engagements, lists and copies with history restore
Engagements store partial dates as value + precision and track field_sources;
lists (list/grouping/thread, grouping-only rating/review) keep dense item
order and snapshot items in history; copies store price in cents. All three
restore through restoreVersion.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 19:35:15 +01:00
Lucas WintherandClaude Opus 5.5 13b81b1cd5 feat(core): entries, user history and match suggestion accept/reject
Entries carry per-field field_sources, write user_history diffs, resolve
aliased/merged works, and support quick add, per-user moves (with alias and
draft tombstone) and keyset-paginated library listing with child rollups.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 19:34:47 +01:00
Lucas WintherandClaude Opus 5.5 50c115b4c7 fix(core): follow merged tombstones in the position lookup
A merged child still holds its (parent_id, position) slot under the unique
index, so skipping tombstones made every retry collide. Follow the tombstone
to the surviving work instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 19:32:27 +01:00
Lucas WintherandClaude Opus 5.5 437ca143e5 fix(core): race-safe matching, visibility-checked ID matches, child-preserving merges
- migration 0002: unique index on works (parent_id, position)
- matchWork retries the whole transaction on a unique violation (3 attempts)
- addMissingExternalIds uses ON CONFLICT DO NOTHING
- ID matches only return shared works or the user's own; private works cannot carry external ids
- adminMergeWorks requires shared works and repoints non-colliding children
- draft is computed for the aliased work id

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 19:29:48 +01:00
Lucas WintherandClaude Opus 5.5 60876c2930 merge: task 7 attachments and crypto
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 19:27:30 +01:00
Lucas WintherandClaude Sonnet 5.5 4acb368c87 fix(core): serialise attachment file mutations, atomic writes, reject svg
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-30 19:26:16 +01:00
Lucas WintherandClaude Opus 5.5 c7effb5f0a merge: task 4 auth
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 15:59:31 +01:00
Lucas WintherandClaude Opus 5.5 56b86e27da feat(core): custom field definitions and value validation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 15:56:51 +01:00
Lucas WintherandClaude Sonnet 5.5 fe3c9e4881 fix(core): serialise first-user registration, equalise login timing
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-30 15:56:36 +01:00
Lucas WintherandClaude Sonnet 5.5 a46fb60eee feat(core): works catalogue and matching
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-30 15:56:05 +01:00
Lucas WintherandClaude Sonnet 5.5 e1faa7433b feat(core): users, sessions, invites, app tokens
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-30 15:54:47 +01:00
Lucas WintherandClaude Opus 5.5 92f7c9a461 merge: task 13
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 15:54:39 +01:00
Lucas WintherandClaude Opus 5.5 8f58ba4cdc feat(core): attachments and credential encryption
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 15:54:33 +01:00
Lucas WintherandClaude Opus 5.5 d392a65aa7 merge: task 2 schema
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 15:52:10 +01:00
Lucas WintherandClaude Sonnet 5.5 ff595c1c5f fix(db): add down migration, template-DB test harness, EntryStatus type
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-30 15:49:06 +01:00
Lucas WintherandClaude Sonnet 5.5 a540c7d34d feat(plugins): csv and json import
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-30 15:48:59 +01:00
Lucas WintherandClaude Sonnet 5.5 da04adb286 feat(db): initial schema
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-30 15:39:14 +01:00
Lucas WintherandClaude Opus 5.5 06a59e1b5c fix(sdk): block real network in test context, strip query from HttpError message
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 15:38:45 +01:00
Lucas WintherandClaude Opus 5.5 a14c4e7747 feat(sdk): plugin contract, http client, fixture harness
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 15:36:55 +01:00
Lucas WintherandClaude Opus 5.5 27ec24eb4b feat(core): shared domain error classes
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 15:30:49 +01:00
Lucas WintherandClaude Opus 5.5 8248a2ac27 feat(db): Bun.SQL Kysely dialect for sqlite and postgres
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 15:30:49 +01:00
Lucas WintherandClaude Opus 5.5 6c5a9fbad9 chore: workspace package stubs with approved dependencies
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 15:30:49 +01:00