feat(reader): delete the local archived copy — deleteArticle gets a caller (S4)#190
Merged
Merged
Conversation
…aller (S4) deleteArticle(url) existed in archive-cache.js with ZERO callers — no delete affordance anywhere (archive-integrity review, 2026-07-17). And the Options "Clear all X-Ray storage" confirm promised to erase "entities, the keypair registry" while actually clearing only the LEGACY userscript keys — the modern workspace stores were never touched. Reader: a 🗑 header button (hidden on read-only opens) deletes the local archived row for the open capture, finding it the way the load path does (primary URL, then the alias-resolved original, both forms deleted). The confirm is an honest account, with counts: DELETED — the archived copy + its prior versions; it leaves case membership, the corpus, and the archive banner. KEPT — N claims and M audit runs (they key to URL/hash, not the copy); anything already published (relays cannot be forced to delete — NIP-09 is advisory and pretending otherwise would lie); archived source bytes, collected later by the age-gated pruner. Options: the Clear-all confirm now promises exactly what storageClearExtension delivers — settings, signing key, LLM key, legacy stores — and points at "Start fresh workspace" for content. Tests: delete takes the row together with its priorVersions snapshot (a dangling prior would resurrect "deleted" content); absent-row delete is a no-op; delete joins through the same URL normalizer as save (a tracking-param variant deletes the canonical row). SMOKE 7.3a-7.3c cover the hand walk. 1721 tests green; build clean; lint 0 errors. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Answers "Do we even have the ability to delete captures?" — the last of the four archive-integrity findings.
deleteArticleexisted with zero callers; now it has one, and the "Clear all" confirm stops lying.The 🗑 button (reader header, hidden on read-only opens)
Deletes the local archived row for the open capture — found the way the load path finds it (primary URL, then the alias-resolved original; both forms deleted). The confirm is an honest account with real counts, not a bare "are you sure":
Deliberately narrow scope: local only. This is the "remove the CAPTCHA page / duplicate from my corpus" tool, not a wire retraction tool.
The Clear-all fix
The old confirm promised to erase "entities, the keypair registry" — but
storageClearExtensionclears only the legacy userscript keys (publications/people/organizations/keypair_registry); the modern workspace stores were never touched. The confirm now promises exactly what it delivers — settings, signing key, LLM key, legacy stores — and points at "Start fresh workspace" (which actually does clear content) for the rest.Verification
priorVersionssnapshot (a dangling prior would resurrect "deleted" content); absent-row delete is a no-op; delete joins through the same URL normalizer as save (a tracking-param variant deletes the canonical row).npm test— 1721 pass, 0 fail ·npm run buildclean (dist/ unlocked again) · lint 0 errors · no wire change.That closes all four archive-integrity findings: #185 (wrong article) → #186 (false banners) → #187 (hash drift) → this (delete).
🤖 Generated with Claude Code