Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

fix(native): clear stale review files immediately

yxlyx4501e2fa000e
diff --git a/apps/native/components/site/ChangesPane.tsx b/apps/native/components/site/ChangesPane.tsx
index c2856fff..df002481 100644
--- a/apps/native/components/site/ChangesPane.tsx
+++ b/apps/native/components/site/ChangesPane.tsx
@@ -72,9 +72,9 @@ export default function ChangesPane({ root, onClose }: { root?: string; onClose(
<button className={button} title="Refresh changes" aria-label="Refresh changes" onClick={() => setRevision(value => value + 1)}><Icon kind="refresh" /></button>
<button className={button} title="Close changes" aria-label="Close changes" onClick={onClose}><Icon kind="close" /></button>
</header>
- {state && state.worktrees.length > 1 && <div className="border-b border-line px-3 py-2"><select aria-label="Review worktree" value={workspace ?? state.root} onChange={e => { setWorkspace(e.target.value); choose(""); }} className="w-full rounded-md bg-field px-2 py-1 text-xs">{state.worktrees.map(tree => <option key={tree.path} value={tree.path}>{tree.branch} · {tree.path.split('/').pop()}</option>)}</select></div>}
+ {state && state.worktrees.length > 1 && <div className="border-b border-line px-3 py-2"><select aria-label="Review worktree" value={workspace ?? state.root} onChange={e => { setWorkspace(e.target.value); setState(null); choose(""); }} className="w-full rounded-md bg-field px-2 py-1 text-xs">{state.worktrees.map(tree => <option key={tree.path} value={tree.path}>{tree.branch} · {tree.path.split('/').pop()}</option>)}</select></div>}
<div className="flex shrink-0 items-center gap-2 border-b border-line px-3 py-2">
- <div role="group" aria-label="Changes scope" className="flex rounded-lg bg-hover/60 p-0.5">{(["all", "staged", "unstaged"] as const).map(value => <button key={value} aria-pressed={scope === value} onClick={() => { setScope(value); choose(""); }} className={`rounded-md px-2.5 py-1 text-[11px] transition-colors ${scope === value ? "bg-page text-ink shadow-sm" : "text-ink-3 hover:text-ink"}`}>{value === "all" ? "All" : value === "staged" ? "Staged" : "Unstaged"}</button>)}</div>
+ <div role="group" aria-label="Changes scope" className="flex rounded-lg bg-hover/60 p-0.5">{(["all", "staged", "unstaged"] as const).map(value => <button key={value} aria-pressed={scope === value} onClick={() => { setScope(value); setState(null); choose(""); }} className={`rounded-md px-2.5 py-1 text-[11px] transition-colors ${scope === value ? "bg-page text-ink shadow-sm" : "text-ink-3 hover:text-ink"}`}>{value === "all" ? "All" : value === "staged" ? "Staged" : "Unstaged"}</button>)}</div>
<div className="flex min-w-0 flex-1 items-center justify-end gap-1.5 text-[10px] tabular-nums">
{!!state?.totalAdd && <span title="Added lines in tracked files" className="text-green">+{state.totalAdd}</span>}
{!!state?.totalDel && <span title="Removed lines in tracked files" className="text-red">−{state.totalDel}</span>}