Commit graph

48 commits

Author SHA1 Message Date
777genius
c8f9d9bbdd refactor: migrate agent graph to feature slice 2026-04-14 16:24:09 +03:00
777genius
e99691ad3d Merge branch 'feat/codex-recent-projects' into dev 2026-04-14 16:07:18 +03:00
777genius
fad89e71da feat: add dashboard recent projects feature slice 2026-04-14 16:07:04 +03:00
777genius
a0c8db4771 feat(graph-controls): integrate tooltip support, refine button styles, and enhance task creation functionality 2026-04-13 20:51:45 +03:00
777genius
5b1f369950 chore: merge origin/dev into dev 2026-04-13 18:43:00 +03:00
777genius
07682eca37 feat(graph-controls): add team page and task creation buttons, improve toolbar button styles 2026-04-13 18:36:44 +03:00
777genius
dd4ce7e9b1 fix(ci): merge dev and restore green checks 2026-04-13 17:14:22 +03:00
777genius
a0d87872e7 fix(ci): restore PR #44 checks 2026-04-13 17:00:49 +03:00
777genius
6fbf8518dc feat(member-details): enhance member detail dialog with activity filtering and initial tab state 2026-04-13 17:00:20 +03:00
777genius
7d47cbaded feat(agent-graph): enhance team graph 2026-04-13 16:18:14 +03:00
777genius
674c1d8b13 feat(ui): polish messages timeline and graph toolbar 2026-04-13 10:41:23 +03:00
777genius
9ca8055695 chore(workspace): checkpoint remaining claude team changes 2026-04-12 22:15:57 +03:00
777genius
57c384531a feat(agent-graph): improve blocking visibility and inspection 2026-04-12 21:31:53 +03:00
777genius
f74b7a3701 fix(agent-graph): keep graph state consistent across panes 2026-04-12 20:15:52 +03:00
777genius
53bcea337f merge(main): integrate origin/main into spike/free-code-compat 2026-04-10 17:25:51 +03:00
iliya
433bdf8bbc feat(agent-graph): show teammate runtime labels 2026-04-09 21:16:49 +03:00
iliya
17bd573ce3 fix(team-runtime): harden refresh flows and reduce ui churn 2026-04-09 16:34:55 +03:00
iliya
78d4c2826b fix(team): align idle inbox semantics across app 2026-04-08 17:45:09 +03:00
Artem Rootman
da58917032
perf: offload heavy I/O to worker thread, reduce renderer re-renders
Main process — worker thread for team data:
- New team-data-worker thread handles getTeamData and findLogsForTask,
  isolating heavy file I/O (scanning 300+ subagent JSONL files) from
  Electron's main event loop. getTeamData dropped from ~2000ms on the
  main thread to ~110ms via the worker.
- Worker-side dedup and 10s result cache for findLogsForTask prevents
  redundant scans when the same task is queried multiple times.
- Discovery cache TTL raised from 5s to 30s — avoids re-scanning the
  entire project directory on every call.
- Message cap at 200 in TeamDataService to keep IPC payloads under 1MB
  (was sending 2200+ messages / ~3MB, stalling Chromium IPC serialization).
- IPC handlers fall back to main-thread execution if the worker is
  unavailable (graceful degradation).

Renderer — useShallow and memoization (55 files):
- Added useShallow to store selectors across 55 renderer files. Batched
  individual useStore() calls (e.g. 17 calls in ExtensionStoreView,
  10 in ConnectionSection) into single useShallow selectors, cutting
  unnecessary re-render checks on every store update.
- MemberLogsTab: three 5-second polling intervals now pause when the
  parent tab is hidden (display:none). Previously 5 hidden tabs × 3
  intervals = 15 polling timers firing continuously.
- KanbanColumn wrapped in React.memo to skip re-renders when props
  haven't changed.
- MemberList: memoized activeMembers/removedMembers/colorMap; replaced
  O(n×m) per-member task scan with a pre-computed reviewer map.
- Bounded timer Maps in store initialization to prevent unbounded growth
  of debounce/throttle tracking maps during long sessions.
2026-04-05 16:21:05 +00:00
iliya
8cf2d41568 fix(graph): improve text normalization in TeamGraphAdapter
- Enhanced text processing to clean up raw task ID hashes and replace pipe separators with dashes.
- Ensured consistent formatting for comments and inbox messages.
2026-03-31 13:02:05 +03:00
iliya
6621660376 feat(graph): add cross-team ghost nodes and task card improvements
- Cross-team messages now show ghost nodes (dashed hexagons) for external teams
- Ghost nodes have purple color, link icon, and connect to lead via message edge
- Particles flow between ghost node and lead with cross-team message labels
- Cross-team popover shows external team name
- Task click opens full KanbanTaskCard with glow effects and action buttons
- All kanban task actions wired through CustomEvent to TeamDetailView
2026-03-31 01:48:15 +03:00
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
f7876d89f7 fix(team): seed Write/Edit/NotebookEdit permissions before CLI launch
seedTeammateOperationalPermissionRules already pre-writes MCP tool
rules to settings.local.json before spawning the CLI. But standard
file tools (Write, Edit, NotebookEdit) were missing.

FACT: Teammates requesting Write get setMode: acceptEdits suggestion
but we can't change subprocess session mode. Pre-seeding these tools
as allow rules prevents the permission prompt entirely.
2026-03-30 22:58:22 +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
27b1a4fd9a fix(graph): filter system messages from particles + fix direction
- Skip idle_notification, shutdown, and other JSON system messages
  (was showing {"type":"idle_notificatio... as particle labels)
- Skip system_notification source messages
- Skip messages with < 3 chars
2026-03-30 19:07:16 +03:00
iliya
53dd857e0f Merge branch 'dev' of https://github.com/777genius/claude_agent_teams_ui into dev 2026-03-30 18:59:42 +03:00
iliya
1f28ee5021 fix(ci): stabilize provisioning test and clear lint errors 2026-03-30 16:45:14 +03:00
iliya
9241970b02 fix(graph): format recent tools — clean names + extract readable preview
- Tool names: "mcp__agent-teams__task_create" → "Task Create"
  (strip MCP prefixes, snake_case → Title Case)
- Tool preview: raw JSON → extract subject/name/path field
  (was showing { "id": "19ebbdd5-...", "displayId": ... })
- Compact single-line layout with status dot + name + preview
2026-03-30 16:00:34 +03:00
iliya
34f1f0d612 fix(team): proactively add all agent-teams MCP tools on first approval
When user approves any mcp__agent-teams__* tool, also add all other
agent-teams tools to settings.local.json preemptively. This prevents
teammates from getting stuck on subsequent tool calls (task_get,
task_start, task_complete, etc.) since each generates a separate
permission_request and the teammate blocks until resolved.

FACT: Settings file approach only prevents FUTURE blocks, not current
ones. Pre-adding all tools on first approval covers the common case.
2026-03-30 15:59:53 +03:00
iliya
8808a3ab88 fix(graph): disable context bar in lead popover — data unreliable 2026-03-30 15:49:18 +03:00
iliya
664bdbf0cc fix(graph): fullscreen overlay actions work — pass dispatchers to TeamGraphOverlay 2026-03-30 15:44:52 +03:00
iliya
e4c9a100f3 fix(graph): remove pt-8 from fullscreen overlay — no padding in fullscreen 2026-03-30 13:50:04 +03:00
iliya
f36501bdef fix(graph): fullscreen overlay pt-8 to clear macOS title bar 2026-03-30 13:48:56 +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
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
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
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
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
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
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
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