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>
This commit is contained in:
gsxdsm
2026-02-20 13:48:22 -08:00
committed by GitHub
parent 7df2182818
commit 0a5540c9a2
70 changed files with 4525 additions and 857 deletions

View File

@@ -200,6 +200,7 @@ export {
getThinkingTokenBudget,
isAdaptiveThinkingModel,
getThinkingLevelsForModel,
getDefaultThinkingLevel,
// Event hook constants
EVENT_HOOK_TRIGGER_LABELS,
// Claude-compatible provider templates (new)
@@ -359,6 +360,7 @@ export type {
AddRemoteResult,
AddRemoteResponse,
AddRemoteErrorResponse,
MergeStateInfo,
} from './worktree.js';
export { PR_STATES, validatePRState } from './worktree.js';

View File

@@ -268,6 +268,16 @@ export function getThinkingLevelsForModel(model: string): ThinkingLevel[] {
return ['none', 'low', 'medium', 'high', 'ultrathink'];
}
/**
* Get the default thinking level for a given model.
* Used when selecting a model via the primary button in the two-stage selector.
* Always returns 'none' — users can configure their preferred default
* via the defaultThinkingLevel setting in the model defaults page.
*/
export function getDefaultThinkingLevel(_model: string): ThinkingLevel {
return 'none';
}
/** ModelProvider - AI model provider for credentials and API key management */
export type ModelProvider = 'claude' | 'cursor' | 'codex' | 'opencode' | 'gemini' | 'copilot';
@@ -1051,6 +1061,8 @@ export interface GlobalSettings {
enableDependencyBlocking: boolean;
/** Skip verification requirement in auto-mode (treat 'completed' same as 'verified') */
skipVerificationInAutoMode: boolean;
/** User's preferred action after a clean merge (null = ask every time) */
mergePostAction: 'commit' | 'manual' | null;
/** Default: use git worktrees for feature branches */
useWorktrees: boolean;
/** Default: planning approach (skip/lite/spec/full) */
@@ -1086,6 +1098,15 @@ export interface GlobalSettings {
/** Phase-specific AI model configuration */
phaseModels: PhaseModelConfig;
/** Default thinking level applied when selecting a model via the primary button
* in the two-stage model selector. Users can still adjust per-model via the expand arrow.
* Defaults to 'none' (no extended thinking). */
defaultThinkingLevel?: ThinkingLevel;
/** Default reasoning effort applied when selecting a Codex model via the primary button
* in the two-stage model selector. Defaults to 'none'. */
defaultReasoningEffort?: ReasoningEffort;
// Legacy AI Model Selection (deprecated - use phaseModels instead)
/** @deprecated Use phaseModels.enhancementModel instead */
enhancementModel: ModelAlias;
@@ -1150,6 +1171,10 @@ export interface GlobalSettings {
/** Maps project path -> last selected session ID in that project */
lastSelectedSessionByProject: Record<string, string>;
// Worktree Selection Tracking
/** Maps project path -> last selected worktree (path + branch) for restoring on PWA reload */
currentWorktreeByProject?: Record<string, { path: string | null; branch: string }>;
// Window State (Electron only)
/** Persisted window bounds for restoring position/size across sessions */
windowBounds?: WindowBounds;
@@ -1574,6 +1599,7 @@ export const DEFAULT_GLOBAL_SETTINGS: GlobalSettings = {
defaultSkipTests: true,
enableDependencyBlocking: true,
skipVerificationInAutoMode: false,
mergePostAction: null,
useWorktrees: true,
defaultPlanningMode: 'skip',
defaultRequirePlanApproval: false,
@@ -1585,6 +1611,8 @@ export const DEFAULT_GLOBAL_SETTINGS: GlobalSettings = {
showQueryDevtools: true,
enableAiCommitMessages: true,
phaseModels: DEFAULT_PHASE_MODELS,
defaultThinkingLevel: 'none',
defaultReasoningEffort: 'none',
enhancementModel: 'sonnet', // Legacy alias still supported
validationModel: 'opus', // Legacy alias still supported
enabledCursorModels: getAllCursorModelIds(), // Returns prefixed IDs
@@ -1607,6 +1635,7 @@ export const DEFAULT_GLOBAL_SETTINGS: GlobalSettings = {
recentFolders: [],
worktreePanelCollapsed: false,
lastSelectedSessionByProject: {},
currentWorktreeByProject: {},
autoLoadClaudeMd: true,
skipSandboxWarning: false,
codexAutoLoadAgents: DEFAULT_CODEX_AUTO_LOAD_AGENTS,

View File

@@ -74,3 +74,21 @@ export interface AddRemoteErrorResponse {
/** Optional error code for specific error types (e.g., 'REMOTE_EXISTS') */
code?: string;
}
/**
* Merge state information for a git repository
*/
export interface MergeStateInfo {
/** Whether a merge is currently in progress */
isMerging: boolean;
/** Type of merge operation: 'merge' | 'rebase' | 'cherry-pick' | null */
mergeOperationType: 'merge' | 'rebase' | 'cherry-pick' | null;
/** Whether the merge completed cleanly (no conflicts) */
isCleanMerge: boolean;
/** Files affected by the merge */
mergeAffectedFiles: string[];
/** Files with unresolved conflicts */
conflictFiles: string[];
/** Whether the current HEAD is a completed merge commit (has multiple parents) */
isMergeCommit?: boolean;
}