Commit Graph

348 Commits

Author SHA1 Message Date
gsxdsm
0a5540c9a2 Fix concurrency limits and remote branch fetching issues (#788)
* Changes from fix/bug-fixes

* feat: Refactor worktree iteration and improve error logging across services

* feat: Extract URL/port patterns to module level and fix abort condition

* fix: Improve IPv6 loopback handling, select component layout, and terminal UI

* feat: Add thinking level defaults and adjust list row padding

* Update apps/ui/src/store/app-store.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat: Add worktree-aware terminal creation and split options, fix npm security issues from audit

* feat: Add tracked remote detection to pull dialog flow

* feat: Add merge state tracking to git operations

* feat: Improve merge detection and add post-merge action preferences

* Update apps/ui/src/components/views/board-view/dialogs/git-pull-dialog.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update apps/ui/src/components/views/board-view/dialogs/git-pull-dialog.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix: Pass merge detection info to stash reapplication and handle merge state consistently

* fix: Call onPulled callback in merge handlers and add validation checks

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-02-20 13:48:22 -08:00
gsxdsm
7df2182818 Improve pull request flow, add branch selection for worktree creation, fix auto-mode concurrency count (#787)
* Changes from fix/fetch-before-pull-fetch

* feat: Improve pull request flow, add branch selection for worktree creation, fix for automode concurrency count

* feat: Add validation for remote names and improve error handling

* Address PR comments and mobile layout fixes

* ```
refactor: Extract PR target resolution logic into dedicated service
```

* feat: Add app shell UI and improve service imports. Address PR comments

* fix: Improve security validation and cache handling in git operations

* feat: Add GET /list endpoint and improve parameter handling

* chore: Improve validation, accessibility, and error handling across apps

* chore: Format vite server port configuration

* fix: Add error handling for gh pr list command and improve offline fallbacks

* fix: Preserve existing PR creation time and improve remote handling
2026-02-19 21:55:12 -08:00
gsxdsm
ae10dea2bf feat: Add includeUntracked option and improve error handling for stash operations 2026-02-18 23:32:24 -08:00
gsxdsm
be4153c374 fix: Improve error handling and state management in auto-mode and utilities 2026-02-18 23:12:11 -08:00
gsxdsm
a144a63c51 fix: Resolve git operation error handling and conflict detection issues 2026-02-18 23:03:39 -08:00
gsxdsm
205f662022 fix: Improve error handling and validation across multiple services 2026-02-18 22:11:31 -08:00
gsxdsm
53d07fefb8 feat: Fix new branch issues and address code review comments 2026-02-18 21:36:00 -08:00
gsxdsm
15ca1eb6d3 feat: Add process abort control and improve auth detection 2026-02-18 20:48:37 -08:00
gsxdsm
4ee160fae4 fix: Address review comments 2026-02-18 19:52:25 -08:00
gsxdsm
983eb21faa feat: Address review comments, add stage/unstage functionality, conflict resolution improvements, support for Sonnet 4.6 2026-02-18 18:58:33 -08:00
gsxdsm
df9a6314da refactor: Enhance session management and error handling in AgentService and related components
- Improved session handling by implementing ensureSession to load sessions from disk if not in memory, reducing "session not found" errors.
- Enhanced error messages for non-existent sessions, providing clearer diagnostics.
- Updated CodexProvider and OpencodeProvider to improve error handling and messaging.
- Refactored various routes to use async/await for better readability and error handling.
- Added event emission for merge and stash operations in the MergeService and StashService.
- Cleaned up error messages in AgentExecutor to remove redundant prefixes and ANSI codes for better clarity.
2026-02-18 17:30:12 -08:00
gsxdsm
6903d3c508 fix: Standardize event name and import path 2026-02-18 11:21:43 -08:00
gsxdsm
5c441f2313 feat: Add GPT-5 model variants and improve Codex execution logic. Addressed code review comments 2026-02-18 11:15:38 -08:00
gsxdsm
d30296d559 feat: Add git log parsing and rebase endpoint with input validation 2026-02-18 00:37:41 -08:00
gsxdsm
887e2ea76b fix: Correct parsing of git output blocks and improve stash UI accessibility 2026-02-17 23:15:21 -08:00
gsxdsm
dd4c738e91 fix: Address code review comments 2026-02-17 23:15:21 -08:00
gsxdsm
9af63bc1ef refactor: Improve all git operations, add stash support, add improved pull request flow, add worktree file copy options, address code review comments, add cherry pick options 2026-02-17 22:02:58 -08:00
gsxdsm
7fcf3c1e1f feat: Mobile improvements and Add selective file staging and improve branch switching 2026-02-17 15:20:28 -08:00
gsxdsm
de021f96bf fix: Remove unused vars and improve type safety. Improve task recovery 2026-02-17 13:18:40 -08:00
gsxdsm
8bb10632b1 Merge remote-tracking branch 'upstream/v0.15.0rc' into feat/add-zai-usage-tracking
# Conflicts:
#	apps/ui/src/components/usage-popover.tsx
#	apps/ui/src/components/views/board-view/mobile-usage-bar.tsx
2026-02-17 11:19:06 -08:00
gsxdsm
06ef4f883f Merge pull request #781 from gsxdsm/fix/improve-restart-recovery
feat: Add feature state reconciliation on server startup
2026-02-17 11:15:03 -08:00
gsxdsm
dee770c2ab refactor: Consolidate global settings fetching to avoid duplicate calls 2026-02-17 10:32:20 -08:00
gsxdsm
b5ad77b0f9 feat: Add feature state reconciliation on server startup 2026-02-17 09:56:54 -08:00
gsxdsm
a09a2c76ae fix: Address code review feedback and fix lint errors 2026-02-17 00:13:38 -08:00
gsxdsm
8af1b8bd08 chore: Increase default max turns for agent execution from 20/50 to 100 2026-02-16 22:39:13 -08:00
gsxdsm
aa940d44ff feat: Add task retry logic and improve max turns limit 2026-02-16 22:10:50 -08:00
gsxdsm
416ef3a394 feat: Add error handling to auto-mode facade and implement followUp feature. Fix Claude weekly usage indicator. Fix mobile card drag 2026-02-16 18:58:42 -08:00
gsxdsm
ab5d6a0e54 feat: Improve callback safety and remove unnecessary formatting in auto-mode facade 2026-02-16 13:14:55 -08:00
gsxdsm
0b03e70f1d fix: Resolve null coalescing, feature verification, and test abort handling issues 2026-02-16 12:27:56 -08:00
gsxdsm
434792a2ef fix: Normalize 'main' branch to __main__ in auto-loop key generation 2026-02-16 12:07:05 -08:00
gsxdsm
462dbf1522 fix: Address code review comments 2026-02-16 11:53:09 -08:00
gsxdsm
eed5e20438 fix(agent-service): fallback to effectiveModel when requestedModel is undefined 2026-02-16 10:47:52 -08:00
eclipxe
7d5bc722fa Feat: Show Gemini Usage in usage dropdown and mobile sidebar 2026-02-15 20:56:53 -08:00
eclipxe
7765a12868 Feat: Add z.ai usage tracking 2026-02-15 20:55:37 -08:00
gsxdsm
8542a32f4f refactor(auto-mode): enhance feature retrieval logic in facade and global service
- Replaced synchronous feature retrieval with asynchronous logic in both AutoModeServiceFacade and GlobalAutoModeService.
- Updated filtering logic to resolve the primary branch name for main worktrees, improving accuracy in feature status checks.
- This change enhances the responsiveness and correctness of feature handling in auto mode operations.
2026-02-14 21:28:15 -08:00
gsxdsm
0745832d1e refactor(auto-mode): convert getStatusForProject to async and enhance feature retrieval
- Updated getStatusForProject method in AutoModeServiceCompat and its facade to be asynchronous, allowing for better handling of feature status retrieval.
- Modified related status handlers in the server routes to await the updated method.
- Introduced a new method, getRunningFeaturesForWorktree, in ConcurrencyManager to improve feature ID retrieval based on branch normalization.
- Adjusted BoardView component to ensure consistent handling of running auto tasks across worktrees.

These changes improve the responsiveness and accuracy of the auto mode feature in the application.
2026-02-14 21:07:24 -08:00
gsxdsm
0f0f5159d2 feat(auto-mode): implement facade caching and enhance error handling
- Added caching for facades in AutoModeServiceCompat to persist auto loop state across API calls.
- Improved error handling in BoardView for starting and stopping auto mode, with user-friendly toast notifications.
- Updated WorktreePanel to manage auto mode state and concurrency limits more effectively.
- Enhanced useAutoMode hook to prevent state overwrites during transitions and synchronize UI with backend status.

This update optimizes performance and user experience in the auto mode feature.
2026-02-14 20:37:03 -08:00
gsxdsm
bcc854234c Fix custom providers not passing model name properly 2026-02-14 19:24:10 -08:00
Kacper
5ffbfb3217 fix(server): Address PR #733 review feedback and fix cross-platform tests
- Extract merge logic from pipeline-orchestrator to merge-service.ts to avoid HTTP self-call
- Make agent-executor error handling provider-agnostic using shared isAuthenticationError utility
- Fix cross-platform path handling in tests using path.normalize/path.resolve helpers
- Add catch handlers in plan-approval-service tests to prevent unhandled promise rejection warnings

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 18:54:02 -08:00
Shirone
7c89923a6e fix: address PR review issues for auto-mode refactor
- agent-executor: move executeQuery into try block for proper heartbeat cleanup,
  re-parse tasks when edited plan is approved
- auto-loop-coordinator: handle feature execution failures with proper logging
  and failure tracking, support backward-compatible method signatures
- facade: delegate getActiveAutoLoopProjects/Worktrees to coordinator,
  always create own AutoLoopCoordinator (not shared), pass projectPath
  to approval methods and branchName to failure tracking
- global-service: document shared autoLoopCoordinator is for monitoring only
- execution-types: fix ExecuteFeatureFn type to match implementation
- feature-state-manager: use readJsonWithRecovery for loadFeature
- pipeline-orchestrator: add defensive null check and try/catch for
  merge response parsing
- plan-approval-service: use project-scoped keys to prevent cross-project
  collisions, maintain backward compatibility for featureId-only lookups

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 18:54:02 -08:00
Shirone
63b1a353d9 fix(facade): pass previousContent to AgentExecutor for pipeline steps
The PipelineOrchestrator passes previousContent to preserve the agent
output history when running pipeline steps. This was being lost because
the facade's runAgentFn callback wasn't forwarding it to AgentExecutor.

Without this fix, pipeline steps would overwrite the agent-output.md
file instead of appending to it with a "Follow-up Session" separator.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 18:54:02 -08:00
Shirone
49bdaaae71 fix(agent-executor): restore wrench emoji in tool output format
The wrench emoji (🔧) was accidentally removed in commit 6ec9a257
during the service condensing refactor. This broke:

1. Log parser - uses startsWith('🔧') to detect tool calls, causing
   them to be categorized as "info" instead of "tool_call"
2. Agent context parser - uses '🔧 Tool: TodoWrite' marker to find
   tasks, causing task list to not appear on kanban cards

This fix restores the emoji to fix both issues.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 18:54:02 -08:00
Shirone
28224e1051 fix(facade): wire runAgentFn to AgentExecutor.execute
The facade had stubs for runAgentFn that threw errors, causing feature
execution to fail with "runAgentFn not implemented in facade".

This fix wires both ExecutionService and PipelineOrchestrator runAgentFn
callbacks to properly call AgentExecutor.execute() with:
- Provider from ProviderFactory.getProviderForModel()
- Bare model from stripProviderPrefix()
- Proper AgentExecutorCallbacks for waitForApproval, saveFeatureSummary, etc.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 18:54:02 -08:00
Shirone
43309e383f refactor(06-04): extract types and condense agent-executor/pipeline-orchestrator
- Create agent-executor-types.ts with execution option/result/callback types
- Create pipeline-types.ts with context/status/result types
- Condense agent-executor.ts stream processing and add buildExecOpts helper
- Condense pipeline-orchestrator.ts methods and simplify event emissions

Further line reduction limited by Prettier reformatting condensed code.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 18:54:02 -08:00
Shirone
efd4284c10 refactor(06-04): trim 5 oversized services to under 500 lines
- agent-executor.ts: 1317 -> 283 lines (merged duplicate task loops)
- execution-service.ts: 675 -> 314 lines (extracted callback types)
- pipeline-orchestrator.ts: 662 -> 471 lines (condensed methods)
- auto-loop-coordinator.ts: 590 -> 277 lines (condensed type definitions)
- recovery-service.ts: 558 -> 163 lines (simplified state methods)

Created execution-types.ts for callback type definitions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 18:54:02 -08:00
Shirone
473f935c90 refactor(06-04): delete auto-mode-service.ts monolith
- Delete the 2705-line auto-mode-service.ts monolith
- Create AutoModeServiceCompat as compatibility layer for routes
- Create GlobalAutoModeService for cross-project operations
- Update all routes to use AutoModeServiceCompat type
- Add SharedServices interface for state sharing across facades
- Add getActiveProjects/getActiveWorktrees to AutoLoopCoordinator
- Delete obsolete monolith test files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 18:54:02 -08:00
Shirone
1b32a6bc3a chore(06-01): create index.ts with exports
- Export AutoModeServiceFacade class
- Export createAutoModeFacade convenience factory function
- Re-export all types from types.ts for route consumption
- Re-export types from extracted services (AutoModeConfig, RunningFeature, etc.)

All 1809 server tests pass.
2026-02-14 18:53:23 -08:00
Shirone
a0484624b7 feat(06-01): create AutoModeServiceFacade with all 23 methods
- Create facade.ts with per-project factory pattern
- Implement all 23 public methods from RESEARCH.md inventory:
  - Auto loop control: startAutoLoop, stopAutoLoop, isAutoLoopRunning, getAutoLoopConfig
  - Feature execution: executeFeature, stopFeature, resumeFeature, followUpFeature, verifyFeature, commitFeature
  - Status queries: getStatus, getStatusForProject, getActiveAutoLoopProjects, getActiveAutoLoopWorktrees, getRunningAgents, checkWorktreeCapacity, contextExists
  - Plan approval: resolvePlanApproval, waitForPlanApproval, hasPendingApproval, cancelPlanApproval
  - Analysis/recovery: analyzeProject, resumeInterruptedFeatures, detectOrphanedFeatures
  - Lifecycle: markAllRunningFeaturesInterrupted
- Use thin delegation pattern to underlying services
- Note: followUpFeature and analyzeProject require AutoModeService until full migration
2026-02-14 18:53:23 -08:00
Shirone
0383f85507 chore(06-01): create facade types and directory structure
- Create apps/server/src/services/auto-mode/ directory
- Add types.ts with FacadeOptions interface
- Re-export types from extracted services (AutoModeConfig, RunningFeature, etc.)
- Add facade-specific types (AutoModeStatus, WorktreeCapacityInfo, etc.)
2026-02-14 18:53:23 -08:00
Shirone
1a7dd5d1eb refactor(05-03): wire ExecutionService delegation in AutoModeService
- Replace executeFeature body with delegation to executionService.executeFeature()
- Replace stopFeature body with delegation to executionService.stopFeature()
- Remove ~312 duplicated lines from AutoModeService (3017 -> 2705)
- All 1809 server tests pass

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 18:53:23 -08:00