feat(spaces): docs-kind spaces render as pure documentation repos

Adds a `kind` column to spaces ('project' default, 'docs' for Wiki).
Docs spaces skip projects/tasks fetches and render only the page tree.
Sidebar caret for docs spaces expands to top-level pages (#/page/:id).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-06-05 23:41:46 +10:00
parent 71adc51c00
commit 43bfa23a00
5 changed files with 119 additions and 13 deletions

View File

@@ -0,0 +1,5 @@
-- 021: space kind — 'project' (workspace w/ projects+tasks) or 'docs' (pure documentation repo)
ALTER TABLE spaces ADD COLUMN IF NOT EXISTS kind text NOT NULL DEFAULT 'project';
ALTER TABLE spaces DROP CONSTRAINT IF EXISTS spaces_kind_check;
ALTER TABLE spaces ADD CONSTRAINT spaces_kind_check CHECK (kind IN ('project','docs'));
UPDATE spaces SET kind='docs' WHERE slug='wiki';

View File

@@ -30,7 +30,7 @@ export async function list() {
export async function update(id, patch, actor) {
const before = await getById(id);
const fields = ['name','description','theme','slug'];
const fields = ['name','description','theme','slug','kind'];
const sets = [], vals = [];
let i = 1;
for (const f of fields) {