Q195: a change reloads only what is not already shown, and the snapshot stops carrying records the window never reads

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-09 09:20:45 -04:00
1 parent 2f79e4261f
commit 56eac39b1b
31 files changed
+146 -214

No files matched your search

+4
View File
@@ -25,6 +25,10 @@ test("a record that breaks one page leaves the rest of the app working", async (
db.prepare("insert into approvals(id, org_id, kind, title, details, risk, requested_by_type, state, created_at) values ('app_bad', ?, 'task_risk', 'Broken request', 'd', 'unknown', 'system', 'pending', ?)")
.run(orgId, new Date().toISOString());
db.close();
// Written behind the app's back, so the test announces it as the app's own changes are.
await app.evaluate(({ BrowserWindow }) => {
BrowserWindow.getAllWindows()[0]!.webContents.send("agentcompany:renderer-event", { type: "snapshot-changed", version: Number.MAX_SAFE_INTEGER });
});
await page.getByRole("button", { name: "Approvals" }).click();
const failure = page.getByRole("alert").filter({ hasText: "This page could not be shown." });
+1 -1
View File
@@ -54,7 +54,7 @@ test("data that can no longer be updated says so, from when it is, and recovers"
db.close();
};
const announceChange = () => app.evaluate(({ BrowserWindow }) => {
BrowserWindow.getAllWindows()[0]!.webContents.send("agentcompany:renderer-event", { type: "snapshot-changed" });
BrowserWindow.getAllWindows()[0]!.webContents.send("agentcompany:renderer-event", { type: "snapshot-changed", version: Number.MAX_SAFE_INTEGER });
});
try {
const page = await app.firstWindow();