Commit graph

929 commits

Author SHA1 Message Date
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
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
f6daced2ce docs(README): remove outdated warning about Claude Code issue
- Deleted the warning regarding the upstream Claude Code issue affecting agent teams, as it is no longer relevant.
2026-03-30 19:01:54 +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
d0715dfad6 docs(README): add warning about Claude Code issue with agent teams
- Included a warning regarding an upstream issue in Claude Code affecting the inheritance of external MCP tools by teammates spawned via Agent/Task.
- Noted the impact on bootstrap processes and provided a link to track the issue status.
2026-03-30 18:59:39 +03:00
iliya
822bbac23c feat(agent-teams): integrate MCP tool catalog and enhance tool registration
- Added mcpToolCatalog to the agent-teams-controller, exporting new types and constants for MCP tool groups and names.
- Updated tools registration to utilize AGENT_TEAMS_MCP_TOOL_GROUPS for streamlined tool management.
- Enhanced tests to validate the new operational permissions and ensure correct tool registration behavior.
2026-03-30 17:58:17 +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
d2487e41c9 fix(team): trim verbose MCP description from permission noise rows
Remove tool description from permission_request noise label - tool name
alone is clear enough. MCP tools have long technical descriptions that
flood the Messages panel.
2026-03-30 15:56:49 +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
b04f82512b fix(graph): team name left-20 to clear macOS traffic lights in fullscreen 2026-03-30 15:42:06 +03:00
iliya
e741b1f603 feat(team): default action mode 'delegate' instead of 'do' for teams 2026-03-30 15:40:54 +03:00
iliya
f08885d58f fix(updater): prevent installation of non-newer versions and enhance update notifications
- Added checks to ensure that only newer versions are installed during the update process.
- Updated the notification logic to suppress alerts for non-newer updates.
- Introduced a new method to compare version numbers, improving version management in the UpdaterService.
- Enhanced the release workflow by removing unnecessary file uploads and adding canonical updater metadata publishing for better asset management.
2026-03-30 15:24:23 +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
dcf775d86c fix(team): add updatedInput: {} to all allow control_responses
Claude Code CLI Zod schema requires updatedInput to be a record
when behavior is 'allow'. Without it, MCP tool approvals fail with
'Tool permission request failed: ZodError: expected record, received
undefined'.

Add empty updatedInput: {} to all allow responses (autoAllow,
timeout-allow, and manual allow).
2026-03-30 13:45:09 +03:00
iliya
7258de90c3 fix(team): apply permission_suggestions to settings instead of writing to inbox
FACT: Claude Code runtime ignores permission_response in teammate inbox.
FACT: permission_request contains permission_suggestions from runtime
with instructions to add rules to project settings.
FACT: destination "localSettings" = {cwd}/.claude/settings.local.json.

When user clicks Allow for teammate permission_request:
- Parse permission_suggestions from the request
- Add tool rules to {cwd}/.claude/settings.local.json
- Creates directory/file if missing, merges with existing rules
- Teammate retries tool call, finds rule, succeeds

Removed: inbox permission_response write (didn't work)
Removed: control_response via stdin fallback (didn't work)
2026-03-30 12:45:03 +03:00
iliya
1c5ba3041c fix(team): skip stale permission_request messages from previous runs
Inbox files persist across team runs. Permission_request messages from
a previous run (e.g. when team was launched without auto-approve) were
being reprocessed on the next launch, showing false ToolApprovalSheet
popups even when the new run has bypassPermissions enabled.

Filter by timestamp: skip permission_request messages older than
run.startedAt.
2026-03-30 00:09:48 +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
228572a1f8 fix(team): target correct team in Allow all and Settings panel
Allow all button and ToolApprovalSettingsPanel now use current
approval's teamName instead of selectedTeamName. Prevents applying
settings to wrong team when approval comes from a different team
than the one currently viewed.
2026-03-29 22:56:19 +03:00
iliya
58bd7cc507 feat(team): per-team tool approval settings
Tool approval settings (autoAllowAll, autoAllowFileEdits, etc.) are
now stored per-team instead of globally. Clicking 'Allow all' in one
team no longer affects other teams.

- localStorage key: 'team:toolApprovalSettings:{teamName}'
- Settings loaded on team select, initialized on create/launch
- skipPermissions=false -> defaults (autoAllowAll:false)
- skipPermissions=true -> autoAllowAll:true for that team
- Main process: Map<teamName, settings> instead of single instance
- IPC: teamName parameter added to updateToolApprovalSettings
2026-03-29 22:46:25 +03:00
iliya
8c08087337 fix(team): reset autoAllowAll when launching team with manual approval
When the user previously clicked 'Allow all', autoAllowAll persists
globally in localStorage. New teams launched with skipPermissions=false
(manual tool approval) would silently auto-approve everything.

Now createTeam/launchTeam reset autoAllowAll to false when
skipPermissions is explicitly false, ensuring the ToolApprovalSheet
appears for the new team.
2026-03-29 22:32:30 +03:00
iliya
c91a886d49 fix(ci): resolve no-selector-parameter lint error in TeamLogSourceTracker
Split setTracking(enabled) into separate enableTracking/disableTracking
public methods per sonarjs/no-selector-parameter rule. Update all callers
and test mocks accordingly.
2026-03-29 12:59:52 +03:00
iliya
388a24d715 fix(ci): resolve regex complexity lint error and Windows path test failure
- Simplify LAUNCH_RE by pre-stripping optional (resume) prefix to bring
  regex complexity from 23 to within the allowed 20
- Use RegExp.exec() instead of String.match() per lint rules
- Use path.normalize() in BranchStatusService tests for cross-platform
  compatibility (fixes \repo vs /repo on Windows)
2026-03-29 12:40:16 +03:00
iliya
16238276fb refactor(team): update tracking logic and enhance test coverage
- Replaced `ensureTracking` and `stopTracking` with a single `setTracking` function in `TeamDataService` to streamline task change presence tracking.
- Updated related tests to reflect the new tracking logic and ensure proper function calls.
- Added `activeToolCalls` property to various service interfaces to improve state management during provisioning operations.
2026-03-29 02:01:07 +02:00
iliya
93f160d731 fix(team): ensure MCP config cleanup on spawn failures
- Added logic to remove generated MCP config files when team creation or launch fails due to spawn errors.
- Updated tests to verify that MCP config files are correctly removed in failure scenarios, ensuring no leftover configurations persist.
- Enhanced error handling in the TeamProvisioningService to maintain clean state during provisioning operations.
2026-03-29 01:53:16 +02:00
iliya
e1f0d61dc5 Merge branch 'worktree-fix+mcp-config-storage' into dev 2026-03-29 01:30:01 +02:00
iliya
1ce6ace8b8 fix(team): move MCP config storage from /tmp to userData
MCP config files were stored in os.tmpdir() with no cleanup, and
the MCP server ran from the AppImage FUSE mount path which could
be inaccessible to Claude CLI subprocesses on Linux (fixes #31).

Changes:
- Store MCP configs in app.getPath('userData')/mcp-configs/ with
  pid+timestamp filenames for safe multi-instance operation
- Copy MCP server to userData/mcp-server/<version>/ via atomic
  temp-dir + rename (eliminates FUSE mount dependency)
- Add per-run cleanup in cleanupRun(), startup stale GC (7d TTL),
  and shutdown own-pid GC
- Add --mcp-config recovery in respawnAfterAuthFailure()
- Add setAppDataBasePath(null) reset for test isolation
2026-03-29 01:29:48 +02:00
iliya
7ea8289c5b feat(team): add support for task comment notifications
- Introduced 'task_comment_notification' message kind to enhance message handling in the team services.
- Updated TeamDataService, TeamInboxReader, and TeamSentMessagesStore to accommodate the new message kind.
- Modified filtering logic to exclude task comment notifications from the displayed messages.
- Added tests to ensure correct handling and filtering of task comment notifications.
2026-03-29 01:29:13 +02:00
iliya
46355d87df refactor(session): improve session label formatting and enhance session item display
- Replaced direct access to session.firstMessage with formatSessionLabel for consistent label formatting across components.
- Updated SessionItem, TeamSessionsSection, and KanbanFilterPopover to utilize the new formatting function.
- Enhanced display logic in SessionItem to differentiate between regular and team sessions, improving user experience.
- Added new icons for team sessions and adjusted metadata display for better clarity.
2026-03-29 01:16:04 +02: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
ccd11a5eb0 fix(team): mark permission_request inbox messages as read after scan
Restored markInboxMessagesRead for permission_request messages in the
early scan. Without this, processed permission_request messages stayed
read=false forever, potentially showing stale unread indicators in UI.
2026-03-28 20:36:10 +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
11506c6ea8 fix(team): fix AskUserQuestion edge cases in ToolApprovalSheet
- Option keys now include question index prefix ("qi:label") to prevent
  cross-question collisions when multiple questions share option labels
- Single-select clears only options from the same question, not all
- answersMessage built as per-question JSON map instead of flat join
- Backend parses JSON answers and maps to correct questions
- Fallback label "Option N" for options with undefined label
2026-03-28 17:00:06 +02:00
iliya
75a36b5cd2 fix(team): deliver AskUserQuestion answers via updatedInput + fix Enter bypass
- Enter key now respects isAskQuestion selection requirement
- Selected option labels sent as message to respondToToolApproval
- control_response includes updatedInput with answers for AskUserQuestion
- useCallback/useEffect deps updated for selectedOptions and hasSelection
2026-03-28 16:54:22 +02:00
iliya
1e80f3db52 feat(team): interactive AskUserQuestion options in ToolApprovalSheet
- Options are clickable: single-select (radio) and multi-select (checkbox)
- Selected options highlighted with green border and filled indicator
- Submit button replaces Allow for AskUserQuestion - disabled until
  at least one option is selected
- Human-readable tool display names (AskUserQuestion -> Question, etc.)
- Selection resets when approval changes
2026-03-28 16:49:24 +02:00
iliya
daef2db07c fix(team): prevent hooks ordering crash in ToolInputPreview
Move useMemo/variable declarations BEFORE the AskUserQuestion early
return to ensure hooks are called in consistent order regardless of
which tool type is being displayed.
2026-03-28 16:44:26 +02:00
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