desktop: Refresh the cache after the user's own writes

Reviews and writes with announcing off or the node stopped never reach the
node's events, so each write command now invalidates the data it changes,
also when it fails partway. Views that pin data join that refetch instead
of starting another.
This commit is contained in:
Rūdolfs Ošiņš
2026-11-20 19:32:17 +01:00
parent 94ac124c62
commit 748f9e9da7
13 changed files with 559 additions and 46 deletions
+18
View File
@@ -68,4 +68,22 @@ describe("affectedKeys", () => {
}),
).toEqual([keys.repo(rid)]);
});
test("signed refs alone affect nothing", () => {
expect(
affectedKeys({
rid,
refs: [`refs/namespaces/${nid}/refs/rad/sigrefs`],
}),
).toEqual([]);
});
test("an unknown COB type affects the whole repository", () => {
expect(
affectedKeys({
rid,
refs: [`refs/namespaces/${nid}/refs/cobs/org.example.thing/${issue}`],
}),
).toEqual([keys.repo(rid)]);
});
});