dorfteich/packages/shared/src
Claude Fable 5 8ae010218e
Some checks failed
CD / Build and push images (push) Successful in 4m5s
CD / Deploy to Test (push) Successful in 9s
CI / Lint, typecheck, test (push) Failing after 4m21s
CI / Auth e2e pack (push) Has been skipped
CI / Import/export fidelity gate (push) Has been skipped
CI / Build container images (push) Has been skipped
CD / Smoke tests against Test (push) Successful in 1m22s
CD / Promote to Int (push) Successful in 11s
Obsidian vault import: endpoint, job orchestration, rollback (#117)
POST /ponds/:pondId/import/vault (pond-admin-gated; a vault import
creates a subtree, uploads files, and creates labels — administration,
not everyday editing) takes the ZIP plus a JSON options field
{parentPageId?, labelIds?, frontmatterMode}. The archive is parsed at
enqueue for fast 400s; the job (new kind import_vault, riding the
existing isImportKind worker routing) re-parses and runs the #116
transform, then: containers top-down → notes (asset placeholders →
uploaded pond files; non-images become page attachments) → tags to
labels (nested tags build a label hierarchy via LabelsService, so
locking and cache invalidation apply) plus the dialog labels.

All-or-nothing: any failure hard-deletes the created pages (children
first) and removes the stored files (quota restored), then surfaces as
import_vault_invalid_zip / import_vault_too_large / quota_exceeded /
conversion_failed — and makes the worker's retry policy safe.

Supporting changes:
- conversion_jobs gains a nullable options jsonb column; enqueue takes
  kind-specific options and a maxInputBytes override (the 25 MiB
  default protects the pandoc sidecar, which a vault never touches —
  vaults use the 64 MiB upload limit).
- insertPage accepts a pre-reserved slug (the batch reserves all slugs
  up front against pond ∪ batch).
- NEW: pages born with content seed their outgoing page_links rows
  (deriveContent now returns wikilinkSlugs) — imported pages would
  otherwise stay invisible to backlinks and the graph until their
  first collab save. Collab still rewrites the rows on every save, and
  the existing phantom resolution heals batch creation order.

import-vault.e2e.db.test.ts (4 tests, real worker drained): gating +
input rejection, the full fixture import (tree under a mount page,
collision suffixes, link rows incl. phantom, nested tag labels, extra
label everywhere, frontmatter stripped, image embedded + PDF attached),
complete quota rollback, and a clean re-import with fresh suffixes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 17:13:11 +02:00
..
editor-schema Give wikilinks a relative href in static/public HTML 2026-07-12 23:50:16 +02:00
permissions Add effective-permissions inspector (#57) 2026-07-10 00:00:27 +02:00
admin-users.ts Add Site-Admin user management (#59) 2026-07-10 00:31:41 +02:00
api-error.ts Add NestJS API skeleton with config, logging, and /healthz 2026-07-04 19:10:07 +02:00
api-tokens.ts Public REST API v1: personal access tokens, instance switch + per-pond opt-in (#104) 2026-07-12 11:17:03 +02:00
auth.test.ts Add user, identity, session, and auth-support data model 2026-07-05 00:42:22 +02:00
auth.ts Batch notifications into localized e-mail digests with unsubscribe (#95) 2026-07-11 23:37:26 +02:00
backup-set.ts Nextcloud backup target: admin-configured, manual + scheduled uploads, in-app restore (#103) 2026-07-12 10:39:18 +02:00
backup-status.ts Backup mirror to BASEL: rsync of the sets after every successful run (#84) 2026-07-12 12:20:32 +02:00
collab-token.test.ts Add collaboration token issuance and connection authentication (#34) 2026-07-08 15:52:19 +02:00
collab-token.ts Notify watchers about page changes and comments, with an in-app center (#94) 2026-07-11 23:20:25 +02:00
comments.ts Add threaded page comments: data model, API, and comment policy (#91) 2026-07-11 21:42:29 +02:00
conversion.ts Obsidian vault import: endpoint, job orchestration, rollback (#117) 2026-07-14 17:13:11 +02:00
env.test.ts Add Prisma with PostgreSQL, automatic migrations, and /readyz 2026-07-04 19:16:44 +02:00
env.ts Backup mirror to BASEL: rsync of the sets after every successful run (#84) 2026-07-12 12:20:32 +02:00
files.ts Add non-image attachments with allowlist, SVG policy, and file managers (#61) 2026-07-10 02:52:40 +02:00
fonts.test.ts Add per-pond fonts: catalog, build, application, and admin UI (#66) 2026-07-10 11:16:29 +02:00
fonts.ts Add per-pond fonts: catalog, build, application, and admin UI (#66) 2026-07-10 11:16:29 +02:00
health.test.ts Scaffold pnpm monorepo with lint, format, and test tooling 2026-07-04 19:06:27 +02:00
health.ts Scaffold pnpm monorepo with lint, format, and test tooling 2026-07-04 19:06:27 +02:00
home.ts Editable landing page for the Site Admin 2026-07-12 23:50:16 +02:00
i18n-tools.test.ts Add i18n with i18next, German and English, and a key-parity check 2026-07-04 19:23:45 +02:00
i18n-tools.ts Add i18n with i18next, German and English, and a key-parity check 2026-07-04 19:23:45 +02:00
index.ts Page hierarchy: parentId, create-under-parent, reparent (#106) 2026-07-14 09:57:47 +02:00
labels.test.ts Add label UI: tree management, page assignment, and sidebar filter (#44) 2026-07-09 11:41:42 +02:00
labels.ts Page hierarchy: parentId, create-under-parent, reparent (#106) 2026-07-14 09:57:47 +02:00
legal.ts Add instance legal pages with public rendering and footer links (#82) 2026-07-11 16:40:04 +02:00
links.ts Pond-wide wikilink graph endpoint (#111) 2026-07-14 10:21:25 +02:00
members.ts Add pond member management UI (#54) 2026-07-09 20:22:52 +02:00
notifications.ts Batch notifications into localized e-mail digests with unsubscribe (#95) 2026-07-11 23:37:26 +02:00
pages.ts Delete modes and subtree trash semantics for the page tree (#107) 2026-07-14 10:05:10 +02:00
plugins.ts Add pageTool plugins with toc and page-index references (#77) 2026-07-11 13:27:30 +02:00
ponds.ts Sidebar folder view, label view, and the view toggle (#108) 2026-07-14 10:17:36 +02:00
public-api.ts Page-tree parity for the public REST API and MCP (#110) 2026-07-14 10:49:52 +02:00
quotas.ts Add Site-Admin quota override management UI (#58) 2026-07-10 00:14:28 +02:00
search.test.ts Add SearchProvider interface with PostgreSQL FTS (#49) 2026-07-09 13:25:05 +02:00
search.ts Add SearchProvider interface with PostgreSQL FTS (#49) 2026-07-09 13:25:05 +02:00
secret-store.ts Add backup sidecar: nightly dump, volume archive, prune, status, restore (#83) 2026-07-11 17:29:15 +02:00
setup.ts Add the first-run setup wizard UI (#81) 2026-07-11 16:05:01 +02:00
system.ts Nextcloud backup target: admin-configured, manual + scheduled uploads, in-app restore (#103) 2026-07-12 10:39:18 +02:00
text-diff.test.ts Add version history UI: list, view, diff, restore (#42) 2026-07-09 08:53:42 +02:00
text-diff.ts Add version history UI: list, view, diff, restore (#42) 2026-07-09 08:53:42 +02:00
token-crypto.ts Add collaboration token issuance and connection authentication (#34) 2026-07-08 15:52:19 +02:00
tree.ts Page hierarchy: parentId, create-under-parent, reparent (#106) 2026-07-14 09:57:47 +02:00
watches.ts Add watches: follow pages and ponds with auto-watch preferences (#93) 2026-07-11 22:59:11 +02:00
webdav.test.ts Nextcloud backup target: admin-configured, manual + scheduled uploads, in-app restore (#103) 2026-07-12 10:39:18 +02:00
webdav.ts Nextcloud backup target: admin-configured, manual + scheduled uploads, in-app restore (#103) 2026-07-12 10:39:18 +02:00