Commit graph

36 commits

Author SHA1 Message Date
iliya
16f069fae3 feat(graph): enhance task rendering and interaction features
- Updated task opacity logic to simplify conditions.
- Added comment count and unread count badges to task pills for better visibility.
- Improved layout for unassigned tasks, including a section header and overflow badge.
- Enhanced task interaction by restricting drag functionality to member and lead nodes only.
- Introduced new task action event listeners for better task management in the UI.
- Preserved known task change presence across refreshes to maintain state consistency.
2026-03-31 01:29:59 +03:00
iliya
bd242fac5a fix(team): re-add control_response via stdin for teammate permissions
Belt-and-suspenders approach:
1. Settings file: handles all FUTURE calls (teammate finds rule on retry)
2. control_response via stdin: may unblock CURRENT waiting prompt
   (now includes updatedInput: {} which was the previous ZodError fix)

Without #2, approved teammates stay stuck until team restart because
the CLI doesn't hot-reload settings.local.json for pending prompts.
2026-03-30 21:47:40 +03:00
iliya
92968b45ad refactor(graph): simplify comment particle rendering with dedicated bubble function
- Replaced inline drawing logic for task comments with a new `drawCommentBubble` function to enhance readability and maintainability.
- The new function encapsulates the drawing of a speech-bubble icon, including the rounded rectangle body, tail, and inner dots to suggest text.
2026-03-30 20:02:05 +03:00
iliya
485327d077 fix(graph): correct particle direction + remove system message filter
Particle direction:
- Added `reverse` flag to GraphParticle — when true, particle flies
  from target → source (reverse of edge direction)
- Messages FROM teammate TO lead now fly member→lead (was lead→member)
- draw-particles.ts swaps from/to nodes when reverse=true

Reverted system message filter:
- Removed #isSystemMessage — all messages shown as particles again
  (user wants to see idle_notification etc.)
2026-03-30 19:20:53 +03:00
iliya
942588093b fix(graph): pause button as standalone icon left of View dropdown 2026-03-30 19:09:49 +03:00
iliya
b04f82512b fix(graph): team name left-20 to clear macOS traffic lights in fullscreen 2026-03-30 15:42:06 +03:00
iliya
098aa234b2 fix(graph): Fullscreen button clickable — add pointer-events-auto to action bar 2026-03-30 00:05:22 +03:00
iliya
304a2a7f79 feat(graph): enhance GraphControls with settings toggle and improved zoom functionality
- Added a settings toggle to the GraphControls for better user interaction.
- Implemented event listeners to close settings when clicking outside or pressing Escape.
- Improved zoom controls to mark user interaction, preventing auto-fit adjustments during user actions.
- Refactored GraphOverlay to streamline rendering and position updates for selected nodes.
- Updated GraphView to utilize new layout effects for better performance and responsiveness.
2026-03-29 00:05:29 +02:00
iliya
adc61ebcfa fix(graph): softer toggle border color + beta badge in header 2026-03-28 22:58:02 +02:00
iliya
26f7b9158f fix(graph): enhance particle rendering for task comments
- Added visual differentiation for 'task_comment' particles, adjusting size and glow effects.
- Updated drawing functions to handle new particle kind, ensuring proper rendering in the graph.
- Introduced a merge function for particles to prevent duplicates during state updates.
- Enhanced color constants for better visual representation of different particle types.
2026-03-28 22:55:01 +02:00
iliya
8aaf53ae4a fix(graph): toggle buttons visually distinct — active = white text + border + bg 2026-03-28 22:40:12 +02:00
iliya
f38d731b9e fix(graph): wider task pills 120→160px + column width 140→180px 2026-03-28 21:03:22 +02:00
iliya
7804e86979 fix(graph): swap task pill layout — subject large on top, ID small below 2026-03-28 20:59:43 +02:00
iliya
3be815ecbb fix(graph): disable context ring on lead — data unreliable (jumps) 2026-03-28 20:53:32 +02:00
iliya
0e966e712e fix(graph): always run kanban layout — tasks were not positioned in columns 2026-03-28 20:51:29 +02:00
iliya
e431cfd02c fix(team): deduplicate permission_request processing across all entry paths
Root cause: handleTeammatePermissionRequest was called from 3 paths
(early inbox scan, Category 4 relay scan, stdout/native) but only
the early scan checked processedPermissionRequestIds, causing
duplicate ToolApprovalRequests and extra permission_responses.

Fix:
- Move processedPermissionRequestIds check INTO handleTeammatePermissionRequest
  so ALL callers are protected by the same dedup gate
- Remove duplicate Category 4 scan that re-processed inbox messages
  (early scan already covers all messages including read=true)
- Category 4 now only builds a filter Set to exclude permission_request
  from relay to lead
2026-03-28 20:32:42 +02:00
iliya
f286468dac fix(team): stable context % + show "% of context" + graph improvements
Context window fix:
- Derive initial contextWindow from model selection (haiku=200K, else=1M)
- Use limitContext flag from request
- Updated to exact value from modelUsage on result.success
- Formula: input_tokens + cache_creation + cache_read (all three needed)

TokenUsageDisplay:
- New contextWindowSize prop → shows "X% of context" (not "X% of input")

Graph improvements:
- Pending approval: pulsing amber ring on member nodes
- Working spinner: spinning arc when member has active task
- Current task indicator in popover (Loader2 + "working on" + task name)
- GraphNode: added currentTaskId, currentTaskSubject, pendingApproval, activeTool fields
- Adapter: passes pendingApprovalAgents + currentTaskId from store
2026-03-28 18:32:10 +02:00
iliya
e2000d0900 feat(agent-graph): show pulsing amber ring on agents awaiting approval
- Add pendingApproval field to GraphNode type
- Pass pendingApprovalAgents Set from store through adapter
- Draw pulsing amber ring + subtle glow on agent nodes that have
  pending tool approval requests
- Include approval state in adapter cache hash for reactivity
2026-03-28 16:17:39 +02:00
iliya
569b3b3f5b fix(agent-graph): remove borders from toggle buttons, add gap between groups
Replace border-based active state with background-only indication.
Add gap-3 between toolbar groups for better visual separation.
2026-03-28 15:44:33 +02:00
iliya
8ebb67f521 fix(agent-graph): tone down active toggle button styling in dark theme
Remove glow shadow, reduce border opacity (0.3 -> 0.12) and
background opacity (0.18 -> 0.08) on active toolbar toggles.
Less eye-catching while still clearly indicating active state.
2026-03-28 15:42:50 +02:00
iliya
ed69ed2f1f feat(graph): beautiful spawn/waiting animations for connecting members
Spawning (connecting):
- Bright double spinning ring (primary dashed arc + counter-rotating secondary)
- Radial glow pulse around hexagon
- "connecting..." label with breathing opacity
- Opacity 0.6 → 0.85 (more visible)

Waiting (queued):
- Amber radial glow pulse
- Pulsing hex outline in warning color
- "waiting..." label with breathing opacity
- Opacity 0.4 → 0.7 (more visible)

Both states now clearly distinguishable from online members
2026-03-28 15:22:30 +02:00
iliya
ee5b7b5888 feat(graph): current task indicator + working spinner on member nodes
Popover:
- Shows "working on [task subject]" with spinning Loader2 when member
  has currentTaskId (same pattern as CurrentTaskIndicator in MemberCard)
- Click task subject → opens TaskDetailDialog

Canvas:
- Active members with currentTaskId get subtle spinning arc around hexagon
- Spinner only shows when state is active/thinking/tool_calling

Adapter:
- Passes currentTaskId + currentTaskSubject from ResolvedTeamMember
- Looks up task subject from data.tasks

Port types:
- Added currentTaskId, currentTaskSubject to GraphNode
2026-03-28 15:18:23 +02:00
iliya
26fe42739b refactor(graph): fix SOLID/DRY violations from audit
DRY fixes:
- GraphOverlay.tsx: 539 LOC → 85 LOC minimal fallback (was dead code)
- COLUMN_LABELS: import from COLORS instead of hardcoded hex duplicates
- Alpha hex LUT: consolidated to single source in colors.ts
- TeamGraphTab: extract typed dispatchOpenTask/dispatchSendMessage helpers
  (was 8 repeated CustomEvent dispatches)

SOLID fixes:
- D-1: lucide-react added to peerDependencies in package.json
- S-1: GraphOverlay no longer has 8 responsibilities (now just 1 fallback)

Architecture:
- renderOverlay prop properly used by both Tab and Overlay
- Popover rendering lives in features/ layer only (no duplication with package)
2026-03-28 14:41:24 +02:00
iliya
54c259b017 refactor(graph): extract popover to features layer — reuse project UI (DRY)
- New: GraphNodePopover.tsx in features/agent-graph/ui/
  Uses @renderer/components/ui/badge, button, agentAvatarUrl
  No code duplication with MemberCard/MemberHoverCard patterns

- GraphView: added renderOverlay prop — host app injects its own popover
  Falls back to built-in GraphOverlay if renderOverlay not provided

- TeamGraphTab + TeamGraphOverlay pass renderOverlay with GraphNodePopover
  Member popover: avatar, status dot, role, context bar, badges, Message/Profile
  Task popover: displayId, status/review badges, Open button
  Process popover: label, URL link
2026-03-28 14:27:55 +02:00
iliya
2624666f91 fix(graph): no spawn replay on toggle + always bloom + rich popovers
1. Tasks toggle no longer replays spawn animations — allKnownNodeIds
   tracks every node ever seen, spawn effects only for genuinely new nodes
2. Bloom always active (removed hasActivity condition) — no brightness
   flicker when tasks appear/disappear
3. Rich member popover: avatar image, status dot, role, context bar,
   spawn status badges, Message/Profile action buttons
4. Rich task popover: displayId, status badges, review state, Open button
5. Process popover: label, URL link, status
6. Glass-card styling with colored accent bar, outside-click-to-dismiss
2026-03-28 14:20:59 +02:00
iliya
cb17e2158f feat(graph): default to tab mode + fullscreen button in tab
- Graph button opens dedicated tab (was: overlay)
- Cmd+Shift+G opens tab (was: toggle overlay)
- Tab mode has Fullscreen button → opens overlay on top
- Tab actions (Message, Open) dispatch CustomEvents to TeamDetailView
  which opens corresponding dialogs (SendMessage, TaskDetail)
- Overlay still available via Fullscreen button or TeamGraphOverlay
2026-03-28 14:17:10 +02:00
iliya
8a9121fc3e fix(graph): toggle buttons visually distinct — active gets border + glow, inactive dimmed 2026-03-28 14:11:28 +02:00
iliya
b7064759c0 fix(graph): toolbar position — top-2 left-20 to avoid macOS system buttons 2026-03-28 13:03:29 +02:00
iliya
789b74219e feat(graph): redesign toolbar — icons, team color, no system button overlap
- Toolbar moved to top-10 (below macOS system buttons)
- Lucide icons for all buttons (Tasks, Proc, Edges, Play/Pause, Zoom, Pin, Close)
- Toggle buttons show active state with highlight background
- Team name + alive indicator uses team color from config
- Grouped buttons in glass panels with backdrop-blur
- Removed raw text-only buttons (was: "−", "⊡", "+", "⊞ Pin", "✕")
2026-03-28 12:52:46 +02:00
iliya
322de540ec fix(graph): merge name+role into single line, increase kanban zone offset
- Name and role combined: "jack · developer" (was two separate lines)
- Removes overlap between role text and column headers
- Kanban zone offsetY 60→70 for extra clearance
- Removed unused drawSublabel function
2026-03-28 12:50:10 +02:00
iliya
d85058f198 feat(graph): robohash avatars inside member hexagons + center column headers
- Member/lead nodes show robohash avatar image clipped to circle inside hex
- Async image loading with cache (fallback to first letter while loading)
- avatarUrl field added to GraphNode type + adapter passes agentAvatarUrl()
- Column headers now centered over pill center (was offset by half pill width)
2026-03-28 12:46:25 +02:00
iliya
9fdbdd72d9 feat(graph): centered column headers + member avatar letters
- Column headers centered horizontally over pill area (not column edge)
- Member/lead nodes show first letter of name inside hexagon as avatar
  (bold, sized proportionally to node radius, colored in member color)
- Lead gets slightly smaller font (0.6r vs 0.7r) to fit context ring
2026-03-28 12:39:50 +02:00
iliya
899922da9b fix(graph): always show context % label on lead ring + fix hex alpha 2026-03-28 12:36:04 +02:00
iliya
36336cbd06 feat(graph): compact kanban columns + column headers
- Empty columns no longer reserve space — only non-empty columns render
- Active columns are packed tightly next to each other
- Each column gets a header label (Todo, In Progress, Done, Review, Approved)
  with status color and subtle underline
- Columns centered under owner node
2026-03-28 12:30:38 +02:00
iliya
6866f003dc feat(graph): spawn/edge/task/comment animations
1. Member spawn animation: rotating dashed ring for 'spawning' status,
   pulsing hex outline for 'waiting' status
2. Edge flash: active edges pulse brighter (0.1-0.5 alpha) with glow
   shadow when particles travel along them
3. Smooth task positioning: tasks LERP to target position (0.15 factor)
   instead of teleporting when kanban column changes
4. Comment flight particles: when a member adds a comment to a task,
   a purple particle with speech bubble flies from member to task node
2026-03-28 12:27:37 +02:00
Илия
11bb49c53e
feat(graph): force-directed agent graph visualization with kanban-zone task layout
Force-directed graph visualization for agent teams.

Package: @claude-teams/agent-graph (isolated workspace package)
- Space theme: bloom, particles, hex grid, depth stars
- Members as hexagonal nodes with breathing glow
- Tasks as pill cards in kanban columns (todo/wip/done/review/approved) per owner
- Message particles along edges (real-time only)
- Deterministic layout, Figma-style pan, scroll/pinch zoom
- Clean Architecture: ports/adapters/strategies, ES #private classes

Integration: features/agent-graph/ (adapter + overlay + tab)
- Full-screen overlay (Cmd+Shift+G) + Pin as Tab
- Graph button in Team section header
- Frustum culling, zero per-frame allocations, adaptive fps
- Performance overlay via ?perf query param

Also: CI runs on all PR branches, features/CLAUDE.md architecture guide
2026-03-28 12:03:42 +02:00