Skip to content

feat(board): rich task execution, shared component library, and phase-based workflows#66

Open
siracusa5 wants to merge 5 commits intomainfrom
feat/aperant-board-replication
Open

feat(board): rich task execution, shared component library, and phase-based workflows#66
siracusa5 wants to merge 5 commits intomainfrom
feat/aperant-board-replication

Conversation

@siracusa5
Copy link
Copy Markdown
Collaborator

@siracusa5 siracusa5 commented Mar 30, 2026

Summary

  • Task execution engine: Phase-based task runner with Claude CLI spawning, log streaming, subtask management, and 4 built-in agent profiles (auto/complex/balanced/quick)
  • Extended board-server: New types (Subtask, PhaseConfig, TaskExecution, AgentProfile), HTTP endpoints (subtasks, execution, logs, profiles), WebSocket events (execution/phase/log streaming), Project v2 schema with migration script
  • Shared component library (@harness-kit/board-ui): Consolidates all board UI into a single package — both web and desktop apps import from it, eliminating duplication
  • Rich task management UX: Description-first task creation, agent profile selector, per-phase model config, tabbed detail panel (Overview/Subtasks/Logs/Comments), progress bars, phase indicators, run/stop controls, subtask checklists, terminal log viewer
  • Dark theme polish: Near-black OLED palette, yellow-green CTA accent, card hover glow, running task pulse animations
  • Security hardening: Localhost-only binding, CORS strict matching, slug validation, input validation, WebSocket origin check, payload limits, log size caps, error message sanitization

Architecture

Previously, apps/board/ and apps/desktop/ maintained separate copies of board components. This PR creates packages/board-ui/ with a configurable API client (configureBoardApi(baseUrl)) and shared Tailwind components. Both apps now use thin re-export shims — any board feature added once appears in both web and desktop automatically.

Test plan

  • pnpm -F board-server test — 221 tests pass (8 files)
  • pnpm -F @harness-kit/board-ui test — 44 tests pass (6 files)
  • pnpm -F harness-kit-desktop test — 573 tests pass (39 files)
  • pnpm -F board-server build — TypeScript compiles clean
  • pnpm -F harness-board build — Next.js production build passes
  • Visual smoke test: open desktop app, verify task creation dialog, card progress indicators, detail panel tabs
  • Security review: all findings addressed (see fix commit)

🤖 Generated with Claude Code

siracusa5 and others added 4 commits March 30, 2026 11:23
…ent library

- Add execution engine: task runner with phase detection, log streaming,
  subtask CRUD, agent profiles (auto/complex/balanced/quick)
- Extend board-server types with Subtask, PhaseConfig, TaskExecution,
  AgentProfile; bump Project to v2
- Add HTTP endpoints: subtasks, execution start/stop, log tailing, profiles
- Add WebSocket events: execution started/stopped, phase changed, log lines
- Create @harness-kit/board-ui shared package consolidating all board
  components, hooks, context, and configurable API client
- Rewrite TaskForm: description-first flow, worktree isolation banner,
  agent profile selector, phase config grid, classification fields
- Rewrite TaskDetailPanel: 520px tabbed layout (Overview/Subtasks/Logs/Comments),
  run/stop controls, phase timeline, subtask checklist, log viewer
- Enhance TaskCard: progress bars, phase step indicators, subtask dots,
  execution phase badge, running pulse animation
- Enhance DroppableColumn: colored header borders, rich empty states
- Apply Aperant dark theme: near-black palette, #D6D876 CTA accent
- Rewire both apps/board and apps/desktop to import from shared package,
  eliminating component duplication between web and desktop

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…and desktop

board-server (86 new tests across 5 files):
- subtasks.test.ts: yaml-store subtask CRUD + HTTP route tests
- log-store.test.ts: log file append, tail, and directory creation
- profiles.test.ts: agent profile listing, lookup, default config
- execution-routes.test.ts: execution/stop/logs/profiles HTTP endpoints
- migrate-v2.test.ts: v1→v2 migration (priority, worktree, defaults)
- Fix existing tests for version 2 and use_worktree rename

board-ui (44 tests across 6 files):
- api.test.ts: configurable base URL, endpoint URL construction, error handling
- useWebSocket.test.ts: WS URL derivation from configured base
- useBoardData.test.ts: fetch lifecycle, ready gate, error states
- TaskCard.test.tsx: rendering with priorities, subtasks, execution state
- TaskForm.test.tsx: description-first layout, validation, submission
- TaskDetailPanel.test.tsx: tabbed layout, run/stop controls

desktop (23 tests across 3 files):
- BoardKanbanPage.test.tsx: full page rendering with mocked data
- board-api-config.test.ts: re-export shim configures correct base URL
- re-exports.test.ts: all 9 component shims resolve correctly

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Bind to 127.0.0.1 by default (prevents network exposure)
- Fix CORS: strict regex matching instead of startsWith (blocks localhost.evil.com)
- Add slug validation middleware: reject path traversal in route params
- Add numeric ID validation for taskId/epicId/subtaskId params
- Add enum validation for status, priority, and epic status fields
- Sanitize error messages: return err.message only, no stack traces
- Add WebSocket origin validation via verifyClient callback
- Set WebSocket maxPayload to 64KB
- Set express.json limit to 1MB
- Add 50MB per-task log size cap to prevent unbounded disk growth
- Validate image IDs against UUID format before filesystem lookup
- Add TaskRunner.stopAll() for clean process cleanup on shutdown
- Register shutdown handler that kills orphaned Claude processes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Critical:
- Replace hardcoded fetch() in TaskDetailPanel with api.execution.*
  and api.subtasks.* — fixes desktop runtime bug where relative URLs
  resolved against tauri://localhost instead of board-server

Important:
- Fix runner stop/exit race: track manually stopped processes to prevent
  exit handler from overwriting 'cancelled' status with 'completed'
- Remove phases:[] overwrite on phase transitions that was resetting
  phase history
- Fix useBoardData loading state: initialize to `ready` param value
  to prevent flash of "not found" before loading kicks in

Suggestions:
- Replace local Subtask interfaces in ProgressDots and SubtaskList
  with import from shared api types
- Improve ANSI strip regex in LogViewer to handle all escape sequences

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@siracusa5 siracusa5 changed the title feat(board): replicate AutoClaude board with shared component library feat(board): board with shared component library Mar 30, 2026
@siracusa5 siracusa5 changed the title feat(board): board with shared component library feat(board): rich task execution, shared component library, and phase-based workflows Mar 30, 2026
…redesign

- Rewrite TaskCard: p-4 padding, semibold title, colorful badge fills,
  PhaseProgressIndicator (progress bar + subtask dots + phase steps),
  footer with Clock+time and action buttons (Start/Stop/Archive + context menu)
- Create PhaseProgressIndicator: consolidated from ProgressBar+ProgressDots+
  PhaseStepsIndicator with framer-motion animations matching reference
- Rewrite DroppableColumn: 320px min-width, 16px radius, chevron collapse,
  pill count badge, 3px colored top border, empty state with bounce animation
- Create UI primitives: Card, Badge (9 variants), Button (5 variants),
  DropdownMenu, Checkbox — matching reference component API
- Update CSS: Inter font, --card/--foreground/--primary token aliases,
  --radius-xl system, empty-bounce/subtask-dot-pulse/status-running-pulse
  animations, improved card hover with cubic-bezier timing
- Mirror all CSS changes to desktop app.css

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant