dorfteich/apps/api/src/pages
Claude Opus 5 45f1925917
Some checks failed
CI / Lint, typecheck, test (pull_request) Successful in 6m28s
CI / Import/export fidelity gate (pull_request) Has been skipped
CI / Auth e2e pack (pull_request) Failing after 4m1s
CI / Build container images (pull_request) Successful in 4m3s
#302: configurable pond start page, created with every new pond
Opening a pond landed on whatever sorted first in the sidebar — stable,
but a rule nobody could see, and one whose target moved as soon as
someone added a page ahead of it. New ponds landed on the empty-pond hint
instead of anything useful.

- `startPageId` joins the pond settings. No migration: `Pond.settings` is
  already jsonb. It stores an id, not a slug, so renaming or moving the
  page keeps it working.
- `PondHomePage` prefers it, but only when the page is in this user's
  page list. That list already holds just what they may see, so a start
  page hidden by a page-scoped grant — or trashed — falls back silently
  instead of landing them on a 404, and it costs no extra request.
- Both creation paths give the pond a start page, titled from the
  creator's stored locale. It happens after the creating transaction
  commits: the owner's grant is written inside it and permissions cache
  per pond, so creating the page any earlier would ask about rights the
  grant has not published yet. A failure is logged, not fatal — a pond
  without a start page still works.

`PagesModule` imported `PondsModule` without using it. Removing that
vestigial edge let PondsModule depend on PagesModule in the honest
direction instead of tying the two together with forwardRef.

Every pond created through the api now owns a page, which broke eight
suites whose teardown deleted ponds directly — `Page.pond` deliberately
has no cascade, because a real purge removes contents explicitly and
audits it. A shared `deletePondsWhere` helper deletes pages first. Two
tests that counted pages now account for the start page rather than
pretending the pond began empty.
2026-08-01 08:06:35 +02:00
..
classification-inheritance.e2e.db.test.ts #205: classification inherits down the tree; lowering is a guarded, audited act 2026-07-31 06:12:26 +02:00
classification.e2e.db.test.ts #204: classification as first-class page metadata (ADR 0022) 2026-07-31 06:01:50 +02:00
collab-token.e2e.db.test.ts #188: purpose-bound token keys via HKDF, jose replaces the homegrown JWT 2026-07-30 06:41:11 +02:00
hierarchy.db.test.ts Page hierarchy: parentId, create-under-parent, reparent (#106) 2026-07-14 09:57:47 +02:00
pages.controller.ts #222: read-access trail for classified pages 2026-07-31 12:12:55 +02:00
pages.e2e.db.test.ts Switch the editor to live collaboration (#36) 2026-07-08 18:00:19 +02:00
pages.module.ts #302: configurable pond start page, created with every new pond 2026-08-01 08:06:35 +02:00
pages.service.ts #222: read-access trail for classified pages 2026-07-31 12:12:55 +02:00
plugin-api.controller.ts #222: read-access trail for classified pages 2026-07-31 12:12:55 +02:00
plugin-api.e2e.db.test.ts #302: configurable pond start page, created with every new pond 2026-08-01 08:06:35 +02:00
reposition.db.test.ts Enforce permissions in API guards and retire interim access (#52) 2026-07-09 16:31:41 +02:00
sort-key.test.ts Add manual page ordering with drag-and-drop (#45) 2026-07-09 12:18:44 +02:00
sort-key.ts Add manual page ordering with drag-and-drop (#45) 2026-07-09 12:18:44 +02:00
task-overview.e2e.db.test.ts #154: Aufgabenübersicht als Kern-Block (Seite + Unterseiten) 2026-07-20 01:20:30 +02:00
task-toggle.e2e.db.test.ts #153: Stabile Task-IDs + Toggle-Rückschreibpfad über den Collab-Server 2026-07-20 01:03:16 +02:00
tasks.service.ts #168: Formulare — Fehler-Verdrahtung und Namenslücken 2026-07-21 14:26:54 +02:00
yjs-content.ts #151: Mention-Benachrichtigungen über die Glocke 2026-07-20 01:25:16 +02:00