mirror of
https://github.com/PerpetualSoftware/pad.git
synced 2026-10-25 14:00:40 +00:00
a52aff465e
* test(e2e): walk settings, roles, quick actions and saved views as each permission shape (TASK-2866 U4) The last unit of HT-1157's walk. For the five member accounts: - Settings: the Danger Zone tab, the General name field and Save, the Members invite form, and the Collections tab's create button; - the sidebar New collection button; - the Roles board's role writes. For all seven accounts, quick-action authoring and "Save current view". Each rule is the server's rule, and each leaked write was measured against the server: 403 for the leaked accounts, with the editor's view save 201 as the control. It found three defects, all filed rather than fixed: - BUG-3261: the sidebar New collection button renders for every non-owner member, though collection create is owner-only. - BUG-3262: "Save current view" renders for viewers and guests, though a view save needs editor or above. - BUG-3260: on a direct load or reload, Settings → General shows an empty workspace Name, for the owner too. In-app navigation fills it. The affected legs are marked test.fail with those refs. Claude-Session: https://claude.ai/code/session_016PXRzXhokr61CLbbu3Txj9 * test(e2e): the board-drag walk measures whether the drag started, with an in-test control (TASK-2866) CI saw the precedence-drag leg send no writes on one attempt: the gesture never started. Under test.fail that read as "expected to fail, but passed". Once BUG-3259 is fixed, the same silent gesture would pass as "not draggable", so the leg was one broken gesture away from vouching for a fix. Changes: - The drag records whether svelte-dnd-action mounted its dragged element, and retries the gesture up to three times until it does. A disabled zone (the viewer) reads not-started with the same gesture. - It waits for the drop's write, not a fixed sleep, and detaches its response listener. The listener used to leak across calls. - The destination lane is whichever lane the card is not in, so a repeat in the same worker is not a same-lane reorder. - The precedence leg now PINS today's defect (the card starts and its status write is refused 403), with a control drag in the same test on a card the guest may edit. test.fail would have swallowed a failing control. Measured: the two drag tests at 8 workers, repeat-each 10: 20/20. Claude-Session: https://claude.ai/code/session_016PXRzXhokr61CLbbu3Txj9
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