Commit Graph

66 Commits

Author SHA1 Message Date
xarmian d2898edc61 feat: show field change details in dashboard activity section (#4)
Dashboard activity rows now display change metadata inline (e.g.
"status: open → done") when available. Adds parseActivityChanges
helper and subtle muted styling for the change text.
2026-03-28 11:05:57 -04:00
xarmian 2a4fe31103 feat: include field change details in activity metadata (#3)
Item updates now log what actually changed (e.g. "status: open → done,
priority: low → high") in the activity metadata. The activity feed page
already renders meta.changes — this populates it with real diff data.
2026-03-28 10:57:54 -04:00
xarmian a51e145b96 fix: resolve svelte-check type error in TableView component (#2)
page.params.workspace is string | undefined, but EmptyState expects
string. Add fallback to empty string so the type narrows correctly.
Fixes CI failure from svelte-check.
2026-03-28 10:54:03 -04:00
xarmian 52c8348361 fix: enrich activity log entries with item titles and collection info (#1)
The activity list endpoint returned raw entries without item context,
causing the activity page to show bare "Created"/"Updated" verbs.
The dashboard already enriched entries via GetItem() lookups — now the
activity handler does the same, and the frontend reads top-level fields
with metadata fallback.
2026-03-28 10:51:36 -04:00
xarmian fbfaaa8c84 Merge commit '559815f' 2026-03-28 14:17:07 +00:00
xarmian 6ae50f7251 Merge commit 'cf83a60' 2026-03-28 14:16:08 +00:00
xarmian c2527395aa chore: Rebuild embedded assets 2026-03-28 14:15:06 +00:00
xarmian 559815f7a3 Add burndown chart to phase detail pages
Create PhaseChart SVG component showing task completion over time with
an ideal burndown line, actual step chart, and today marker. Wire it
into PhaseTasks (shown when phase has start_date) and pass phaseFields
from the item detail page.
2026-03-28 14:14:32 +00:00
xarmian cf83a60fc2 feat: Add API tokens system for programmatic access
Add a complete API tokens system enabling CI/CD integrations, custom
scripts, and third-party tools to authenticate with the Pad API.

- Migration 011: api_tokens table with hash-based token storage
- Model: APIToken, APITokenCreate, APITokenWithSecret types
- Store: CRUD operations with crypto/rand generation and SHA-256 hashing
- Middleware: Bearer token auth that sets workspace context
- Handlers: POST/GET/DELETE /workspaces/{ws}/tokens endpoints
- CORS: Allow Authorization header for token-based requests
2026-03-28 14:13:50 +00:00
xarmian 51f90fb46e Merge branch 'feat/webhook-cli-and-bulk-ops' 2026-03-28 14:09:00 +00:00
xarmian cdd3dcdc50 fix: Remove incomplete webhook/bulk-update command registrations
The agent registered webhooksCmd() and bulkUpdateCmd() but hasn't
written the implementations yet. Remove the registrations to fix
the build. They'll be re-added when the implementations are complete.
2026-03-28 14:08:53 +00:00
xarmian dc83d7490c feat: Add content templates for collections
Collections can now define a content_template in their settings — a
markdown template that pre-fills new items. When creating a bug report,
for example, the template can include "Steps to Reproduce", "Expected
Behavior", "Actual Behavior" sections automatically.

- Add content_template to CollectionSettings (Go model + TypeScript type)
- Sidebar "New" button uses template when creating items
- Dashboard quick-create buttons use template
- Template is stored in collection settings JSON, configurable via
  the collection edit UI
2026-03-28 14:07:07 +00:00
xarmian dc6ea138b7 feat: Make toast notifications and notification history clickable
Toast notifications from SSE events (agent/CLI item creation) now
include a link to the created item. Clicking the toast navigates
to the item detail page. The notification panel history entries
are also clickable when they have links.

- Toast and HistoryEntry types gain optional `link` field
- ToastContainer renders clickable toasts with hover state and → hint
- NotificationPanel renders linked entries as buttons with hover
- Workspace layout passes item URL to SSE-triggered toasts
2026-03-28 14:04:04 +00:00
xarmian 66d650155c chore: Rebuild embedded assets with updated skill and conventions 2026-03-28 13:56:44 +00:00
xarmian 4708e5bacf docs: Update README, SKILL.md, CLAUDE.md, and add GitHub templates
README: Complete rewrite with value proposition, comparison table,
feature showcase, installation guide, architecture diagram, CLI reference.

SKILL.md: Add standup, changelog, watch, dependencies, and webhooks
to the agent skill so AI tools know about new capabilities.

CLAUDE.md: Document webhooks package, new API endpoints, and all new
CLI commands.

GitHub templates: Bug report and feature request issue templates (YAML),
pull request template with checklist.
2026-03-28 13:55:40 +00:00
xarmian ee932d701d test: Add 23 comprehensive dashboard handler tests
Cover all dashboard computation paths: empty workspace, summary counts,
active items sorting and capping, active phases with progress, overdue
items (due_date and end_date), blocked items via dependency links,
suggested next from active phases, isDoneStatus for all terminal states,
phase completion detection, orphaned tasks, recent activity, item refs,
multiple active phases, and 404 for nonexistent workspaces.
2026-03-28 13:55:31 +00:00
xarmian e6a4bdc986 feat: Redesign web UI with dashboard, activity feed, notifications, and mobile improvements
Dashboard: Complete rewrite as command center with active work cards,
collection grid with status dots and progress bars, phase progress,
side-by-side attention/up-next, skeleton loading, instant creation buttons.

New pages: Activity feed with date grouping, action/source/collection
filters, and pagination. Sidebar navigation link + "View all" from dashboard.

New components: Keyboard shortcuts overlay (press ?), notification center
(bell icon + slide-out panel with toast history), contextual empty states
per collection with agent prompt hints.

Improvements: Command palette with search icon, item refs, colored status
badges. Mobile board horizontal scroll with snap-to-column. Collection
page header with collapsible filter toggle. Saved view tabs. Item detail
relationships section (blocks/blocked-by/wiki-links). Sidebar shows
active item counts only. Mobile header taps to dashboard. PWA manifest.

Bug fix: Mobile sidebar swipe zone reduced to left edge (0-24px) to
avoid conflicts with board horizontal scrolling.
2026-03-28 13:55:23 +00:00
xarmian 86722d7607 feat: Add webhooks, saved views, enhanced dashboard, and dependencies backend
Webhooks:
- Full subsystem with HMAC-SHA256 signing, event filtering, auto-disable
  after 10 failures, test delivery endpoint
- Migration 010_webhooks.sql, model, store CRUD, dispatcher with tests
- Wired into item create/update/delete/move and comment create handlers

Dashboard API:
- active_items: Returns actual in-progress items with refs and priorities
- active_item_count on collections (excludes terminal statuses)
- Blocked item detection in attention (via dependency links)
- isDoneStatus expanded to include cancelled/rejected/fixed/implemented

Saved Views:
- Store CRUD, API handlers, routes for per-collection saved views
- View config stores filters, sort, view_type

Activity:
- Source filtering support (web/cli/agent) in activity list endpoint
2026-03-28 13:55:06 +00:00
xarmian 40fc3eab33 feat: Add standup, changelog, watch, and dependency CLI commands
- pad standup: Auto-generate daily standup from recent activity
  (completed/in-progress/blockers, --days flag, JSON output)
- pad changelog: Generate release notes grouped by collection
  (--days, --since, --phase flags, markdown output for GitHub releases)
- pad watch: Real-time terminal activity stream via SSE
  (colored output, graceful Ctrl+C shutdown)
- pad blocks/blocked-by/deps/unblock: Task dependency management
- Colorized pad init, pad onboard, pad show, and pad status output
  with Active Work section showing in-progress items
2026-03-28 13:54:52 +00:00
xarmian 823afe615c feat: Add terminal colors and improved CLI formatting
Add fatih/color dependency for terminal color output. Status colors
(green=done, yellow=in-progress, blue=open, red=cancelled),
priority colors, item reference numbers in all list output, and
colorized status icons throughout the CLI.
2026-03-28 13:54:41 +00:00
xarmian 6daa8eb68b Add move item between collections with field migration
Full-stack feature: move items between collections (e.g., idea → task)
with automatic field migration.

Backend:
- Field migration engine (items/migrate.go) maps matching fields,
  handles type conversions, drops incompatible fields, applies defaults
- Store method updates collection_id and assigns new item_number
- POST /api/v1/workspaces/{ws}/items/{slug}/move endpoint
- Activity logging with "moved" action and from/to metadata
- 6 migration unit tests covering type matching, conversion, and edge cases

CLI:
- pad move <slug> <target-collection> [--field key=value ...]
- Accepts singular collection names (task, idea, bug, etc.)

Web UI:
- "Move to..." dropdown on item detail page
- Shows all collections except current with icons
- Redirects to the item's new URL after move

Field migration rules:
- Same type: transfer directly (validate select options)
- Compatible types (text↔url, number→text, select→text): auto-convert
- Incompatible types: drop silently
- Missing required target fields: apply defaults or error
2026-03-28 05:01:40 +00:00
xarmian d41842ef7a Enhance dashboard with in-progress focus section and agent activity badges
Dashboard improvements:
- New "In Progress" section at the top showing clickable chips for
  collections with in-progress items — jump straight to what you're
  working on
- Agent activity gets a purple left-border and "AGENT" badge in the
  activity feed, making AI contributions visually distinct
- CLI activity gets a blue "CLI" badge
- Removed redundant "by you via web" text — the badges are cleaner

The dashboard now clearly shows the human-agent collaboration story:
you can see at a glance what the AI has been doing alongside you.
2026-03-28 04:50:34 +00:00
xarmian 5bcdf9a1ab Add keyboard navigation for collection pages
j/k or arrow keys to move between items, Enter to open, Esc to clear
focus. Works in both list and board views. Focused item gets a blue
outline ring and auto-scrolls into view.

Skips keyboard handling when typing in inputs or when the quick-create
bar is open. Doesn't conflict with existing Cmd+K, Cmd+N, etc. global
shortcuts since those all use modifier keys.

This is the kind of keyboard-first navigation that makes developer
tools feel fast — no mouse needed to browse your task board.
2026-03-28 04:48:51 +00:00
xarmian 889c6d3a56 Enhance demo template with playbook, extra convention, and multi-agent refs
The demo workspace now showcases conventions AND playbooks (both key
differentiators), references multi-agent support in the architecture doc,
and has a better description. This is what people see when they run
pad init --template demo to try Pad for the first time.
2026-03-28 04:36:47 +00:00
xarmian 36c2fe25da Add Docker Buildx and GHCR login to release workflow 2026-03-28 04:34:39 +00:00
xarmian a2e5a6622d Add Docker support and PAD_DATA_DIR config
- Multi-stage Dockerfile for building from source
- Dockerfile.goreleaser for GoReleaser-built release images
- GoReleaser config: publish multi-arch Docker images to ghcr.io
- Add PAD_DATA_DIR environment variable for configuring data directory
- Update README with Docker install option
- Add .dockerignore
2026-03-28 04:34:17 +00:00
xarmian 9d0d6cca5e Show toast notifications for external item changes
When the CLI or an agent creates items, the web UI now shows a subtle
toast notification like "Agent created: Fix OAuth redirect" or
"CLI created: New task". Only fires for non-web sources — changes you
make in the browser don't trigger redundant notifications.

This makes the agent collaboration feel alive — you can see items
appearing in real-time as your AI works alongside you.
2026-03-28 04:30:47 +00:00
xarmian 741ea94789 Add inline quick-create bar on collection pages
Click "+ New Task" to open a title input right in the page header.
Type a title, press Enter — item is created instantly without navigating
to a separate form. Press Esc to cancel. The item appears in the current
view immediately via local state update.

This is how Linear/Todoist handle creation — no page navigation, no forms,
just type and go. Much faster for rapid item creation during planning or
when an agent is working alongside you.
2026-03-28 04:27:12 +00:00
xarmian f7ac533ec1 Fix critical security issues found in pre-public audit
- Fix SQL injection in sort parameter: validate field names against
  alphanumeric regex before interpolating into json_extract queries
- Restrict CORS to localhost origins only (remove http://* wildcard)
- Change Makefile HOST default from 0.0.0.0 to 127.0.0.1
- Add Apache-2.0 license field to web/package.json
2026-03-28 04:20:59 +00:00
xarmian 59e72097d7 Add pad-web repo reference to CLAUDE.md and update agent description 2026-03-28 04:13:33 +00:00
xarmian 123190c15d Add pad open command to launch the web UI in a browser
- Opens http://localhost:7777 (or configured URL) in the default browser
- Auto-starts the server if not running
- Navigates directly to the active workspace if detected
- Works on macOS (open), Linux (xdg-open), and Windows (rundll32)
- Update skills command description to reference pad install
2026-03-28 04:03:30 +00:00
xarmian d29738bd89 Update README for multi-agent support and fix release workflow
- README: update agent integration section to show pad install with all supported tools
- README: add pad install step to Quick Start
- Release workflow: add web build placeholder before go test to prevent embed failure
2026-03-28 04:00:31 +00:00
xarmian b18ca1f3fc Add multi-agent pad install command
New top-level `pad install` command that auto-detects AI coding tools and
installs the /pad skill with tool-appropriate frontmatter:
- Claude Code (.claude/skills/) — full frontmatter
- Codex/Cursor/Windsurf (.agents/skills/) — name+description only
- GitHub Copilot (.github/instructions/) — applyTo frontmatter
- Amazon Q (.amazonq/rules/) — no frontmatter
- JetBrains Junie (.junie/guidelines/) — no frontmatter

Supports: pad install, pad install <tool>, pad install --all, --list, --update.
Updates pad init to detect and offer multi-tool installation.
2026-03-28 03:58:52 +00:00
xarmian a144de9af2 Fix title autofocus when creating new items
- Use tick() in startEditTitle() for reliable DOM focus instead of reactive $effect
- Add ?new=1 param to /new page redirect so title editing triggers on the detail page
2026-03-28 03:58:45 +00:00
xarmian eb828a8a77 Fix 3 web UI bugs: board empty state alignment, drag-and-drop positioning, and onboarding improvements
- Board view: move empty column text inside .column-cards so it aligns at top instead of bottom
- List/Board views: capture reorder data before awaiting status change to prevent reactive overwrite of drop position
- Onboarding: add dismiss button with localStorage persistence and re-show option, copyable prompts using shared clipboard utility, clearer setup instructions, and proper spacing below the checklist
2026-03-28 01:24:11 +00:00
xarmian a03b6d7bf8 Fix svelte-check type error in MermaidCodeBlock NodeView
Cast the NodeView factory return to `any` to satisfy the
CodeBlockOptions type constraint in strict mode.
2026-03-28 00:48:53 +00:00
xarmian dbecb741c6 Add workspace export/import and fix create workspace modal
Export/Import:
- `pad export -o file.json` exports workspace (collections, items,
  comments, links, versions) to portable JSON
- `pad import file.json --name X` creates new workspace with
  regenerated UUIDs and remapped relations
- GET /workspaces/{slug}/export and POST /workspaces/import endpoints
- "Download JSON" button in workspace settings
- Import tab with drag-and-drop in the create workspace modal
- Full transaction wrapping for atomic imports

Create Workspace Modal:
- Extracted from sidebar dropdown into a proper centered modal
  (sidebar's CSS transform was trapping fixed-position elements)
- Rendered at root layout level via uiStore flag
- Create and Import tabs with template picker and file drop zone
2026-03-28 00:25:04 +00:00
xarmian 222d2a1b80 Add table view for collections (IDEA-25)
Spreadsheet-style third view option alongside list and board. Sortable
columns for all schema fields, clickable status cycling, inline progress
bars, resolved relation labels, sticky header, and horizontal scroll.
Persisted per-collection in localStorage, configurable as default view.
2026-03-27 23:51:13 +00:00
xarmian a8059c5a0f Implement 8 ideas from the idea board
Quick wins:
- IDEA-31: URL autolink + link popover in editor (SafeLink with data-href
  prevents mobile navigation, popover shows open/edit/remove actions)
- IDEA-36: Focus title on new item creation, Enter moves to editor
- IDEA-38: Add `pad link` CLI command to link directory to existing workspace
- IDEA-34: Show checklist progress bar on item cards (parses markdown checkboxes)
- IDEA-28: Workspace rename (already existed in settings)

Medium effort:
- IDEA-33: Drag-and-drop task reordering in Phase documents via svelte-dnd-action
- IDEA-26: Archive collections (frontend wiring — backend already supported soft delete)
- IDEA-29: Archive workspaces with danger zone confirmation in settings
- IDEA-37: Raw markdown editor toggle + inline Mermaid diagram rendering
  (NodeView with ignoreMutation to prevent ProseMirror re-parse loops)
2026-03-27 23:41:20 +00:00
xarmian d318ecf7fc Add workspace onboarding: CLI hints, web checklist, codebase detection, and relation field fix
- Print suggested /pad prompts after `pad init` creates a new workspace
- Add `pad onboard` command that detects project tooling (language, build system,
  test runner, CI, linter) and suggests matching conventions from the library
- Replace empty workspace welcome box with OnboardingChecklist component showing
  a 4-step guided setup with progress bar and /pad prompt hints
- Add contextual tips with /pad prompts to empty collection states
- Add onboarding workflow to /pad skill for agent-driven codebase analysis
- Fix relation fields storing slugs instead of UUIDs: server now resolves
  slugs/refs to UUIDs for relation-type fields on both create and update
2026-03-27 19:33:18 +00:00
xarmian 14fe7fd631 Fix CI: create web build placeholder for Go embed in test and vet jobs
The go:embed directive requires web/build/* to exist. Go test and vet jobs
run without building the web UI, so create a minimal placeholder directory
to satisfy the embed pattern.
2026-03-27 03:35:55 +00:00
xarmian 9a590dc580 Fix SQLITE_BUSY on drag-and-drop by sequencing API calls and using item IDs
Status change and sort order updates were firing concurrently, causing
SQLITE_BUSY errors. Now handleFinalize awaits the status change before
sending reorder updates. Switched all frontend API calls from item.slug
to item.id (UUID). Added UUID support to ResolveItem in the store layer.
2026-03-27 02:09:14 +00:00
xarmian a6d08fdd7e Add Quick Actions — contextual prompt buttons that copy agent commands to clipboard
New QuickAction type in collection settings lets users define prompt templates
with variables ({ref}, {title}, {status}, etc.) that resolve at click time.
Lightning bolt menu appears on item detail and collection pages. Includes
default actions for Tasks, Ideas, Phases, and Docs collections. Fully
customizable via new Quick Actions tab in EditCollectionModal.
2026-03-27 01:56:31 +00:00
xarmian e20b84fe90 Fix board column reordering with native HTML5 drag-and-drop
Replace nested svelte-dnd-action zones (which treated the whole board as one
drop target) with native HTML5 drag events on column headers. Source column
fades during drag, blue left-border indicates drop position. Card drag-and-drop
within/between columns still uses svelte-dnd-action.
2026-03-27 01:24:41 +00:00
xarmian 7ba69abb88 Misc improvements: CLI field summaries, editor enhancements, CI and UI polish
Show field summary after create/update CLI commands. Make svelte-check
blocking in CI. Improve editor block handling, field editor layout,
conventions page, and minor UI consistency fixes across pages.
2026-03-27 01:13:07 +00:00
xarmian 3cf2522411 Add drag-and-drop column and group reordering for board and list views
Board columns and list groups can now be reordered by dragging their headers.
New order persists by updating the collection schema's field options array.
Column names remain left-aligned with drag handle on hover.
2026-03-27 01:12:58 +00:00
xarmian 880521c719 Add extract-to-item bubble menu for creating linked items from text selections
Select text in the editor to see a floating "Extract" button. Clicking it
opens an inline form to pick a collection and edit the title, then creates
the item and replaces the selection with a [[wiki-link]]. Full selected text
is included as item content when the title is edited shorter.
2026-03-27 00:55:50 +00:00
xarmian 0506051495 Show full timestamps on hover for all relative time displays
Added title attributes with localized timestamps to every relativeTime()
display: item detail meta, item cards, dashboard activity, activity feed,
comments, and version history.
2026-03-27 00:06:00 +00:00
xarmian c9e3d757e7 Use item refs instead of slugs in remaining navigation URLs
Fixed collection page new-item creation, new item form, and playbooks edit
button to use itemUrlId() for consistent PREFIX-NUMBER URLs.
2026-03-26 23:57:58 +00:00
xarmian 7c0514eacc Redesign sidebar with section headers and fix slug collision with deleted items
Sidebar now has "Collections" and "Agent" section headers with visual
distinction. Drag handles appear on hover for reorderable collections.
Also fixed uniqueSlug to check all rows including soft-deleted when
generating slugs, preventing UNIQUE constraint violations when creating
items with names matching archived items.
2026-03-26 23:55:47 +00:00