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
+1
View File
@@ -35,6 +35,7 @@ export const keys = {
patchList: (rid: string, status: string) =>
["repo", rid, "patches", status] as const,
patch: (rid: string, id: string) => ["repo", rid, "patch", id] as const,
patchDetails: (rid: string) => ["repo", rid, "patch"] as const,
releases: (rid: string) => ["repo", rid, "releases"] as const,
boards: (rid: string) => ["repo", rid, "boards"] as const,
jobs: (rid: string) => ["repo", rid, "jobs"] as const,
+16 -6
View File
@@ -9,12 +9,22 @@ export interface RefUpdate {
refs?: string[];
}
const ISSUE = "xyz.radicle.issue";
const PATCH = "xyz.radicle.patch";
const JOB = "xyz.radworks.job";
// Releases are artifact COBs.
const RELEASE = "dev.radicle.artifact";
const BOARD = "works.monadic.board";
// The type names of the COBs whose data has keys of its own.
export const cobTypes = {
issue: "xyz.radicle.issue",
patch: "xyz.radicle.patch",
job: "xyz.radworks.job",
// Releases are artifact COBs.
release: "dev.radicle.artifact",
board: "works.monadic.board",
} as const;
const {
issue: ISSUE,
patch: PATCH,
job: JOB,
release: RELEASE,
board: BOARD,
} = cobTypes;
export function affectedKeys({ rid, refs }: RefUpdate): Key[] {
if (refs === undefined) {