Commit Graph

178 Commits

Author SHA1 Message Date
Lukas May
fcf822363c feat: Add persistent chat sessions for iterative phase/task refinement
Introduces a chat loop where users send instructions to an agent that
applies changes (create/update/delete phases, tasks, pages) and stays
alive for follow-up messages. Includes schema + migration, repository
layer, chat prompt, file-io action field extension, output handler chat
mode, revert support for deletes, tRPC procedures, events, frontend
slide-over UI with inline changeset display and revert, and docs.
2026-03-04 10:14:28 +01:00
Lukas May
d6fb1abcba fix: Add missing Instrument Serif font files and @font-face declarations
font-display class referenced Instrument Serif but no font was loaded,
causing fallback to condensed Georgia serif.
2026-03-04 10:14:06 +01:00
Lukas May
2948eb1139 feat: Add tiptap editor for task descriptions in slide-over panel
- Add updateTask tRPC mutation (name, description fields)
- Replace static description with TiptapEditor in TaskSlideOver
- Auto-detect existing markdown descriptions and convert to tiptap JSON
- Debounced auto-save with flush on close/unmount
- Saving indicator in header
2026-03-04 09:06:44 +01:00
Lukas May
38be28e443 fix: Widen task slide-over panel to max-w-2xl (672px) 2026-03-04 08:51:37 +01:00
Lukas May
095b23a825 fix: Widen task slide-over panel from max-w-md to max-w-xl 2026-03-04 08:33:48 +01:00
Lukas May
b223427bd3 fix: Use fixed-position slide-over and render markdown descriptions with tiptap
- Switch TaskSlideOver from absolute to fixed positioning so it overlays
  the viewport instead of fighting with phase panel scroll
- Render task descriptions as rich HTML via markdownToSafeHtml (markdown
  → tiptap JSON → HTML roundtrip) with prose typography classes
- Move TaskSlideOver render to ExecutionProvider level in ExecutionTab
- Remove unnecessary relative overflow-hidden wrapper from PhaseDetailPanel
- Export markdownToSafeHtml from markdown-to-tiptap utility
2026-03-04 08:08:53 +01:00
Lukas May
2d15dcf368 feat: Replace task modal with slide-over panel and enrich task nodes
- Add category color mapping utility (lib/category.ts)
- Enhance TaskNode to 2-line layout with category badge, priority, blocked count
- Create TaskSlideOver panel that animates in from right within phase detail
- Remove centered TaskModal/TaskDetailModal in favor of contextual slide-over
- Update PipelineTab to also use TaskSlideOver
2026-03-04 08:01:48 +01:00
Lukas May
5a5d48aecc feat: Swap display font from Plus Jakarta Sans to Instrument Serif
Plus Jakarta Sans was too similar to Geist Sans — invisible difference.
Instrument Serif creates strong serif/sans contrast for headings, making
typographic hierarchy immediately obvious.
2026-03-04 08:01:04 +01:00
Lukas May
4e04863e32 feat: Polish pass — display font on headings, empty states, card interactivity, panel dividers
- Apply font-display (Plus Jakarta Sans) to all page h1/h2 headings
- Wire interactive Card prop on initiative cards and agent cards
- Redesign empty states with icons: agents (Users), inbox (Inbox/MessageSquare), right panels (Terminal)
- Unify initiative detail tabs to border-b-2 indicator style matching settings
- Strengthen two-panel dividers on agents and inbox pages (lg:border-r)
- Clean up filter pill badges — replace nested Badge with simpler span
- Increase PhaseAccordion spacing for better readability
- Fix error state styling in settings to use status tokens
- Increase settings/projects section spacing
2026-03-04 07:52:22 +01:00
Lukas May
2b62160c95 fix: Polish settings pages — display font, status tokens, spacing
Apply font-display to headings across settings layout and health page.
Replace text-destructive with text-status-error-fg for consistency with
the design system status tokens. Increase projects page section spacing
from space-y-4 to space-y-6.
2026-03-04 07:50:30 +01:00
Lukas May
7e60cbfff9 feat: Premium design overhaul — typography, atmosphere, animations, component polish
- Add Plus Jakarta Sans as display font for headings
- Add subtle noise texture overlay + indigo radial gradient for depth
- New keyframe animations: glow-pulse, fade-in-up, scale-in, slide-in-right
- Card: interactive hover-lift + selected ring variants
- Button: scale micro-interactions, destructive glow, transition-all
- Header: logo upgrade with wordmark, animated nav indicator bar, glass search button, gradient shadow depth
- StatusDot: glow halos per status variant (active/success/error/warning/urgent)
- HealthDot: glow effects for connected/disconnected/reconnecting states
- Card hover-lift and status glow CSS utilities
2026-03-04 07:30:06 +01:00
Lukas May
dd86f12057 feat: Add page-level entrance animations using motion library
Subtle fade-in + y-offset animations on mount for all main pages
(initiatives list, initiative detail, agents, inbox) and staggered
card animations for initiative and agent lists.
2026-03-04 07:28:53 +01:00
Lukas May
af092ba16a feat: Add task execution graph within phase detail panel
Tasks are now grouped by dependency depth using the same
groupPhasesByDependencyLevel utility. Parallel tasks are wrapped in dashed
containers, sequential layers connected by status-aware lines. Replaces
the flat TaskRow list and DependencyIndicator callout bars.
2026-03-04 07:20:44 +01:00
Lukas May
9f88d5b433 feat: Replace flat phase sidebar with vertical execution graph
Phases are now grouped by dependency depth using groupPhasesByDependencyLevel.
Single-phase layers render as compact nodes, multi-phase layers are wrapped in
a dashed "PARALLEL" container. Connectors between layers turn green when prior
layers are all completed. Staggered entrance animation per layer.
2026-03-04 05:44:23 +01:00
Lukas May
6a9d9e3452 feat: Redesign task and phase dependency display in plans tab
Replace plain text dependency indicators with visual, status-aware components:
- New DependencyChip/PhaseNumberBadge components with status-colored styling
- Sidebar shows compact numbered circles for phase deps instead of text
- Detail panel uses bordered cards with phase badges and status indicators
- Task dependency callout bars with resolved/total counters
- Collapse mechanism for tasks with 3+ dependencies (+N more button)
- Full dark mode support via semantic status tokens
2026-03-04 05:28:11 +01:00
Lukas May
9e7c246280 fix: Switch auto-spawn from discuss to refine agent, surface in UI
The auto-spawned agent on initiative creation was using discuss mode
(Q&A) when it should use refine mode (expand content). Now:

- Description seeds root page as tiptap content (split on double newlines)
- Spawns refine agent with the populated page in inputContext
- getActiveRefineAgent broadened to also surface discuss agents (for
  CLI-spawned discuss agents)
- RefineAgentPanel shows mode-appropriate label for discuss vs refine
2026-03-03 14:25:43 +01:00
Lukas May
3d04cb2081 fix: Surface active architect agents in initiative activity state
Auto-spawned discuss/plan/refine agents were invisible because:
1. listInitiatives only filtered for mode='detail' agents
2. deriveInitiativeActivity returned 'idle' for zero phases before
   checking for active agents

Broadened agent filter to all architect modes (discuss, plan, detail,
refine), moved active agent check before zero-phases early return, and
added 'discussing'/'refining' activity states with pulsing indicators.
2026-03-03 14:12:20 +01:00
Lukas May
9b91ffe0e5 fix: Persist and expose task dependencies from detail output
Detail agents define task dependencies in YAML frontmatter but they were
silently dropped — never written to the task_dependencies table. This
caused all tasks to dispatch in parallel regardless of intended ordering,
and the frontend showed no dependency information.

- Add fileIdToDbId mapping and second-pass dependency creation in
  output-handler.ts (mirrors existing phase dependency pattern)
- Add task_dependency to changeset entry entityType enum
- Add listPhaseTaskDependencies tRPC procedure for batch querying
- Wire blockedBy in PhaseDetailPanel and PhaseWithTasks from real data
- Clarify dependency semantics in detail prompt
2026-03-03 13:46:29 +01:00
Lukas May
86a1912959 feat: Add description field and auto-spawn discuss agent on initiative creation 2026-03-03 13:40:37 +01:00
Lukas May
3e678f2591 fix: Show detailing indicator by including detail tasks in listInitiativeTasks
listInitiativeTasks was filtering out detail tasks server-side, so the
detailAgentByPhase mapping could never resolve agent.taskId to a phaseId.
Move the filter to client-side (displayTasks) so detail tasks are available
for agent mapping but excluded from counts and display grouping.
2026-03-03 13:25:29 +01:00
Lukas May
0ab7b54ad7 feat: Show detailing status in pipeline tab phase groups
Thread detail agent info through PipelineGraph → PipelineStageColumn →
PipelinePhaseGroup. Phase groups now show spinner + "Detailing…" when a
detail agent is active and "Review changes" when finished with no tasks.
2026-03-03 13:13:07 +01:00
Lukas May
411700d37d feat: Show detailing status in initiative overview and phase sidebar
Add 'detailing' activity state derived from active detail agents
(mode=detail, status running/waiting_for_input). Initiative cards show
pulsing "Detailing" indicator. Phase sidebar items show spinner during
active detailing and "Review changes" when the agent finishes.
2026-03-03 13:08:05 +01:00
Lukas May
96386e1c3d feat: Replace initiative card N+1 queries with server-computed activity indicator
listInitiatives now returns an activity object (state, activePhase, phase
counts) derived server-side from phases, eliminating per-card listPhases
queries. Initiative cards show a StatusDot with pulse animation + label
instead of a static StatusBadge. Removed redundant View and Spawn Architect
buttons from cards. Added variant override prop to StatusDot.
2026-03-03 12:49:07 +01:00
Lukas May
b74b59b906 fix: Align subscription status mapping with tRPC state machine
tRPC subscriptions use connecting/pending/error/idle — not success.
The old code mapped pending→isConnecting and waited for success (which
never fires), causing AgentOutputViewer to permanently show "Connecting...".

Now: connecting→isConnecting, pending→isConnected, idle→disconnected.
2026-03-03 12:46:19 +01:00
Lukas May
1043079a08 feat: Persist agents page filter in URL query params, default to questions 2026-03-03 12:42:32 +01:00
Lukas May
2f2ad6eb95 feat: Add remove account button to health page UI 2026-03-03 12:08:48 +01:00
Lukas May
04c212da92 feat: Implement v2 design system with indigo brand, dark mode, and status tokens
Complete frontend design overhaul replacing achromatic shadcn/ui defaults with
an indigo-branded (#6366F1), status-aware, dark-mode-enabled token system.

Phase 1 — Theme Foundation:
- Replace all CSS tokens in index.css with v2 light/dark mode values
- Add 24 status tokens (6 statuses × 4 variants), 22 terminal tokens,
  7 diff tokens, 5 shadow tokens, 9 transition/animation tokens,
  10 z-index tokens, 10-step extended indigo scale
- Install Geist Sans/Mono variable fonts (public/fonts/)
- Extend tailwind.config.ts with all new token utilities
- Add dark mode flash-prevention script in index.html
- Add status-pulse and shimmer keyframe animations
- Add global focus-visible styles and reduced-motion media query

Phase 2 — ThemeProvider + Toggle:
- ThemeProvider context with system preference listener
- 3-state ThemeToggle (Sun/Monitor/Moon)
- Radix tooltip primitive for tooltips
- localStorage persistence with 'cw-theme' key

Phase 3 — Shared Components + Token Migration:
- StatusDot: mapEntityStatus() maps raw statuses to 6 semantic variants
- StatusBadge: uses status token bg/fg/border classes
- Badge: 6 new status variants + xs size
- EmptyState, ErrorState, SaveIndicator shared patterns
- CommandPalette: Cmd+K search with fuzzy matching, keyboard nav
- Skeleton with shimmer animation + SkeletonCard composite layouts
- KeyboardShortcutHint, NavBadge, enhanced Sonner config
- Migrate ALL hardcoded Tailwind colors to token classes across
  AgentOutputViewer, review/*, ProgressBar, AccountCard,
  InitiativeHeader, DependencyIndicator, PipelineTaskCard,
  PreviewPanel, ChangeSetBanner, MessageCard, PhaseDetailPanel

Phase 4 — App Layout Overhaul:
- Single 48px row header with CW logo, nav with NavBadge counts,
  Cmd+K search button, ThemeToggle, HealthDot
- Remove max-w-7xl from header/main; pages control own widths
- ConnectionBanner for offline/reconnecting states
- BrowserTitleUpdater with running/questions counts
- useGlobalKeyboard (1-4 nav, Cmd+K), useConnectionStatus hooks
- Per-page width wrappers (initiatives max-w-6xl, settings max-w-4xl)

Phase 5 — Page-Level Token Migration:
- ReviewSidebar: all hardcoded green/orange/red → status/diff tokens
- CommentThread: resolved state → status-success tokens
- Settings health: green → status-success-dot
2026-03-03 11:43:09 +01:00
Lukas May
34578d39c6 refactor: Restructure monorepo to apps/server/ and apps/web/ layout
Move src/ → apps/server/ and packages/web/ → apps/web/ to adopt
standard monorepo conventions (apps/ for runnable apps, packages/
for reusable libraries). Update all config files, shared package
imports, test fixtures, and documentation to reflect new paths.

Key fixes:
- Update workspace config to ["apps/*", "packages/*"]
- Update tsconfig.json rootDir/include for apps/server/
- Add apps/web/** to vitest exclude list
- Update drizzle.config.ts schema path
- Fix ensure-schema.ts migration path detection (3 levels up in dev,
  2 levels up in dist)
- Fix tests/integration/cli-server.test.ts import paths
- Update packages/shared imports to apps/server/ paths
- Update all docs/ files with new paths
2026-03-03 11:22:53 +01:00