Home: sign the brief save on Replace too (Codex polish)
Codex spotted the one remaining unsigned BRIEF_VIEW_KEY write — in replaceArticle. Not a safety issue (instant-paint requires cached.sig, so an unsigned entry just won't instant-paint), but it meant the next load after a Replace fell back to "Gathering…" until a fresh /api/brief re-saved the signed version. Now every brief save includes sig: briefSig() (computed after dismissed updates), so an edited brief still instant-paints. All three save paths verified signed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -424,7 +424,9 @@
|
||||
if (i >= 0) {
|
||||
brief.items[i] = repl;
|
||||
brief = { ...brief, items: [...brief.items] };
|
||||
P.saveJSON(BRIEF_VIEW_KEY, { generated_at: brief.generated_at, items: brief.items });
|
||||
// Sign the save (dismissed just changed) so the next load can still
|
||||
// instant-paint this edited brief instead of falling back to "Gathering…".
|
||||
P.saveJSON(BRIEF_VIEW_KEY, { generated_at: brief.generated_at, items: brief.items, sig: briefSig() });
|
||||
}
|
||||
} else {
|
||||
const i = feed.findIndex((a) => a.id === article.id);
|
||||
|
||||
Reference in New Issue
Block a user