Commit graph

238 commits

Author SHA1 Message Date
iliya
dc0627c285 fix message pagination consumers 2026-04-05 21:54:52 +03:00
Artem Rootman
8570ed13fd
fix: stabilize flaky ChangeExtractorService invalidation test
The test races stale and fresh worker calls to verify that invalidation
prevents stale results from populating the cache. On slow CI, the
fresh worker mock could be reached before the stale deferred was
resolved, causing the version guard to mismatch.

Flush microtasks after starting freshPromise so it advances past
internal awaits and reaches the worker mock before we resolve the
stale deferred.
2026-04-05 18:25:43 +00:00
Artem Rootman
5efc3dd63f
fix: pagination correctness and message enrichment
P1: Poller no longer overwrites nextCursor/hasMore — those belong
to the "Load older" flow. Both poller and loadOlder now dedup
messages by messageId or timestamp+from fingerprint.

P1: Cursor is now compound (timestamp|messageId) with stable
tie-breaking sort. Messages sharing the same timestamp at page
boundaries are no longer lost.

P2: getMessagesPage now applies the same enrichment as getTeamData:
leadSessionId propagation and slash-command-result annotation.

P3: Added 3 tests for getMessagesPage covering pagination, cursor
stability with same-timestamp messages, and slash command annotation.
2026-04-05 18:18:03 +00:00
iliya
0e1381ce37 test: seed cli status in extensions install tests 2026-04-05 20:16:25 +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
d923661127 fix(tests): update test expectations to match current implementation
- Add missing AGENT_TEAMS_NAMESPACED_TEAMMATE_OPERATIONAL_TOOL_NAMES to
  agent-teams-controller mocks in provisioning tests
- Fix ChangeExtractorService test: pass createdAt to match actual signature
- Fix TeamGraphAdapter particle label expectations (max=52 truncation)
2026-03-31 01:08:43 +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
53dd857e0f Merge branch 'dev' of https://github.com/777genius/claude_agent_teams_ui into dev 2026-03-30 18:59:42 +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
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
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
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
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
8a9121fc3e fix(graph): toggle buttons visually distinct — active gets border + glow, inactive dimmed 2026-03-28 14:11: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
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
e1413a32bd Guard renderer IPC sends during crash recovery 2026-03-27 17:07:40 +02:00
iliya
c21350713c perf: replace remark-based search with plain text indexOf
Manually ported from upstream 5c7f921e. Key changes:
- SessionSearcher: indexOf instead of remark AST, batch size 8→16
- conversationSlice: indexOf with MAX_SEARCH_MATCHES=500 cap
- Item-scoped store selectors (searchMatchItemIds Set) to skip re-renders
- Pre-filter in markdownTextSearch (skip parse if no raw match)
- SearchTextCache: 200→1000 entries
- ProjectScanner: 30s search project cache, batch 4→8
2026-03-25 14:32:37 +02:00
iliya
86d69476c1 fix: add retry to temp dir cleanup for Windows CI
Cherry-picked from upstream c5d33727
2026-03-25 13:59:27 +02:00
iliya
6fa075de51 fix: sidebar header repo/branch not syncing when switching tabs
Cherry-picked from upstream d2341d50
2026-03-25 13:58:48 +02:00
iliya
94fc564bf5 feat: UI improvements, bug fixes, and protocol noise filtering
- Fix incorrect error message when attaching files to team lead while team is offline
- Kanban columns: color only on headers, body with 30% alpha tint per user preference
- Worktree projects now correctly detected on Dashboard via path-based detection
- Filter raw protocol messages (idle_notification, teammate-message) from lead thoughts
- Consistent text styles in Attachments section (From original message / From comments)
- Secondary sort for teams by lastActivity timestamp with alphabetical fallback
- Remove colored background from team cards, keep only left border
- Dynamic member color in Add Members dialog based on next available palette color
- Stylized @-mentions in task comments with colored MemberBadge
- Refactor CLI env resolution to shared utility
2026-03-24 17:47:15 +02:00
iliya
47dac2e8b5 feat: migrate to React 19
Upgrade React 18.3.1 → 19.2.4 with full type compatibility.

Changes:
- react, react-dom → ^19.0.0
- @types/react, @types/react-dom → ^19.0.0
- lucide-react → ^0.577.0 (React 19 type fixes)
- @tiptap/* → ^3.20.4 (React 19 support)
- useRef calls now require explicit initial value (undefined)
- RefObject types updated for React 19 (includes null)
- MutableRefObject → RefObject (deprecated in 19)
- act() import moved from react-dom/test-utils to react
- Scoped JSX namespace imports added where needed
2026-03-24 17:11:55 +02:00
iliya
549fce4689 fix(tests): enhance messageId handling for legacy inbox rows
- Updated tests to ensure legacy inbox rows without messageId generate a deterministic hash-based messageId.
- Modified test descriptions for clarity and accuracy regarding messageId generation.
- Adjusted expectations in tests to reflect the new behavior of relaying legacy lead inbox rows with generated messageIds.
2026-03-23 16:29:19 +02:00
iliya
b24d90d799 chore: update pnpm lockfile and workspace configuration
- Updated package versions in pnpm-lock.yaml, including rollup and sass dependencies.
- Added new 'landing' package to pnpm-workspace.yaml.
- Enhanced README with additional images for better visual representation.
2026-03-23 16:06:43 +02:00
iliya
e005671123 feat: add Sentry error tracking and update docs
- Integrate @sentry/electron and @sentry/react for crash reporting
- Add Sentry Vite plugin for source maps
- Add error tracking to main process, renderer, and IPC layer
- Exclude source maps from packaged builds
- Update README with new screenshots
- Add Sentry opt-out toggle in settings
- Update release workflow with Sentry config
2026-03-22 17:03:15 +02:00
iliya
60cf80f90a fix: resolve CLI binary dynamically for MCP diagnostics and extension installs
Use ClaudeBinaryResolver instead of null binary path in extension services
(McpHealthDiagnosticsService, PluginInstallService, McpInstallService).
Packaged Electron on macOS has minimal PATH — bare `claude` lookup fails
with ENOENT. Now all CLI calls resolve the binary via ClaudeBinaryResolver
which checks PATH, NVM, standard install dirs and login shell env.

- Add buildEnrichedEnv() helper for child process env (PATH, HOME, USERPROFILE)
- Add stale cache re-verification with 30s TTL in ClaudeBinaryResolver
- Guard execCli() against null binaryPath with explicit error
- Replace projectPath.startsWith('/') with path.isAbsolute() for Windows
- Extract CLI_NOT_FOUND_MARKER/MESSAGE constants for consistent error detection
- Show amber info banner instead of red error when CLI not installed
2026-03-22 13:10:11 +02:00
iliya
6d441efa97 refactor: enhance team provisioning process and UI updates
- Updated provisioning states to include 'configuring', 'assembling', and 'finalizing' for better tracking of team setup progress.
- Refactored the provisioning progress block to utilize a new display step system, improving clarity in the UI.
- Adjusted the README to include a comprehensive table of contents and updated comparison metrics for multi-agent orchestration tools.
- Enhanced team management UI to reflect new provisioning states and improve user experience during team setup.
2026-03-21 16:47:20 +02:00
iliya
38507d7437 fix: handle ENOENT error gracefully in file reading functions
- Updated error handling in both registerUtilityRoutes and handleReadMentionedFile functions to return null for expected ENOENT errors, indicating that the file simply does not exist. This improves robustness in scenarios with stale or misdetected file references.
- Enhanced the isValidFileRef function to require either 3+ segments or a file extension to avoid false positives for npm scoped packages, ensuring more accurate file reference validation.
2026-03-20 14:26:47 +02:00
iliya
ec547e0662 refactor: enhance task management protocols and UI components
- Updated task management guidelines to emphasize the importance of posting task comments before marking tasks as complete, ensuring visibility of results on the task board.
- Introduced a new notification system for team leads after task completion, summarizing key findings and linking to detailed comments.
- Improved UI components, including a new CLI checking spinner with a delayed hint and enhanced task filters to support unread/read task states.
- Refactored sidebar task item styles to visually indicate unread tasks and adjusted task sorting options to include 'unread' as a criterion.
- Enhanced settings tabs with tooltips for better user guidance and improved layout for advanced settings options.
2026-03-20 13:45:03 +02:00
iliya
731d15b722 fix: packaged app CLI login detection, PATH merge, IPC status cache 2026-03-19 22:41:52 +02:00
iliya
bec8a6184a fix: refine regex patterns and improve utility functions for mention handling
- Updated regex patterns in chipUtils and mentionLinkify to enhance boundary detection for mentions.
- Refactored taskChangeRequest to simplify earliest date calculation using array destructuring.
- Improved taskReferenceUtils by replacing character boundary checks with a more concise regex.
- Enhanced teamMessageFiltering to ensure boolean checks for message filtering conditions.
- Adjusted urlMatchUtils to refine URL matching regex for better accuracy.
- Updated crossTeam constants to include comments for regex patterns, improving code clarity.
- Removed unused CommentAttachmentPayload type from api.ts to clean up type definitions.
- Introduced McpInstallScope type for better type safety in mcp.ts.
- Enhanced extensionNormalizers to improve URL normalization and added tests for parseGitHubOwnerRepo function.
- Cleaned up pricing.ts by removing unnecessary eslint disable comments.
- Added tests for new functionality in chipUtils and crossTeam constants, ensuring robust coverage.
2026-03-19 13:35:51 +02:00
iliya
a61178105b feat: add action mode protocol text builder for team members and leads
- Introduced `buildActionModeProtocolText` function to generate context-free action mode protocol text, enhancing clarity for both leads and members.
- Updated the `protocols` interface to include the new function, promoting code reuse across different components.
- Refactored existing logic in `actionModeInstructions.ts` and `TeamProvisioningService.ts` to utilize the new protocol text builder, improving maintainability and consistency.
- Enhanced type definitions to reflect the addition of the new protocol functionality.
2026-03-18 11:03:12 +02:00
iliya
71fcf88a48 feat: add process registration protocol text builder
- Introduced a new function `buildProcessProtocolText` to generate context-free protocol text for background process registration.
- Updated the `protocols` interface to include the new function, promoting code reuse across member and lead prompts.
- Integrated the new protocol text into the team provisioning service for improved operational instructions.
- Enhanced type definitions to reflect the addition of the new protocol functionality.
2026-03-18 09:36:16 +02:00
iliya
6ace707653 feat: add team launched notification and related configuration
- Introduced a new notification setting for when a team finishes launching, enhancing user awareness of team readiness.
- Updated the configuration interface and default settings to include the new notification option.
- Implemented logic to trigger the "team launched" notification within the team provisioning service.
- Enhanced validation to ensure the new setting accepts boolean values.
- Updated relevant UI components to allow users to toggle the new notification setting.
2026-03-17 15:13:37 +02:00
iliya
729a756f29 fix: resolve CI failures across all platforms
- Fix TS error: use kanbanTaskState?.reviewer instead of task.reviewer
  (reviewer exists on KanbanTaskState, not TeamTask)
- Fix crossTeam tests: update assertions to match XML tag protocol format
  (CROSS_TEAM_PREFIX_TAG → CROSS_TEAM_TAG_NAME with XML attributes)
- Fix controller test: use 'bob' instead of 'alice' as commenter
  (alice is the lead = same as task owner, so no notification fires)
- Fix TeamMcpConfigBuilder test: use path.join() for cross-platform paths
  (forward slashes fail on Windows where path.join uses backslashes)
- Fix atomicWrite EPERM on Windows: add retry logic for rename operations
  (Windows CI antivirus can briefly hold files, causing EPERM on rename)
2026-03-16 19:56:06 +02:00
iliya
5686d60d99 feat: implement startReview functionality and enhance review state management
- Added startReview function to initiate the review process for tasks, allowing transition to the review column without requiring completed status.
- Updated getCurrentReviewState and getEffectiveReviewState functions to include 'review_started' event type for accurate review state tracking.
- Enhanced task history management by introducing a new TaskReviewStartedEvent type.
- Updated documentation and user instructions to reflect the new review process, emphasizing the importance of calling review_start before review actions.
- Improved test coverage for the new startReview functionality and its integration with existing review processes.
2026-03-16 19:08:12 +02:00
iliya
15df012c4b refactor: streamline task handling and improve data formatting
- Updated taskTools to utilize slimTask for lightweight task summaries, reducing data bloat in responses.
- Introduced taskWriteResult function to handle task write operations more efficiently by stripping unnecessary fields.
- Enhanced jsonTextContent usage across task operations for consistent data formatting.
- Removed legacy member briefing bootstrap checks from TeamProvisioningService and related tests to simplify member spawn logic.
- Improved test coverage for task handling and member provisioning processes.
2026-03-16 18:07:22 +02:00
iliya
6798c4b9e7 feat: enhance team provisioning and message preview handling
- Updated TeamProvisioningService to include subagent type in spawn messages for clarity.
- Improved member registration checks to account for suffixed names, enhancing error handling.
- Refactored SubagentRecentMessagesPreview to strip agent-only blocks from messages, improving display clarity.
- Adjusted tests to reflect changes in message formatting and member provisioning logic.
2026-03-16 17:36:23 +02:00
iliya
cba10b8ad4 feat: enhance team provisioning with member spawn auditing and improved error handling
- Simplified member spawn event handling by removing redundant checks for missing parameters.
- Introduced a new audit function to verify registered members against expected members post-provisioning, flagging any discrepancies.
- Updated logging to provide clearer warnings for unregistered members after provisioning.
- Enhanced test cases to ensure accurate behavior of spawn handling and auditing processes.
2026-03-16 17:20:42 +02:00
iliya
48b485c637 feat: enhance message handling and UI components for task management
- Introduced stable messageId generation for reliable task creation and message tracking.
- Updated TeamAttachmentStore with a TODO for attachment cleanup on failed sends.
- Enhanced task notifications and UI components to improve user experience, including custom role rendering in RoleSelect and improved task detail displays.
- Refactored task change handling logic to support better visibility of changes across task states.
- Added support for displaying source message attachments in TaskDetailDialog.
- Improved overall code structure and documentation for better maintainability.
2026-03-16 16:48:28 +02:00