Skip to content

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

Python

Target the saved image conversation in cleanup checks

justrach5736e12f4646
diff --git a/apps/native/components/primitives/SidebarNav.tsx b/apps/native/components/primitives/SidebarNav.tsx
index 92402cbf..e9c6249e 100644
--- a/apps/native/components/primitives/SidebarNav.tsx
+++ b/apps/native/components/primitives/SidebarNav.tsx
@@ -447,6 +447,7 @@ export default function SidebarNav({
<div className="group/row relative">
<button
data-row
+ data-session-name={item.id}
type="button"
title={item.hint ? `${item.label} — ${item.hint}` : item.label}
onClick={() => {
diff --git a/apps/native/electron/attachment-lifetime-frontend.cjs b/apps/native/electron/attachment-lifetime-frontend.cjs
index 6e639ed6..d217c395 100644
--- a/apps/native/electron/attachment-lifetime-frontend.cjs
+++ b/apps/native/electron/attachment-lifetime-frontend.cjs
@@ -5,7 +5,7 @@ const { nativeImage } = require('electron');
async function runAttachments({win,origin,temp,output,requests,workspace,send,click,until,report}) {
const wc = win.webContents, js = code => wc.executeJavaScript(code);
if(await js(`!!document.querySelector('[aria-label="Close browser"]')`))await click('[aria-label="Close browser"]');
- if(await js(`!!document.querySelector('[aria-label="Collapse sidebar"]')?.checkVisibility()`)) {
+ if(await js(`!document.querySelector('[data-session-navigation="tabs"]') && !!document.querySelector('[aria-label="Collapse sidebar"]')?.checkVisibility()`)) {
await click('[aria-label="Collapse sidebar"]');
await until(()=>js(`!!document.querySelector('[data-session-navigation="tabs"]')`),'attachment tab navigation');
}
@@ -116,8 +116,9 @@ async function runAttachments({win,origin,temp,output,requests,workspace,send,cl
await click('[data-tab-id]:has(button[aria-pressed="true"]) [aria-label="Close tab"]');
if(await js(`!!document.querySelector('[aria-label="Expand sidebar"]')?.checkVisibility()`))await click('[aria-label="Expand sidebar"]');
else if(await js(`!!document.querySelector('[aria-label="Open navigation"]')?.checkVisibility()`))await click('[aria-label="Open navigation"]');
- await until(()=>js(`!!document.querySelector('#sidebar-chat-list button[data-row]')`),'closed image conversation in History');
- await js(`document.querySelector('#sidebar-chat-list button[data-row]').parentElement.querySelector('button[aria-label^="Actions for "]').setAttribute('data-audit-delete-menu','true')`);
+ const savedRow = '#sidebar-chat-list button[data-session-name=' + JSON.stringify(savedName.replace(/\.session\.json$/, '')) + ']';
+ await until(()=>js(`!!document.querySelector(${JSON.stringify(savedRow)})`),'the exact saved image conversation in History');
+ await js(`document.querySelector(${JSON.stringify(savedRow)}).parentElement.querySelector('button[aria-label^="Actions for "]').setAttribute('data-audit-delete-menu','true')`);
await click('[data-audit-delete-menu="true"]');
await until(()=>js(`!!document.querySelector('button[aria-label^="Delete "]')`),'saved conversation delete action');
await click('button[aria-label^="Delete "]');
diff --git a/docs/adr/0117-clipboard-files-follow-consumer-ownership.md b/docs/adr/0133-clipboard-files-follow-consumer-ownership.md
similarity index 99%
rename from docs/adr/0117-clipboard-files-follow-consumer-ownership.md
rename to docs/adr/0133-clipboard-files-follow-consumer-ownership.md
index d0815a2e..f2aec257 100644
--- a/docs/adr/0117-clipboard-files-follow-consumer-ownership.md
+++ b/docs/adr/0133-clipboard-files-follow-consumer-ownership.md
@@ -1,4 +1,4 @@
-# 0117. Clipboard files follow consumer ownership
+# 0133. Clipboard files follow consumer ownership
Status: accepted 2026-09-15
diff --git a/docs/adr/README.md b/docs/adr/README.md
index c0fb0f36..43e365df 100644
--- a/docs/adr/README.md
+++ b/docs/adr/README.md
@@ -126,7 +126,6 @@ record only when you need the evidence or the edge cases.
| [0113](0113-clipboard-errors-need-evidence.md) | Direct AppKit clipboard failures need typed evidence; generic helper failures never imply Automation permission. |
| [0114](0114-live-citations-are-terminal-presentation.md) | Live terminal citations use per-stream display filters with independent reasoning state; structured JSON/ACP output stays unchanged. |
| [0116](0116-informational-turns-have-bounded-scope.md) | Summary turns gather bounded evidence; coding completion requirements apply to requested changes. |
-| [0117](0117-clipboard-files-follow-consumer-ownership.md) | Clipboard cleanup requires file ownership and released consumers; age alone never deletes active or saved attachments. |
| [0118](0118-file-edits-check-target-worktree.md) | File edits checkpoint the target Git worktree; unresolved paths retain the caller checkpoint. |
| [0119](0119-computer-tools-receive-caller-context.md) | Computer-use MCP requests receive opaque caller-owned session and turn context. |
| [0120](0120-draft-publication-does-not-complete-verification.md) | Draft PRs cannot satisfy verified completion; only a user control scoped to this conversation and goal permits an unverified draft handoff. |
@@ -151,6 +150,7 @@ record only when you need the evidence or the edge cases.
| [0130](0130-mcp-task-app-is-an-optional-result-view.md) | MCP task apps negotiate presentation only; structured results and text fallback share the same bounded task execution. |
| [0131](0131-mcp-http-and-managed-client-registration.md) | HTTP MCP shares bounded task execution; CLI and GUI installs register detected clients additively through a private local service. |
| [0132](0132-desktop-passkeys-use-signed-device-credentials.md) | Desktop Touch ID uses matching signed keychain configuration; account choice is explicit and existing iCloud credentials need a fallback. |
+| [0133](0133-clipboard-files-follow-consumer-ownership.md) | Clipboard cleanup requires file ownership and released consumers; age alone never deletes active or saved attachments. |
## When to write one