Commit graph

881 commits

Author SHA1 Message Date
iliya
6b09b59d88 feat(team): render AskUserQuestion tool as readable UI in ToolApprovalSheet
Instead of showing raw JSON for AskUserQuestion, render each question
with header badge, question text, and options list showing labels and
descriptions. Supports multiSelect indicator (checkbox vs radio style).
Add MessageCircleQuestion icon for the tool.
2026-03-28 16:40:18 +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
70b5f1962f feat(team): add Skip button to pre-flight CLI check in launch/create dialogs
Users can now skip the CLI warmup check and launch immediately.
Sets prepareState to 'ready' so the Launch button unlocks.
2026-03-28 16:10:32 +02:00
iliya
d01bce2101 feat(team): show approval status icons on permission_request noise rows
- Add resolvedApprovals Map to store (request_id -> allowed/denied)
- Record result in respondToToolApproval and autoResolved events
- NoiseRow accepts optional icon prop
- Permission request rows show: check (approved), x (denied),
  clock (pending), or faded check (pre-existing/unknown)
2026-03-28 15:52:12 +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
9f2a7c950a fix(team): fix hooks ordering crash in ToolApprovalSheet
Move useMemo for sourceColor BEFORE the early return (if !current),
and restore teamSummary/teamColor/displayName variables that were
accidentally removed. Fixes 'Rendered fewer/more hooks' React crash.
2026-03-28 15:40:56 +02:00
iliya
ff8b844abe fix(team): show MemberBadge with avatar in ToolApprovalSheet header
Replace plain text teammate name with MemberBadge component showing
avatar + colored name badge, consistent with how members are displayed
in the Messages panel.
2026-03-28 15:24:07 +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
add9df2006 fix(graph): Profile opens member dialog (not message) + Add Task button
- Profile button dispatches 'graph:open-profile' → MemberDetailDialog
  (was incorrectly mapped to 'graph:send-message')
- Double-click on member → opens profile (was: send message)
- New "Add Task" button on member popover → CreateTaskDialog with owner pre-filled
- New events: graph:open-profile, graph:create-task
- TeamDetailView listens for both new events
2026-03-28 15:08:32 +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
98a1155635 feat(graph): wire popover actions to real dialogs (Message, Open task/member)
- TeamGraphOverlay accepts onSendMessage, onOpenTaskDetail, onOpenMemberProfile
- TeamDetailView passes dialog openers to overlay:
  - Message → opens SendMessageDialog with recipient pre-filled
  - Open (task) → opens TaskDetailDialog with task found by ID
  - Open (member) → opens SendMessageDialog for that member
  - Double-click → same as Open
- Removed console.log stubs
2026-03-28 12:56:43 +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
iliya
17e9be99dd fix(ui): change auto-approve banner from warning to info style 2026-03-28 12:23:28 +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
iliya
dd42cf0069 fix(team): scan inbox for permission_request during provisioning
relayLeadInboxMessages only processes unread messages after
provisioningComplete, but CLI marks permission_request messages as
read after native delivery -- before our relay runs.

Move permission_request inbox scan BEFORE provisioningComplete check.
Scan ALL messages (including read=true), track processed IDs via
processedPermissionRequestIds Set on ProvisioningRun to prevent
re-emitting. Also look up both alive and provisioning runs so the
scan works during team bootstrap.
2026-03-27 23:35:52 +02:00
iliya
df6a23e3a2 Merge branch 'worktree-fix-permission-request-ui' into dev 2026-03-27 22:04:55 +02:00
iliya
d0b9c4f529 fix(team): settings panel opens below buttons instead of beside them
Split ToolApprovalSettingsPanel into ToolApprovalSettingsToggle (inline
button) and ToolApprovalSettingsContent (full-width expandable panel).
Toggle sits in the actions row, content renders below it inside the popup.
2026-03-27 22:04:44 +02:00
iliya
5c0eb1fa38 Merge branch 'worktree-fix-permission-request-ui' into dev 2026-03-27 20:16:14 +02:00
iliya
c0c20d07f8 fix(team): add backdrop overlay to ToolApprovalSheet and move Settings inline
- Add semi-transparent backdrop (bg-black/40) behind the approval popup
  to draw attention and dim surrounding UI
- Refactor ToolApprovalSettingsPanel to render toggle button inline
  (fragment-based) so it can sit in the actions row next to pending count
- Settings button now appears right-aligned at the same level as
  Allow/Deny buttons; expanded panel renders below
2026-03-27 20:16:03 +02:00
iliya
f2eabf3866 Merge branch 'worktree-fix-permission-request-ui' into dev 2026-03-27 20:09:09 +02:00
iliya
bdd0dc6f39 fix(team): add permission_request interception in stdout handler + diagnostic logging
- Parse raw user text for permission_request in handleStreamJsonMessage
  (covers case where permission_request arrives without <teammate-message> wrapper)
- Add [PERM-TRACE] logger.warn diagnostics to trace the exact flow:
  where permission_request is detected, whether it reaches handleTeammatePermissionRequest,
  and whether relay or stdout interception triggers
- These logs will help diagnose why ToolApprovalSheet may not appear
2026-03-27 20:09:01 +02:00
iliya
148823e284 Merge branch 'worktree-fix-permission-request-ui' into dev 2026-03-27 18:45:07 +02:00
iliya
ed1726c298 fix(team): intercept permission_request in native stdout delivery path
relayLeadInboxMessages only runs after provisioningComplete, but
teammate permission_request messages arrive during bootstrap (before
provisioning finishes). Claude Code delivers them natively via stdout
type:"user" messages, bypassing the relay entirely.

Add permission_request interception in handleNativeTeammateUserMessage
which processes stdout user messages at all times, including during
provisioning. This ensures ToolApprovalSheet appears immediately when
teammates need tool permission.
2026-03-27 18:44:58 +02:00
iliya
373f2aac9b Merge branch 'worktree-fix-permission-request-ui' into dev 2026-03-27 18:13:06 +02:00
iliya
8ea470b1ae fix(team): intercept permission_request regardless of native delivery status
When Claude Code runtime natively delivers permission_request to the
lead via stdout, the message was excluded from interception by the
nativeMatchedMessageIds filter. This caused the ToolApprovalSheet to
not appear for teammate requests.

Remove nativeMatchedMessageIds check from the permission_request
filter so interception works even for natively delivered messages.
2026-03-27 18:12:58 +02:00
iliya
085147ffc0 Merge branch 'worktree-fix-permission-request-ui' into dev 2026-03-27 17:56:08 +02:00
iliya
924bcd8b99 fix(team): render teammate permission requests in ToolApprovalSheet instead of raw JSON
When auto-approve is disabled, teammate tool requests arrived as
permission_request JSON via SendMessage and rendered as "Raw JSON"
with no way to approve/deny (#29).

- Intercept permission_request in lead inbox relay, convert to
  ToolApprovalRequest and show in existing ToolApprovalSheet
- Respond via teammate inbox (permission_response) + control_response
  via stdin as fallback
- Show teammate name in approval header (e.g. "bob — Bash")
- Compact noise label in Messages panel for permission_request/response
- Proper file locking, race condition protection, idempotency checks
2026-03-27 17:55:59 +02:00
iliya
507bf798eb improvement(task-change): improve task change presence tracking and related IPC handlers
- Added support for tracking task change presence with new IPC channels: TEAM_GET_TASK_CHANGE_PRESENCE and TEAM_SET_CHANGE_PRESENCE_TRACKING.
- Introduced JsonTaskChangePresenceRepository and TeamLogSourceTracker to manage task change presence data.
- Enhanced ChangeExtractorService to utilize task change presence services for improved task change detection.
- Updated TeamDataService to integrate task change presence tracking and resolve task change presence states.
- Modified UI components to reflect task change presence status in Kanban and task detail views.

This feature aims to provide real-time insights into task changes, enhancing user experience and task management capabilities.
2026-03-27 17:52:39 +02:00
iliya
fe90ac866d Add deep dive research documentation on AI agent orchestration and communication standards
- Introduced multiple markdown files covering agent spawn packages, inter-agent communication protocols, and multi-agent orchestration tools.
- Detailed analysis of official SDKs for CLI agents (Claude Code, Codex, Gemini) and their integration potential.
- Documented various competitor approaches to agent spawning and communication, highlighting strengths and weaknesses.
- Provided insights into best practices for implementing multi-provider support within Electron applications.

This comprehensive documentation aims to enhance understanding of the current AI agent ecosystem and serve as a resource for developers and stakeholders.
2026-03-27 17:51:49 +02:00
iliya
ecba775c76 Improve macOS title bar drag area 2026-03-27 17:21:18 +02:00
iliya
e1413a32bd Guard renderer IPC sends during crash recovery 2026-03-27 17:07:40 +02:00
iliya
9f8287755c fix(updater): improve update dialog layout and strip downloads section
Widen dialog (max-w-lg → max-w-2xl), remove prose max-width constraint
that caused empty space on the right, and filter out the Downloads
heading with everything below it from release notes.
2026-03-26 13:13:50 +02:00
iliya
344bf41fe5 fix(updater): verify platform asset exists before showing update notification
HEAD-request the expected installer URL (DMG/EXE/AppImage) before
notifying the user about a new version. If CI hasn't finished
uploading the artifact for the current OS yet, the notification is
suppressed and retried on the next periodic check.
2026-03-26 00:50:12 +02:00
iliya
42040ef886 chore: bump version to 1.1.0 2026-03-26 00:30:58 +02:00
iliya
c7ee51884d Merge branch 'worktree-upstream-merge' into dev 2026-03-25 15:44:54 +02:00
iliya
bd90de8e81 fix(team): notify lead on task create with startImmediately
Extract sendUserTaskStartNotification as reusable private method.
When a task is created via UI directly in "In Progress" column
(startImmediately=true), the controller's maybeNotifyAssignedOwner
skips the lead. Now createTask sends the notification to the lead
with full description, prompt, and task_get instructions.
2026-03-25 15:03:44 +02:00
iliya
58f3ccd4b4 feat(dashboard): add auth troubleshooting guide to CLI status banner
Add "Already logged in?" button next to Login that expands a
step-by-step troubleshooting panel: re-check status, terminal
commands, re-login instructions, and binary path display.
Also clarifies that browsing works without login.
2026-03-25 15:00:42 +02:00