mirror of
https://github.com/PerpetualSoftware/pad.git
synced 2026-10-26 06:19:49 +00:00
4b5daad5a5
* fix(web): an identity change now moves the reset generation of every workspace, and every post-await call outside a fence is classified (BUG-3130) localIndex.resetAll, the identity-change listener, reset only the workspaces it held state for. A caller that captured resetGenerationFor(ws) while ws had no state saw no drop across a sign-out, so FieldEditor.createRelationTarget wrote the previous identity's new row into a fresh index. resetAll now bumps a counter folded into resetGenerationFor. The child-population guard now fails on any post-await call that is neither a modelled send nor a fence call and has no fence before it, unless it is classified in KNOWN_OUTSIDE_FENCE (26 rows, each with its reason). Two-way: an unlisted call fails, and so does a stale row. * fix(web): decision chips no longer paint the previous identity's answer, and promise continuations in the item pane are enumerated (BUG-3130) DecisionChips' .then checked only its item token, which a sign-out does not move. It now also checks an identity fence captured in the effect. It was invisible because the guard does not model promise continuations (gap (f)) and the hand list of them predated the component. The guard now enumerates every function handed to .then/.catch/.finally in the population, inline or by name, into a two-way KNOWN_CONTINUATIONS table (12 rows), so a new continuation fails until it is read. Codex round 1 found the component and the by-name callback the first enumerator missed. * docs(web): the child-population guard's gap (e) instance has been fixed; say so (BUG-3130) * test(web): table keys carry an occurrence count, ['then'] is a continuation, and other deferrals are a declared gap (BUG-3130) * docs(web): the child-population guard names generator resumption, what a table row pins, and where fail-closed stops (BUG-3130) * fix(web): a field edit typed under one identity is not sent as the next one's (BUG-3130)
Pad Web UI
SvelteKit 2 + Svelte 5 frontend for Pad, compiled to static files and embedded into the Go binary.
Development
npm install
npm run dev # Dev server at localhost:5173 (proxies API to localhost:7777)
npm run build # Production build to build/
npm run check # Type checking with svelte-check
When developing, run the Go backend separately with make dev from the project root.
Building for Production
Do not build in isolation. Always use make build from the project root — this builds the web frontend, then compiles the Go binary with the build output embedded via //go:embed.
Stack
- Svelte 5 with runes (
$state,$derived,$effect) - SvelteKit 2 with
adapter-static(SPA mode) - Tiptap block editor with markdown round-trip
- svelte-dnd-action for drag-and-drop in board/list views
- SSE for real-time updates
- TypeScript throughout
Structure
src/
routes/ SvelteKit pages
+layout.svelte App shell (sidebar + main)
+page.svelte Landing/redirect
[workspace]/
+page.svelte Dashboard (collections, phases, activity)
+layout.svelte SSE connection per workspace
[collection]/
+page.svelte Collection view (board/list)
[collection]/[item]/
+page.svelte Item detail + editor
conventions/ Purpose-built conventions page
playbooks/ Purpose-built playbooks page
settings/ Workspace settings
lib/
api/client.ts HTTP API client
components/
layout/ Sidebar, navigation
editor/ Tiptap editor, raw markdown editor
fields/ FieldEditor, relation picker
items/ ItemCard, ItemDetail
collections/ BoardView, ListView
common/ StatusBadge, badges, modals
search/ CommandPalette
stores/ Svelte 5 reactive stores
workspace.svelte.ts Workspace state
collections.svelte.ts Collection + item state
ui.svelte.ts Sidebar, mobile state
types/index.ts TypeScript types and constants
app.css Global styles and design tokens