Skip to content

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

Python

Keep collapsed settings out of focus and update project navigation checks

justrach2936c1282359
diff --git a/apps/native/components/primitives/SidebarNav.tsx b/apps/native/components/primitives/SidebarNav.tsx
index 58087584..8046c4b7 100644
--- a/apps/native/components/primitives/SidebarNav.tsx
+++ b/apps/native/components/primitives/SidebarNav.tsx
@@ -492,7 +492,7 @@ export default function SidebarNav({
</div>
</div>
- {footerControls ?? <div inert={collapsed} aria-hidden={collapsed} className="sidebar-copy mx-2 mt-3 w-[232px] border-t border-line pt-3">
+ {footerControls ? <div inert={collapsed} aria-hidden={collapsed}>{footerControls}</div> : <div inert={collapsed} aria-hidden={collapsed} className="sidebar-copy mx-2 mt-3 w-[232px] border-t border-line pt-3">
<button
type="button"
onClick={onFooterClick ?? onNewChat}
diff --git a/apps/native/electron/project-recovery-visual.cjs b/apps/native/electron/project-recovery-visual.cjs
index 12c3f074..f5ca52b1 100644
--- a/apps/native/electron/project-recovery-visual.cjs
+++ b/apps/native/electron/project-recovery-visual.cjs
@@ -14,7 +14,7 @@ async function runProjectRecovery({ win, origin, output }) {
const input = (label, value) => js(`(()=>{const e=document.querySelector('[aria-label="${label}"]');e.focus();Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,'value').set.call(e,${JSON.stringify(value)});e.dispatchEvent(new Event('input',{bubbles:true}));})()`);
const library = '[data-conversation-library]';
await wc.loadURL(origin);
- await wait(`document.readyState==='complete'&&!!document.querySelector('[data-project-context]')`);
+ await wait(`document.readyState==='complete'&&!!document.querySelector('[data-workspace-ready="true"] textarea[aria-label="Prompt"]')`);
await js(String.raw`(() => {
const previous = window.fetch;
const json = (value, status=200) => new Response(JSON.stringify(value), {status,headers:{'content-type':'application/json'}});
@@ -130,10 +130,10 @@ async function runProjectRecovery({ win, origin, output }) {
await wait(`!!window.recovery.holds.folder`);
await input('Folder path','/demo/recovered');
await click('[role="dialog"] button','Open folder');
- await wait(`!document.querySelector('[role="dialog"]')&&document.querySelector('[data-project-context]')?.textContent.includes('/demo/recovered')`);
+ await wait(`!document.querySelector('[role="dialog"]')&&document.querySelector('[data-workspace-trigger] [title]')?.title.includes('/demo/recovered')`);
await js(`window.recovery.holds.folder()`);
await js(`new Promise(r=>setTimeout(r,100))`);
- assert.ok(await js(`document.querySelector('[data-project-context]').textContent.includes('/demo/recovered')`),'A late folder listing cannot replace the chosen folder');
+ assert.ok(await js(`document.querySelector('[data-workspace-trigger] [title]').title.includes('/demo/recovered')`),'A late folder listing cannot replace the chosen folder');
await wc.loadURL(origin);
await wait(`!!document.querySelector('[data-workspace-ready="true"] textarea[aria-label="Prompt"]')`);
testDesktop.present(win);
diff --git a/apps/native/electron/projects-visual.cjs b/apps/native/electron/projects-visual.cjs
index 70f51f5d..53da82a5 100644
--- a/apps/native/electron/projects-visual.cjs
+++ b/apps/native/electron/projects-visual.cjs
@@ -47,22 +47,24 @@ async function runProjectVisuals({ win, origin, output }) {
await js(`document.querySelector('button[aria-label="Projects"]').click()`);
await wait(`!!document.querySelector('[data-project-path="/demo/folder-42"]')`);
await js(`document.querySelector('[data-project-path="/demo/folder-42"] button:last-child').click()`);
- await wait(`document.querySelector('[data-project-context]')?.textContent.includes('/demo/folder-42')`);
+ await wait(`document.querySelector('[data-workspace-trigger] [title]')?.title.includes('/demo/folder-42')`);
assert.equal(await js(`document.querySelectorAll('[aria-label="Close tab"]').length`), before + 1, 'New project chat creates exactly one tab');
await js(`document.querySelector('button[aria-label="Projects"]').click()`);
await wait(`!!document.querySelector('[data-project-path="/demo/folder-43"]')`);
await js(`document.querySelector('[data-project-path="/demo/folder-43"] button:last-child').click()`);
- await wait(`document.querySelector('[data-project-context]')?.textContent.includes('/demo/folder-43')`);
+ await wait(`document.querySelector('[data-workspace-trigger] [title]')?.title.includes('/demo/folder-43')`);
await js(`document.querySelector('[aria-label="Close tab"]').parentElement.querySelector('button[aria-pressed]').click()`);
- await wait(`document.querySelector('[data-project-context]')?.textContent.includes('/demo/folder-42')`);
+ await wait(`document.querySelector('[data-workspace-trigger] [title]')?.title.includes('/demo/folder-42')`);
await js(`document.querySelector('button[aria-label="New chat"]').click()`);
- await wait(`document.querySelector('[data-project-context]')?.textContent.includes('/demo/folder-42')`);
- await js(`document.querySelector('button[aria-label="Changes"]').click()`);
- await wait(`document.querySelector('button[aria-label="Changes"]')?.getAttribute('aria-current')==='page'`);
+ await wait(`document.querySelector('[data-workspace-trigger] [title]')?.title.includes('/demo/folder-42')`);
+ await js(`document.querySelector('button[aria-label="Review workspace changes"]').click()`);
+ await wait(`!!document.querySelector('[aria-label="Workspace changes"]')`);
await wait(`document.body.textContent.includes('palette.css')`);
+ await js(`document.querySelector('button[aria-label="Workspace tools"]').click()`);
+ await wait(`!!document.querySelector('button[aria-label="Files"]')`);
await js(`document.querySelector('button[aria-label="Files"]').click()`);
- await wait(`document.querySelector('button[aria-label="Files"]')?.getAttribute('aria-current')==='page'`);
- assert.equal(await js(`document.querySelector('button[aria-label="Changes"]')?.getAttribute('aria-current')`), null);
+ await wait(`!!document.querySelector('[aria-label="Workspace files"]')`);
+ assert.equal(await js(`!!document.querySelector('[aria-label="Workspace changes"]')`), false);
await js(`document.querySelector('button[aria-label="Open folder…"]').click()`);
await wait(`!!document.querySelector('[role="dialog"]')`);
// Unmount the picker before navigating: an in-flight listing + loadURL
@@ -72,7 +74,7 @@ async function runProjectVisuals({ win, origin, output }) {
await wc.loadURL(origin);
await wait(`!!document.querySelector('[data-workspace-ready="true"] textarea[aria-label="Prompt"]')`);
win.setSize(900, 680);
- await js(`Array.from(document.querySelectorAll('button')).find(b=>b.textContent==='All projects').click()`);
+ await js(`document.querySelector('button[aria-label="Projects"]').click()`);
await wait(`!!document.querySelector('[aria-label="Search projects"]')`);
assert.ok(await js(`(()=>{const r=document.querySelector('section[aria-label="Projects"]').getBoundingClientRect();return r.left>=0&&r.right<=innerWidth})()`));
await js(`Array.from(document.querySelectorAll('button')).find(b=>b.textContent==='Back to chat').click()`);
diff --git a/apps/native/electron/review-recovery-visual.cjs b/apps/native/electron/review-recovery-visual.cjs
index 4fa2954f..29266db9 100644
--- a/apps/native/electron/review-recovery-visual.cjs
+++ b/apps/native/electron/review-recovery-visual.cjs
@@ -7,7 +7,7 @@ async function runReviewRecovery({ win, origin, output }) {
const wc=win.webContents, js=code=>wc.executeJavaScript(code);
const wait=async code=>{for(let i=0;i<120;i++){if(await js(code))return;await new Promise(r=>setTimeout(r,50));}throw Error(`Review recovery timed out: ${code}`);};
await wc.loadURL(origin);
- await wait(`!!document.querySelector('button[aria-label="Changes"]')`);
+ await wait(`!!document.querySelector('button[aria-label="Review workspace changes"]')`);
await js(`(()=>{
const previous=window.fetch,json=value=>new Response(JSON.stringify(value),{headers:{'content-type':'application/json'}});
window.reviewRecovery={mode:'fail',holds:[]};
@@ -26,7 +26,7 @@ async function runReviewRecovery({ win, origin, output }) {
return json({root,branch:root==='/demo/other-tree'?'other-branch':'main',files:[{path:scope+'.txt',add:1,del:1,untracked:false,status:' M'}],totalAdd:1,totalDel:1,commits:[],worktrees:[{path:r.base,branch:'main'},{path:'/demo/other-tree',branch:'other-branch'}]});
};
})()`);
- await js(`document.querySelector('button[aria-label="Changes"]').click()`);
+ await js(`document.querySelector('button[aria-label="Review workspace changes"]').click()`);
await wait(`!!document.querySelector('[aria-label="Workspace changes"] [role="alert"]')`);
assert.equal(await js(`document.querySelector('[aria-label="File diff"]').textContent.includes('Working tree is clean')`),false,'Failed Git reads are not clean worktrees');
assert.ok(await js(`!!document.querySelector('[aria-label="Updates unavailable"]')`),'Live indicator reflects failure');