PUI-43 feat(cms): give the tree its own contract section and schema definitions #116

Merged
pienter merged 2 commits from feature/PUI-43-tree-contract-section-and-schema-definitions into main 2026-09-22 21:29:28 +00:00
Owner

The backend contract gets a standalone Tree section and schema.json the matching definitions (Goal Tree Index, milestone 31, page 45). Docs and schema only. Stacked on the PUI-42 branch, so this PR shows only its own commit; retarget to main once PUI-42 merges.

  • docs/cms/backend-contract.md: ## Tree with Requirements for the tree request and response (load({ signal }), no query parameters, every record in manual order each followed by its subtree, any depth, no meta), the move (body unchanged: { id, parent_id, index, sibling_ids }, 2xx then reload, 409 stale order, 422 forbidden, rollback on failure) and search and filters in a tree (not a backend operation: query event, matching keys, no endpoint required). The list contract's tree remarks are gone.
  • packages/ui/utils/cms/schema.json: TreeResponse, MoveRequest and a shared RowKey, both envelopes in the top-level oneOf; existing definitions unchanged. ### Added under ## Unreleased.
  • modules-and-indexes.md (new Tree indexes section), architecture.md and README.md point at TreeIndex.

Checks: format:check, lint, typecheck, bun test (165); the doc examples validated against schema.json; anchor check over docs/cms, ADR 0012, CMS_PLAYGROUND.md and CHANGELOG.md: 58 links, 0 broken.

The backend contract gets a standalone Tree section and `schema.json` the matching definitions (Goal Tree Index, milestone 31, page 45). Docs and schema only. Stacked on the PUI-42 branch, so this PR shows only its own commit; retarget to `main` once PUI-42 merges. - `docs/cms/backend-contract.md`: `## Tree` with Requirements for the tree request and response (`load({ signal })`, no query parameters, every record in manual order each followed by its subtree, any depth, no `meta`), the move (body unchanged: `{ id, parent_id, index, sibling_ids }`, 2xx then reload, 409 stale order, 422 forbidden, rollback on failure) and search and filters in a tree (not a backend operation: `query` event, `matching` keys, no endpoint required). The list contract's tree remarks are gone. - `packages/ui/utils/cms/schema.json`: `TreeResponse`, `MoveRequest` and a shared `RowKey`, both envelopes in the top-level `oneOf`; existing definitions unchanged. `### Added` under `## Unreleased`. - `modules-and-indexes.md` (new Tree indexes section), `architecture.md` and `README.md` point at `TreeIndex`. Checks: format:check, lint, typecheck, bun test (165); the doc examples validated against schema.json; anchor check over docs/cms, ADR 0012, CMS_PLAYGROUND.md and CHANGELOG.md: 58 links, 0 broken.
feat(cms): give the tree its own contract section and schema definitions
All checks were successful
ci / typecheck (pull_request) Successful in 26s
ci / format (pull_request) Successful in 27s
ci / release (pull_request) Has been skipped
ci / lint (pull_request) Successful in 55s
d1819f0b19
The backend contract gets a standalone Tree section (tree request and
response, move, search and filters answered by the project) and loses the
tree remarks in the list contract; schema.json gains TreeResponse and
MoveRequest, closing the gap PUI-32 documented. The move body is unchanged
(Goal page 45). The module and architecture docs point at TreeIndex.

Refs: PUI-43
pienter changed target branch from feature/PUI-42-dimming-search-and-filters-on-treeindex to main 2026-09-22 21:26:07 +00:00
Merge branch 'main' into feature/PUI-43-tree-contract-section-and-schema-definitions
All checks were successful
ci / typecheck (pull_request) Successful in 33s
ci / lint (pull_request) Successful in 36s
ci / format (pull_request) Successful in 38s
ci / release (pull_request) Has been skipped
d919d1c103
pienter deleted branch feature/PUI-43-tree-contract-section-and-schema-definitions 2026-09-22 21:29:28 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pienter/ui!116
No description provided.