diff --git a/apps/arc-web/app/routes/run-files-changed.tsx b/apps/arc-web/app/routes/run-files-changed.tsx index ff79c24a2..8fc399714 100644 --- a/apps/arc-web/app/routes/run-files-changed.tsx +++ b/apps/arc-web/app/routes/run-files-changed.tsx @@ -1,7 +1,17 @@ +import { useState } from "react"; +import { ChevronDownIcon, Cog6ToothIcon } from "@heroicons/react/24/outline"; import { MultiFileDiff } from "@pierre/diffs/react"; export const handle = { wide: true }; +const checkpoints = [ + { id: "all", label: "All changes" }, + { id: "cp-4", label: "Checkpoint 4 — Apply Changes" }, + { id: "cp-3", label: "Checkpoint 3 — Review Changes" }, + { id: "cp-2", label: "Checkpoint 2 — Propose Changes" }, + { id: "cp-1", label: "Checkpoint 1 — Detect Drift" }, +]; + const files = [ { oldFile: { @@ -201,9 +211,59 @@ export async function execute( }, ]; +const BLOCK_COUNT = 5; + +function DiffStat({ additions, deletions }: { additions: number; deletions: number }) { + const total = additions + deletions; + const addBlocks = total === 0 ? 0 : Math.round((additions / total) * BLOCK_COUNT); + const delBlocks = BLOCK_COUNT - addBlocks; + + return ( +
+ +{additions.toLocaleString()} + -{deletions.toLocaleString()} +
+ {Array.from({ length: BLOCK_COUNT }, (_, i) => ( + + ))} +
+
+ ); +} + export default function RunFilesChanged() { + const [checkpoint, setCheckpoint] = useState(checkpoints[0].id); + return (
+
+
+ + +
+
+ + +
+
+ {files.map(({ oldFile, newFile }) => (