feat(pages): explicit position ordering + sectioned space view

Add position column to pages (migration 020), update listBySpace to ORDER BY position, title,
expose position in update(), add to patchSchema, and replace the space view flat table with a
tree renderer grouping pages by parent_id under h4 section headers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
root
2026-06-05 22:33:10 +10:00
parent 34d0c417f4
commit 3f77f3faad
5 changed files with 65 additions and 19 deletions

View File

@@ -0,0 +1,3 @@
-- 020: explicit page ordering within a space (and within a parent).
ALTER TABLE pages ADD COLUMN IF NOT EXISTS position integer NOT NULL DEFAULT 0;
CREATE INDEX IF NOT EXISTS idx_pages_space_position ON pages (space_id, position, title);