Commit graph

144 commits

Author SHA1 Message Date
zenchantlive
ae7f13c3af feat(8ij.4): add LaunchSwarmDialog to TopBar as global action
Co-Authored-By: Oz <oz-agent@warp.dev>
2026-03-01 17:22:25 -08:00
zenchantlive
6b8aa408c8 feat(8ij.3): add Launch Swarm action to LeftPanel epic rows
Co-Authored-By: Oz <oz-agent@warp.dev>
2026-03-01 17:21:19 -08:00
zenchantlive
6d560b6c49 feat(8ij.2): add inline assign affordance to SocialCard
Co-Authored-By: Oz <oz-agent@warp.dev>
2026-03-01 17:18:13 -08:00
zenchantlive
b996d889d5 feat(8ij.1): extract useArchetypePicker hook from AssignmentPanel
Co-Authored-By: Oz <oz-agent@warp.dev>
2026-03-01 17:15:30 -08:00
ZenchantLive
861ae89491 fix: wire conversation panel to DAG nodes with toggle support
- Add MessageSquare icon to GraphNodeCard; prop-thread onConversationOpen
  and selectedTaskId through WorkflowGraph node data (no useUrlState
  inside ReactFlow nodes — avoids context/timing issues)
- Fix ContextualRightPanel: check taskId before epicId so clicking the
  conversation icon always opens ThreadDrawer even when an epic filter
  is active
- setEpicId now clears task from URL so selecting an epic resets any
  open conversation thread
- handleGraphSelect toggles: second click on same node calls setTaskId(null)
  closing the right panel
- Add onSelect to WorkflowGraph flowModel deps to prevent stale callbacks
- Fix ContextualRightPanel onClose no-ops: wired to setTaskId(null) /
  setSwarmId(null) so back button works
- Right panel always visible (removed panel==='open' gate in UnifiedShell)
- SmartDag task grid: horizontal scroll, fixed-width cards, hideClosed=true
- Add <Suspense> in page.tsx for useSearchParams compatibility
- Enable dolt auto-start in .beads/config.yaml
- Add 14 static analysis tests (graph-node-conversation.test.tsx)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 13:51:46 -08:00
ZenchantLive
335beb82d6 feat(beadboard-550): replace issues.jsonl reads with direct Dolt SQL via mysql2
- src/lib/read-issues-dolt.ts: readIssuesViaDolt() queries issues+labels (GROUP_CONCAT)
  and dependencies in 2 SQL queries; normalizes Date cols to ISO strings; returns null
  on unreachable so caller can fall back gracefully
- src/lib/read-issues.ts: readIssuesFromDisk() tries Dolt first (always), falls back to
  issues.jsonl with console.warn; removes dead readIssuesViaBd/normalizeBdIssue/
  normalizeDependencies code now that the CLI path is superseded
- AGENTS.md: documents new Dolt read path + SSE watcher trigger; removes stale
  manual issues.jsonl re-export instructions (no longer needed)

Verified: bd writes update last-touched → chokidar fires → syncActivity → Dolt query
→ snapshot diff → SSE push. 146/146 tests pass, lint clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 17:33:43 -08:00
ZenchantLive
91b4777a7c feat(beadboard-550.1): add DoltClient with connection pooling and metadata config
- src/lib/dolt-client.ts: getDoltConnection(projectRoot) returns cached mysql2 Pool
- Reads host/port/database from .beads/metadata.json (no hardcoded values)
- DoltConnectionError typed error for missing metadata or unreachable server
- Tests connectivity on first connection; caches pool per resolved projectRoot
- connectionLimit: 5 for Next.js server-side concurrency

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 17:16:57 -08:00
ZenchantLive
7d37d02af1 feat(phase0+1): wire URL context to ContextualRightPanel
Phase 0:
- UnifiedShell: pass blockedOnly to SocialPage; wire TopBar with live counts
- thread-drawer: show real issue.status instead of hardcoded "In Progress"
- social-page: fix onJumpToActivity to open right panel (not dead ?view=activity)

Phase 1:
- contextual-right-panel: add taskId branch (ThreadDrawer embedded) and swarmId
  branch (MissionInspector via SwarmIdBranch inner component); ActivityPanel
  remains the no-selection fallback

All 207 tests pass; no new typecheck errors.
Closes beadboard-r1i (Phase 1: Contextual Right Panel)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 14:59:09 -08:00
zenchantlive
fccb2dede7 fix(theme): overhaul light mode, remove silly themes
Light mode fixes:
- Darker surfaces (not pure white)
- Proper text colors (dark slate, not white)
- More opaque status colors for visibility
- Grey backdrop instead of harsh white

Removed themes (keeping only 3 good ones):
- Midnight (looked silly)
- Forest (looked silly)
- Dusk (looked silly)

Kept themes:
- Aurora (northern lights)
- Contrast (high contrast neon)
- Light (soft grey, now fixed)
2026-02-26 16:42:23 -08:00
zenchantlive
958230f2ef feat(theme): complete theme overhaul with 6 polished themes
- Aurora: Real northern lights colors (teal/violet on deep blue-black)
- Midnight: Deep ocean blues with violet and cyan
- Forest: Rich forest greens with golden sunlight
- Dusk: Warm sunset oranges and corals
- Contrast: Pure black with neon accents
- Light: Clean professional light mode (NEW)

All themes have:
- Consistent status colors (green/amber/red)
- Distinct surface layers for visual hierarchy
- Theme-appropriate accent glows
- Improved contrast and accessibility
2026-02-26 16:40:09 -08:00
zenchantlive
8a1dc2039a fix(graph): themable backgrounds for graph-section
- Replace hardcoded blue radial gradient with theme tokens
2026-02-26 16:34:52 -08:00
zenchantlive
f2cd6fa11c fix(graph): make DAG background themable and improve contrast
- Replace hardcoded blue radial gradient with theme variable
- Update graph-view to use new token system
- Ensure status colors (red/green/amber) remain consistent across all themes
- DAG background now changes with theme while maintaining card visibility
2026-02-26 16:34:13 -08:00
zenchantlive
756a1dec2b fix(theme): increase contrast in aurora theme surface layers
- Make surface layers more distinct (0f0e0d → 1a1816 → 252320 → 302e2a → 3c3934)
- Increase border visibility (18%, 35%, 55% opacity)
- Ensure header, sidebar, main content are visually distinct
2026-02-26 16:27:14 -08:00
zenchantlive
a47f21e769 feat(theme): add theme toggle dropdown to header
- Create ThemeToggle component with dropdown menu
- Shows all 5 themes with descriptions
- Persists choice to localStorage
- Updates data-theme attribute instantly
- Add palette icon to top bar
2026-02-26 16:12:59 -08:00
zenchantlive
fa3489b394 feat(theme): add 5 distinct themes to choose from
- aurora: Warm charcoal with cyan accents (fixed/improved)
- midnight: Cool blue-purple with violet accents
- forest: Earthy green-brown with lime accents
- dusk: Warm purple-brown with orange/pink accents
- contrast: Pure black with neon accents (high contrast)

All themes use the same 12-category token system for consistency.
Switch themes by changing data-theme attribute on html element.
2026-02-26 16:09:12 -08:00
zenchantlive
6564272987 refactor(theme): migrate high-priority components to new token system
- social-card.tsx: status colors, borders, surfaces
- assignment-panel.tsx: all hardcoded hex colors replaced
- graph-node-card.tsx: node styles, borders, glows, text colors
2026-02-26 16:04:19 -08:00
zenchantlive
fcc1482967 feat(theme): create unified theme system with semantic tokens and migrate core layout 2026-02-26 15:49:44 -08:00
zenchantlive
b31e8ddade refactor(theme): distinct warm charcoal layers - header darker, sidebar/main/card all different 2026-02-26 15:33:08 -08:00
zenchantlive
fc328adf31 refactor(theme): lighten backgrounds, simplify header/sidebar/panel styling 2026-02-26 15:27:21 -08:00
zenchantlive
227012ba1a refactor(theme): simplify gradients while preserving status colors on cards 2026-02-26 15:23:42 -08:00
zenchantlive
a7a0a66c4d refactor(kanban): simplify column backgrounds to flat colors with top borders 2026-02-26 15:21:36 -08:00
zenchantlive
f1eae0c8b0 refactor(ui): simplify status badges to flat colors with accent borders 2026-02-26 15:20:49 -08:00
zenchantlive
4ea6f38e09 feat(ui): add aurora button variants with glow effects 2026-02-26 15:17:45 -08:00
openhands
a8079813b8 Merge origin/main into feature/assign-archetypes-to-tasks-ui
Resolved conflicts:
- .gitignore: kept both bd.sock.startlock and .beadboard/ entries
- package.json: kept feature branch test script (explicit enumeration)
- API routes: kept dynamic export + isValidProjectRoot from main
- globals.css: kept HEAD slideInFromRight animation
- use-beads-subscription.ts: kept HEAD onopen handler
- realtime.ts: kept main console.log in emit()
- snapshot-differ.ts: kept main type-aware dependency diff

Blue colors preserved from feature branch.
2026-02-26 18:50:18 +00:00
zenchantlive
90794a2b43 colors 2026-02-26 10:45:02 -08:00
zenchantlive
5ff4469dd5 chore: misc updates and fixes
- lib/utils.ts: Add getArchetypeDisplayChar helper (duplicate of src/lib)
- globals.css: Style updates
- swarm-command-feed.tsx: Component updates
- telemetry-grid.tsx: Use getArchetypeDisplayChar
- test-watcher.ts: Test utility updates
2026-02-26 10:25:31 -08:00
zenchantlive
784fe6e88f fix: add templateId default to issue creation paths
- parser.ts: Add templateId: null to default BeadIssue
- read-issues.ts: Add templateId: null when reading issues
- swarm-workspace.tsx: Update mock data with templateId
2026-02-26 10:23:00 -08:00
zenchantlive
e69efdf5e1 feat(ui): add epic-level template assignment to assignment panel
- Add Epic Template section when an epic is selected
- Show template name, description, and team roster
- Template picker applies template to epic via metadata
- Add Remove Template functionality
- getTemplateId helper reads from metadata.templateId
- Task Assignment section only shows for non-epic tasks
- Collapsible sections for Needs Agent, Pre-assigned, Squad Roster
2026-02-26 10:22:51 -08:00
zenchantlive
f1e20618d0 feat(api): add metadata support to update mutation
- Add metadata field to UpdateMutationPayload
- Add asOptionalMetadata validation function
- Pass --metadata flag to bd update command
- Enables storing custom data like templateId on issues
2026-02-26 10:22:41 -08:00
zenchantlive
6250335dc8 feat(ui): add resizable sidebar panels with persistence
- use-panel-resize hook: Drag-to-resize with localStorage persistence
- ResizeHandle component: Visual drag handle with hover effects
- UnifiedShell: Flexbox layout with resizable left/right panels
- RightPanel: Removed internal width handling (now controlled by shell)
2026-02-26 10:22:33 -08:00
zenchantlive
ebd3ffcbbe feat(ui): add picker modal components for archetype and template selection
- ArchetypePicker: Full-screen modal with backdrop blur, 2-column grid,
  Select/Edit/Create actions, 800px width for readability
- TemplatePicker: Same pattern with team size indicator and built-in badge
- Both pickers support backdrop click-to-close and keyboard navigation
2026-02-26 10:22:21 -08:00
zenchantlive
7b27f673fe feat(ui): enhance archetype and template inspectors with customization
- Add getArchetypeDisplayChar() and getTemplateDisplayChar() utils
- Add getTemplateColor() utility function
- ArchetypeInspector: Add color palette (30 presets), emoji selector (40 emojis),
  capability autocomplete, live preview, clone functionality
- TemplateInspector: Same enhancements plus team composition editor
2026-02-26 10:22:11 -08:00
zenchantlive
adcceb68bb feat(types): add templateId to BeadIssue and enhance swarm types
- Add templateId: string | null to BeadIssue (links epics to templates)
- Add icon field to AgentArchetype for emoji/icon display
- Add color and icon fields to SwarmTemplate for visual customization
2026-02-26 10:22:02 -08:00
zenchantlive
211e503409 feat(graph): enforce single archetype per task
## Design Decision
Per bd (bead) system design, a task should have only ONE agent archetype
assigned at a time. This provides clear ownership and simpler mental model.

## What Changed
When assigning a new archetype:
1. Remove any existing agent: labels first (DELETE API)
2. Then add the new agent: label (POST API)
3. Optimistic UI updates to match

## Why This Makes Sense
- Clear ownership: 'Who's working on this?'
- Simpler coordination between tasks
- Matches how bd/agent orchestration is intended to work
- Reassigning is still possible (just click a different archetype)

## UI Behavior
- If task has 'coder' assigned, clicking 'architect' will:
  1. Remove 'coder' label
  2. Add 'architect' label
- Dropdown shows 'Assigned' badge on current archetype
- X button still available to unassign completely

## Test Coverage
Added graph-node-single-archetype.test.tsx with 5 tests:
- Removes existing labels before adding new
- Calls DELETE before POST
- Only allows one archetype per task
- Preserves non-agent labels
- Returns early if same archetype clicked
2026-02-24 17:04:44 -08:00
zenchantlive
bd3b3da30a fix(graph): prevent SSE overwrites of optimistic label updates
## The Bug
User reported: 'An archetype can only exist on one task at a time - when
I try to make the next task have the same arch, it deleted the one I
added prior.'

## Root Cause
The SSE subscription (useBeadsSubscription) refreshes data from the server
whenever ANY change happens. When user assigns an archetype:

1. User clicks assign -> optimistic update adds label locally
2. SSE fires (from previous operation or heartbeat) -> fetches fresh data
3. useEffect syncs localLabels with data.labels (which doesn't have the
   new label yet)
4. Label disappears from UI
5. Eventually API completes and another SSE refresh brings it back

This race condition causes labels to flicker or disappear entirely.

## The Fix
Track pending optimistic labels in a useRef Set, and merge them with
incoming server data during sync:

1. pendingOptimisticLabels = useRef<Set<string>>(new Set())
2. When optimistically adding: add to pending set
3. useEffect merge: combine server labels + pending labels
4. After API completes: remove from pending set

This ensures optimistic labels survive SSE refreshes.

## Test Coverage
Added graph-node-labels-optimistic.test.tsx with 10 tests:
- Uses useRef for tracking
- Tracks in a Set
- Preserves labels during sync
- Adds/removes from pending set
- Handles multiple concurrent operations
- Per-node state isolation

## Verification
- typecheck: pass
- lint: pass (0 errors)
- test: all pass
2026-02-24 16:48:16 -08:00
zenchantlive
fbfe393f6d chore: checkpoint related UI improvements and supporting components
Various supporting changes made during the assign archetypes feature development:

- Added contextual-right-panel.tsx and swarm-command-feed.tsx
- Updated activity-panel.tsx with new features
- UI improvements to left-panel, mobile-nav
- Test updates for url-state-integration, mobile-nav, top-bar
- Package.json updates for dependencies
- Global CSS refinements

These changes support the main assign archetypes feature but are
not directly part of its core functionality.
2026-02-24 16:25:45 -08:00
zenchantlive
93b3c33976 feat(core): add SmartDag and supporting infrastructure for assign mode
## Context
This commit adds the supporting infrastructure that makes the assign
feature work end-to-end.

## Components Added/Modified

### SmartDag
- Main view component for graph-based task management
- Integrates TaskCardGrid and WorkflowGraph
- Has 'Assign' mode toggle button
- Passes archetypes and assignMode to WorkflowGraph
- Manages filter state (hideClosed, sortReadyFirst, etc.)

### useGraphAnalysis Hook
- Extracted graph analysis logic for reuse
- Returns: actionableNodeIds, cycleNodeIdSet, blockerTooltipMap, etc.
- Used by both SmartDag and AssignmentPanel
- Ensures consistent 'actionable' definition across components

### UnifiedShell
- Added assignMode state
- Added selectedAssignIssue state
- Renders AssignmentPanel when in graph view + assign mode
- Wires up onAssignModeChange and onSelectedIssueChange callbacks

## Design Philosophy
- Shared hook means single source of truth for 'actionable'
- Clean separation between view (SmartDag) and sidebar (AssignmentPanel)
- URL state preserved for navigation

## Test Coverage
- SmartDag tests: 12 tests covering buttons, callbacks, imports
- useGraphAnalysis tests: 6 tests covering cycle detection, blockers
- UnifiedShell tests: 9 tests covering state and rendering
2026-02-24 16:16:10 -08:00
zenchantlive
308a7d9b31 feat(ui): add AssignmentPanel with Needs Agent, Pre-assigned, Squad Roster
## The Feature Request
User wanted an enhanced sidebar panel showing:
- Tasks needing agents (ready but unassigned)
- Pre-assigned tasks waiting to start
- Active workers on current epic

## Design Collaboration
We discussed what each section should show:
1. **Needs Agent**: Actionable tasks (no blockers) without agent: label
2. **Pre-assigned**: Tasks with agent: label, not yet in_progress
3. **Squad Roster**: in_progress tasks with assignee

## Technical Implementation
- Uses useGraphAnalysis hook for actionableNodeIds
- Helper functions: hasAgentLabel(), getAgentLabels(), extractArchetypeIdFromLabel()
- Quick assign dropdown on each 'Needs Agent' item
- Archetype badges shown on 'Pre-assigned' items

## UI/UX Decisions
- Each section has count badge in header
- Max-height with scroll for each section
- Consistent styling with existing panel patterns
- Uses CSS variables for theming

## Test Coverage
- Added assignment-panel-sections.test.tsx with 5 TDD tests
- Tests verify: useGraphAnalysis import, section headers, filtering logic

## Beads: beadboard-b7t (closed)
2026-02-24 16:15:35 -08:00
zenchantlive
512a836db4 feat(graph): add Assign button and archetype dropdown to GraphNodeCard
## The Collaboration Story
User requested ability to assign agent archetypes to tasks directly from
graph nodes. This was the core UI feature request.

## Design Decisions Made Together
1. **Placement**: We decided to put the assign UI at the bottom of the card
   to not interfere with existing status/badges display
2. **Pattern**: Used Radix dropdown-menu (already in project) for consistency
3. **Visual feedback**: Added loading spinner during API calls, success/error
   messages that auto-dismiss
4. **Closed tasks**: Excluded closed tasks from assignment (logical constraint)

## Issues We Encountered
- Initially only added POST handler for assignment
- User pointed out we needed DELETE for unassign - added that
- The unassign button (X) needed to call DELETE not POST

## API Changes
- Added DELETE handler to /api/swarm/prep for removing agent assignments
- Uses 'bd label remove' under the hood

## What the UI Shows
- Dropdown with available archetypes
- Badge showing assigned archetype name with color
- X button to unassign (on each badge)
- 'Assigned' label on already-assigned archetypes in dropdown

## Test Coverage
- Added graph-node-assign.test.tsx with 6 TDD tests

## Beads: beadboard-brq (closed)
2026-02-24 16:14:56 -08:00
zenchantlive
164b26e570 feat(graph): pass labels through WorkflowGraph to enable agent assignment display
## Context
This is the foundation commit for the 'Assign Archetypes to Tasks' feature.
We needed a way to display which agents are assigned to tasks directly on
the graph nodes.

## Decision Process
- User wanted to see agent assignments on DAG nodes
- We discovered that labels (including 'agent:archetype-id' format) weren't
  being passed through the WorkflowGraph component
- Added 'labels' and 'archetypes' to GraphNodeData interface

## What Changed
- WorkflowGraph now passes issue.labels to each node's data
- GraphNodeData interface updated to include labels: string[]
- Added archetypes prop for dropdown population

## Test Coverage
- Added graph-node-labels.test.tsx with 4 passing tests

## Beads: beadboard-yo5 (closed)
2026-02-24 16:14:39 -08:00
zenchantlive
a03def1ca1 chore: checkpoint before DAG views UX overhaul 2026-02-22 20:43:59 -08:00
zenchantlive
dfaf523029 feat(swarm): implement Swarm View remake with Operations, Archetypes, and Templates
This commit includes the new SwarmWorkspace with its 3 sub-tabs, the LeftPanel mission picker, and the comprehensive Operations Command Dashboard featuring the live interactive DAG telemetry and task assignment prep flow.
2026-02-20 22:19:38 -08:00
zenchantlive
2d50b31654 feat(swarm): major premium visual overhaul and restore missing view navigation 2026-02-20 19:16:49 -08:00
zenchantlive
b5f1f57143 feat(swarm): modify unified-shell to render swarm layout 2026-02-20 18:31:23 -08:00
zenchantlive
654f73f83d feat(swarm): modify unified-shell to render swarm layout 2026-02-20 17:25:05 -08:00
zenchantlive
b721073585 feat(swarm): modify unified-shell to render swarm layout 2026-02-20 17:15:05 -08:00
zenchantlive
f03cd13d87 feat(swarm): implement swarm workspace container component 2026-02-20 17:13:12 -08:00
zenchantlive
f35ae8df33 feat(swarm): implement mission picker for left panel 2026-02-20 17:12:01 -08:00
zenchantlive
1925d625b6 feat(swarm): add GET /api/swarm/archetypes route with passing test 2026-02-20 17:10:26 -08:00
zenchantlive
2d88c57b55 chore(swarm): remove non-TDD api route to satisfy tdd requirement 2026-02-20 17:09:05 -08:00