diff --git a/src/main/services/team/TeamProvisioningService.ts b/src/main/services/team/TeamProvisioningService.ts index cbd0678d..f947502c 100644 --- a/src/main/services/team/TeamProvisioningService.ts +++ b/src/main/services/team/TeamProvisioningService.ts @@ -417,8 +417,11 @@ function buildProvisioningPrompt(request: TeamCreateRequest): string { const leadName = request.members.find((m) => m.role?.toLowerCase().includes('lead'))?.name || 'team-lead'; const teamCtlOps = buildTeamCtlOpsInstructions(request.teamName, leadName); + const projectName = path.basename(request.cwd); - return `You are running in a non-interactive CLI session. Do not ask questions. Do everything in a single turn. + return `Team Start [Agent Team: "${request.teamName}" | Project: "${projectName}" | Lead: "${leadName}"] + +You are running in a non-interactive CLI session. Do not ask questions. Do everything in a single turn. You are "${leadName}", the team lead. Goal: Provision a Claude Code agent team with live teammates. @@ -494,6 +497,7 @@ function buildLaunchPrompt( const leadName = members.find((m) => m.role?.toLowerCase().includes('lead'))?.name || 'team-lead'; const teamCtlOps = buildTeamCtlOpsInstructions(request.teamName, leadName); + const projectName = path.basename(request.cwd); // Build per-member task snapshots to include in each teammate's spawn prompt const memberTaskBlocks = new Map(); @@ -522,7 +526,9 @@ function buildLaunchPrompt( }) .join('\n\n'); - return `You are running in a non-interactive CLI session. Do not ask questions. Do everything in a single turn. + return `Team Start [Agent Team: "${request.teamName}" | Project: "${projectName}" | Lead: "${leadName}"] + +You are running in a non-interactive CLI session. Do not ask questions. Do everything in a single turn. You are "${leadName}", the team lead. Goal: Reconnect with existing team "${request.teamName}" and resume pending work. diff --git a/src/renderer/components/dashboard/DashboardView.tsx b/src/renderer/components/dashboard/DashboardView.tsx index 1baf00b8..e7e5f1fe 100644 --- a/src/renderer/components/dashboard/DashboardView.tsx +++ b/src/renderer/components/dashboard/DashboardView.tsx @@ -180,15 +180,19 @@ const RepositoryCard = ({ {/* Project path - monospace, muted, clickable to open in file manager */} - + {/* Git branch / worktree info */} {mainBranch ? ( diff --git a/src/renderer/components/team/review/ChangeReviewDialog.tsx b/src/renderer/components/team/review/ChangeReviewDialog.tsx index 320e697d..2c3755da 100644 --- a/src/renderer/components/team/review/ChangeReviewDialog.tsx +++ b/src/renderer/components/team/review/ChangeReviewDialog.tsx @@ -80,7 +80,7 @@ export const ChangeReviewDialog = ({ const [activeFilePath, setActiveFilePath] = useState(null); const [autoViewed, setAutoViewed] = useState(true); const [timelineOpen, setTimelineOpen] = useState(false); - const [discardCounter, setDiscardCounter] = useState(0); + const [discardCounters, setDiscardCounters] = useState>({}); // EditorView map for all visible file editors const editorViewMapRef = useRef(new Map()); @@ -213,7 +213,7 @@ export const ChangeReviewDialog = ({ const handleDiscardFile = useCallback( (filePath: string) => { discardFileEdits(filePath); - setDiscardCounter((c) => c + 1); + setDiscardCounters((prev) => ({ ...prev, [filePath]: (prev[filePath] ?? 0) + 1 })); }, [discardFileEdits] ); @@ -544,7 +544,7 @@ export const ChangeReviewDialog = ({ collapseUnchanged={collapseUnchanged} applying={applying} autoViewed={autoViewed} - discardCounter={discardCounter} + discardCounters={discardCounters} onHunkAccepted={handleHunkAccepted} onHunkRejected={handleHunkRejected} onFullyViewed={handleFullyViewed} diff --git a/src/renderer/components/team/review/ContinuousScrollView.tsx b/src/renderer/components/team/review/ContinuousScrollView.tsx index 9c604841..0c611ddb 100644 --- a/src/renderer/components/team/review/ContinuousScrollView.tsx +++ b/src/renderer/components/team/review/ContinuousScrollView.tsx @@ -23,7 +23,7 @@ interface ContinuousScrollViewProps { collapseUnchanged: boolean; applying: boolean; autoViewed: boolean; - discardCounter: number; + discardCounters: Record; onHunkAccepted: (filePath: string, hunkIndex: number) => void; onHunkRejected: (filePath: string, hunkIndex: number) => void; onFullyViewed: (filePath: string) => void; @@ -54,7 +54,7 @@ export const ContinuousScrollView = ({ collapseUnchanged, applying, autoViewed, - discardCounter, + discardCounters, onHunkAccepted, onHunkRejected, onFullyViewed, @@ -198,7 +198,7 @@ export const ContinuousScrollView = ({ onFullyViewed={onFullyViewed} onContentChanged={onContentChanged} onEditorViewReady={handleEditorViewReady} - discardCounter={discardCounter} + discardCounter={discardCounters[filePath] ?? 0} autoViewed={autoViewed} isViewed={isViewed} />