feat(KB-617): add Changes tab to task detail modal for viewing file diffs

- Add baseCommitSha field to tasks for diff computation baseline
- Track modified files in executor and store in database
- Add /api/tasks/:id/diff endpoint to serve unified diffs
- Add getTaskDiff() API client function in dashboard
- Create TaskChangesTab component with file list and diff viewer
- Integrate Changes tab into TaskDetailModal with proper styling
- Add changeset for the new diff viewer feature
This commit is contained in:
gsxdsm
2026-03-31 22:58:38 -07:00
parent 24f68435f6
commit 4ff25d800e
11 changed files with 571 additions and 18 deletions

View File

@@ -1868,3 +1868,14 @@ export function fetchProjectTasks(projectId: string, limit?: number, offset?: nu
export function fetchProjectConfig(projectId: string): Promise<{ maxConcurrent: number; rootDir: string }> {
return api<{ maxConcurrent: number; rootDir: string }>(`/projects/${encodeURIComponent(projectId)}/config`);
}
/** Diff information for a task */
export interface TaskDiff {
files: string[];
diffs: Record<string, { stat: string; patch: string }>;
}
/** Fetch diff information for a task */
export function fetchTaskDiff(taskId: string): Promise<TaskDiff> {
return api<TaskDiff>(`/tasks/${encodeURIComponent(taskId)}/diff`);
}