Files
pad/web
xarmian a2c8c67a9c refactor(web): delete inline-expand DOM (TASK-1555) (#610)
* refactor(web): delete inline-expand DOM from admin users page (TASK-1555)

Closes the parallel-UI broken state opened in TASK-1550 and maintained
through T1551-T1554. The modal (UserModal + UserOverviewTab +
UserWorkspacesTab + UserActivityTab + UserSettingsForm) now owns every
admin-user-detail surface; the inline expand goes away.

Removed from +page.svelte:

- The {#if selectedId === user.id} ... edit-row block (220 LOC of DOM)
- selectedId state + class:selected binding on the row
- selectUser() helper (the row click now goes directly to openUserModal)
- All inline-expand-only state: editRole, editPlan, editOverrides,
  extraOverrides, editStorageOverride, storageOverrideError, saving,
  saveMsg, roleConfirm/roleSaving/roleMsg, resetConfirm/resetSaving/
  resetResult/resetError, disableConfirm/disableSaving/disableMsg,
  userWorkspaces, workspacesLoading
- All inline-expand-only handlers: loadUserWorkspaces, selectedUser,
  roleAction, changeRole, resetPassword, toggleDisable, saveUser
- Dead helpers: parsePlanOverrides, parseStorageInput,
  storageOverridePreview (the parse-side now lives in
  UserSettingsForm.svelte where it's actually used)
- ~190 lines of dead CSS (.edit-row, .edit-panel, .edit-field*,
  .overrides-grid, .override-field*, .storage-input*, .storage-preview*,
  .role-row, .role-confirm*, .reset-result, .temp-password*,
  .ws-list/.ws-item/.ws-name/.ws-joined, .badge.owner, .user-row.selected)

Kept (still in use by the table):

- formatStorageBytes — Storage cell renders bytes per row
- relativeTime, writeRecency — Last Write / Last Active columns

File LOC drops from 1482 → 735 (~750 lines removed, 50% smaller).

Part of PLAN-1542. With this merge the plan is complete — backend
foundation (T1543–T1547), table UX (T1548–T1549), and the modal
(T1550–T1555) are all live.

* fix: address Codex review on TASK-1555

Three cleanup misses from the original deletion sweep:

1. Drop unused imports: adminPatch, adminPost — only adminFetch is
   still used by the page (for the list + status counts), the mutating
   calls all live in UserSettingsForm now.

2. Update stale modal comments. The "both UIs coexist" / "shell only"
   notes were accurate during T1550-T1554 but now describe the past;
   replaced with a one-line description of the modal's role.

3. Drop dead CSS rules that survived the inline-expand removal:
   .btn.primary, .btn.primary:hover, .badge.disabled (replaced by
   .badge.status-disabled in T1548), .btn.danger, .btn.danger:hover,
   .btn.primary.danger, .btn.primary.danger:hover. None had any
   remaining users in the markup; svelte-check now reports zero
   admin/+page.svelte warnings.

* fix: drop one more stale comment caught by Codex re-review on TASK-1555
2026-05-20 19:18:13 -04:00
..
2026-03-26 01:52:36 +00:00
2026-03-26 01:52:36 +00:00
2026-03-26 01:52:36 +00:00
2026-03-26 01:52:36 +00:00
2026-03-26 01:52:36 +00:00
2026-03-26 01:52:36 +00:00

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
      activity/              ActivityFeed
    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