Skip to content

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

Python

Fix Accord CI on Linux/Windows and duplicate session tabs

justrache1cc0d94fc7e
diff --git a/apps/native/components/site/HarnessChrome.tsx b/apps/native/components/site/HarnessChrome.tsx
index da957439..ae3c231c 100644
--- a/apps/native/components/site/HarnessChrome.tsx
+++ b/apps/native/components/site/HarnessChrome.tsx
@@ -29,7 +29,7 @@ export default function HarnessChrome({navigationToggle, sidebarVisible = false,
toggleTerminal, agentsOpen, onAgents, workingAgents = 0, tasksOpen = false, taskCount = 0, onTasks, splitNotice, onTabPointerDown, onTabClickCapture}: Props) {
return (
<div data-workspace-toolbar className={`${reviewStyles.chatbar} flex shrink-0 flex-col ${sidebarVisible ? "overflow-visible bg-transparent" : "overflow-hidden rounded-[14px] border border-line bg-page"}`}>
- <div data-session-tab-strip hidden={sidebarVisible} className={sidebarVisible ? "hidden" : "flex h-10 min-w-0 shrink-0 items-center gap-1 px-2"}>
+ {!sidebarVisible && <div data-session-tab-strip className="flex h-10 min-w-0 shrink-0 items-center gap-1 px-2">
<div className="flex min-w-0 flex-1 items-center gap-1 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden">
<button type="button" aria-label="Show agents" aria-pressed={agentsOpen} onClick={onAgents}
className={paneBtn(agentsOpen)}>Agents{workingAgents > 0 ? ` (${workingAgents})` : ""}</button>
@@ -44,7 +44,7 @@ export default function HarnessChrome({navigationToggle, sidebarVisible = false,
</svg>
</button>
</div>
- </div>
+ </div>}
<div className={`${reviewStyles.actions} flex shrink-0 items-center gap-1 ${sidebarVisible ? "justify-end" : "min-h-10 border-t border-line px-2 py-1"}`}>
{navigationToggle}
<button type="button" aria-pressed={filesOpen && !changesOpen} onClick={onFiles} title={`${chatCwd ?? "Workspace"}\nShow this chat's files`}
diff --git a/apps/native/electron/session-navigation-visual.cjs b/apps/native/electron/session-navigation-visual.cjs
index 387eaf16..6747e06c 100644
--- a/apps/native/electron/session-navigation-visual.cjs
+++ b/apps/native/electron/session-navigation-visual.cjs
@@ -22,7 +22,7 @@ async function runSessionNavigation({ win, output }) {
fs.writeFileSync(path.join(output,name+'.png'),(await wc.capturePage()).toPNG());
};
await wait(`!!document.querySelector('[data-session-navigation="sidebar"]')`);
- assert.equal(await js(`document.querySelector('[data-session-tab-strip]').getBoundingClientRect().height`),0);
+ assert.equal(await js(`document.querySelector('[data-session-tab-strip]')?.getBoundingClientRect().height ?? 0`),0);
await click('[aria-label="Workspace navigation"] button[aria-label="Appearance"]');
await wait(`!!document.querySelector('[role="dialog"][aria-label="Appearance"]')`);
const appearance = await js(`(()=>{const d=document.querySelector('[role="dialog"][aria-label="Appearance"]');const r=d.getBoundingClientRect();const h=[...d.querySelectorAll('strong')].find(el=>el.textContent==='Appearance');const hr=h.getBoundingClientRect();return {left:r.left,right:r.right,top:r.top,headingTop:hr.top,headingVisible:hr.bottom>0&&hr.top<innerHeight,vw:innerWidth};})()`);
@@ -73,7 +73,7 @@ async function runSessionNavigation({ win, output }) {
await wait(`!!document.querySelector('[data-session-navigation="tabs"]')`);
await click('[aria-label="Open navigation"]');
await wait(`!!document.querySelector('[data-session-navigation="sidebar"]')`);
- assert.equal(await js(`document.querySelector('[data-session-tab-strip]').getBoundingClientRect().height`),0);
+ assert.equal(await js(`document.querySelector('[data-session-tab-strip]')?.getBoundingClientRect().height ?? 0`),0);
await capture('narrow-sidebar');
await click('[aria-label="Close navigation"]');
await wait(`!!document.querySelector('[data-session-navigation="tabs"]')`);
diff --git a/src/presence_accord.zig b/src/presence_accord.zig
index 8b6f62c6..e1f4966c 100644
--- a/src/presence_accord.zig
+++ b/src/presence_accord.zig
@@ -405,6 +405,7 @@ test "Accord live path is off in tests unless enabled" {
}
test "Accord stats report session RSS when enabled" {
+ if (builtin.os.tag == .windows) return;
test_enabled = true;
defer test_enabled = false;
const s = stats();
@@ -429,15 +430,10 @@ test "listen binds a 0600 sock and stop unlinks it" {
const name = g_own_name orelse return error.NoSock;
var path_buf: [std.fs.max_path_bytes]u8 = undefined;
const path = try std.fmt.bufPrint(&path_buf, "{s}/{s}", .{ dir, name });
- var tmp: [107:0]u8 = undefined;
- try std.testing.expect(path.len <= tmp.len);
- @memcpy(tmp[0..path.len], path);
- tmp[path.len] = 0;
- var st: std.c.Stat = undefined;
- try std.testing.expect(std.c.stat(tmp[0..path.len :0], &st) == 0);
- try std.testing.expectEqual(@as(std.c.mode_t, 0o600), st.mode & 0o777);
+ const st = try Io.Dir.cwd().statFile(io, path, .{});
+ try std.testing.expectEqual(@as(std.posix.mode_t, 0o600), st.permissions.toMode() & 0o777);
stop(io);
- try std.testing.expect(std.c.stat(tmp[0..path.len :0], &st) != 0);
+ try std.testing.expectError(error.FileNotFound, Io.Dir.cwd().statFile(io, path, .{}));
}
test "listenUnix socket is 0600" {
@@ -450,12 +446,8 @@ test "listenUnix socket is 0600" {
listener.deinit(io);
Io.Dir.cwd().deleteFile(io, path) catch {};
}
- var tmp: [107:0]u8 = undefined;
- @memcpy(tmp[0..path.len], path);
- tmp[path.len] = 0;
- var st: std.c.Stat = undefined;
- try std.testing.expect(std.c.stat(tmp[0..path.len :0], &st) == 0);
- try std.testing.expectEqual(@as(std.c.mode_t, 0o600), st.mode & 0o777);
+ const st = try Io.Dir.cwd().statFile(io, path, .{});
+ try std.testing.expectEqual(@as(std.posix.mode_t, 0o600), st.permissions.toMode() & 0o777);
}
test "Unix 0600 round-trips the JSONL line" {