diff --git a/AGENTS.md b/AGENTS.md index 4ee9dd03..bb4b81b8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -654,3 +654,5 @@ a late prompt or starting inference. Model capability gates include attachments replayed from history, including text-only follow-ups. The bus's internal remote source skips SQLite persistence and local plugin event hooks; ordinary live subscribers still receive the unchanged event. Existing publishers default local. + +Space (`#/space`): labelled Base UI `Field` form (optional title, required content with inline validation), designed empty state and card list; copy in `live.space.*`. Evidence: `evidence/space-redesign/`. diff --git a/packages/app/src/kit/styles.css b/packages/app/src/kit/styles.css index 0e1c2fb8..abc74b65 100644 --- a/packages/app/src/kit/styles.css +++ b/packages/app/src/kit/styles.css @@ -574,3 +574,20 @@ a.chip { display: inline-flex; align-items: center; text-decoration: none; } /* Registry screen root (registry.tsx Root): layout-neutral wrapper carrying the per-screen testID. */ .screen-root { display: contents; } + +/* ---------- Space (pages) ---------- */ +.space { max-width: 680px; margin: 0 auto; padding-top: 8px; display: flex; flex-direction: column; } +.space-lead { margin: 0 0 20px; color: var(--t2); } +.space-form { display: flex; flex-direction: column; gap: 16px; padding: 18px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--ring); } +.space-field { display: flex; flex-direction: column; gap: 6px; } +.space-label { display: flex; align-items: baseline; gap: 6px; font-weight: 500; } +.space-opt { font-weight: 400; color: var(--t3); font-size: 11px; } +.space-text { height: auto; min-height: 140px; resize: vertical; line-height: 20px; } +.space-error { margin: 0; color: var(--red); font-size: 12px; } +.space-actions { display: flex; justify-content: flex-end; } +.space-h2 { margin: 28px 0 10px; font-size: 15px; font-weight: 500; } +.space-row { width: 100%; text-align: left; } +.space-row:hover { background: var(--hover); } +.space-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 32px 20px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--ring); text-align: center; color: var(--t2); } +.space-empty h3 { margin: 10px 0 0; font-size: 13px; font-weight: 500; color: var(--t1); } +.space-empty p { margin: 0; } diff --git a/packages/app/src/screens/live/productivity.tsx b/packages/app/src/screens/live/productivity.tsx index 9bdcc5f5..30c5e9b0 100644 --- a/packages/app/src/screens/live/productivity.tsx +++ b/packages/app/src/screens/live/productivity.tsx @@ -1,4 +1,5 @@ import * as React from "react"; +import { Field } from "@base-ui/react/field"; import { api } from "../../api"; import { useT } from "../../i18n"; import { useNav } from "../../shell/nav"; @@ -15,16 +16,29 @@ export function Space() { function SpaceHome({ epoch }: { epoch: string }) { const t = useT(), { go } = useNav(), c = useContract(); const q = useOp<{ items: File[] }>(epoch, "app.library"); - const [title, setTitle] = React.useState(""), [text, setText] = React.useState(""); - return
-
{ e.preventDefault(); void c.run(async () => { const f = await call(epoch, "app.note.create", {}, { title: title.trim() || undefined, text }); go("space-page", { id: f.id }); }); }}> - -