diff options
Diffstat (limited to 'makima/frontend/src')
| -rw-r--r-- | makima/frontend/src/components/directives/TaskSlideOutPanel.tsx | 12 | ||||
| -rw-r--r-- | makima/frontend/src/components/mesh/WorktreeFilesPanel.tsx | 1 | ||||
| -rw-r--r-- | makima/frontend/src/lib/api.ts | 9 |
3 files changed, 17 insertions, 5 deletions
diff --git a/makima/frontend/src/components/directives/TaskSlideOutPanel.tsx b/makima/frontend/src/components/directives/TaskSlideOutPanel.tsx index 176728c..f803f90 100644 --- a/makima/frontend/src/components/directives/TaskSlideOutPanel.tsx +++ b/makima/frontend/src/components/directives/TaskSlideOutPanel.tsx @@ -25,6 +25,8 @@ export function TaskSlideOutPanel({ const [showDiff, setShowDiff] = useState(false); const [diffContent, setDiffContent] = useState<string>(""); const [diffLoading, setDiffLoading] = useState(false); + const [selectedFileDiff, setSelectedFileDiff] = useState<string | null>(null); + const [selectedFilePath, setSelectedFilePath] = useState<string | null>(null); // Escape key handler useEffect(() => { @@ -254,10 +256,12 @@ export function TaskSlideOutPanel({ )} </div> - {/* Worktree Changes section (~40% height) */} - <div className="flex-[2] min-h-0 overflow-y-auto"> - {taskId && <WorktreeFilesPanel taskId={taskId} onFileClick={handleFileClick} />} - </div> + {/* Worktree Changes section (~40% height) */} + <div className="flex-[2] min-h-0 overflow-y-auto"> + {taskId && <WorktreeFilesPanel taskId={taskId} onFileClick={handleFileClick} />} + </div> + </> + )} </div> </div> diff --git a/makima/frontend/src/components/mesh/WorktreeFilesPanel.tsx b/makima/frontend/src/components/mesh/WorktreeFilesPanel.tsx index bb3361d..7be39da 100644 --- a/makima/frontend/src/components/mesh/WorktreeFilesPanel.tsx +++ b/makima/frontend/src/components/mesh/WorktreeFilesPanel.tsx @@ -117,7 +117,6 @@ export function WorktreeFilesPanel({ taskId, onFileClick }: WorktreeFilesPanelPr const { stats, files } = worktreeInfo; const displayFiles = expanded ? files : files.slice(0, 10); - const isClickable = !!onFileClick; return ( <div className="bg-[rgba(0,0,0,0.2)] border border-[rgba(117,170,252,0.15)]"> diff --git a/makima/frontend/src/lib/api.ts b/makima/frontend/src/lib/api.ts index aecdac7..d597b44 100644 --- a/makima/frontend/src/lib/api.ts +++ b/makima/frontend/src/lib/api.ts @@ -3078,6 +3078,15 @@ export async function getTaskDiff(taskId: string): Promise<{ taskId: string; suc return res.json(); } +/** Get the worktree diff for a task, optionally scoped to a single file. */ +export async function getWorktreeDiff( + taskId: string, + _filePath?: string, +): Promise<{ diff: string }> { + const result = await getTaskDiff(taskId); + return { diff: result.diff ?? "" }; +} + /** Commit changes in a task's worktree */ export async function commitWorktree(taskId: string, message?: string): Promise<{ taskId: string; success: boolean; commitSha: string | null; error: string | null }> { const res = await authFetch(`${API_BASE}/api/v1/mesh/tasks/${taskId}/worktree-commit`, { |
