Skip to content

feat(reader): delete the local archived copy — deleteArticle gets a caller (S4)#190

Merged
bryanmatthewsimonson merged 2 commits into
mainfrom
claude/s4-delete-capture
Jul 18, 2026
Merged

feat(reader): delete the local archived copy — deleteArticle gets a caller (S4)#190
bryanmatthewsimonson merged 2 commits into
mainfrom
claude/s4-delete-capture

Conversation

@bryanmatthewsimonson

Copy link
Copy Markdown
Owner

Answers "Do we even have the ability to delete captures?" — the last of the four archive-integrity findings. deleteArticle existed 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":

  • Deleted: the archived copy + its N prior versions. It disappears from case membership, the corpus, and the archive banner.
  • Kept: your N claims and M audit runs on this URL (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 be dishonest; archived source bytes, which the age-gated orphan pruner collects once unreferenced.

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 storageClearExtension clears 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

  • 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.
  • npm test1721 pass, 0 fail · npm run build clean (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

bryanmatthewsimonson and others added 2 commits July 17, 2026 18:03
…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>
@bryanmatthewsimonson
bryanmatthewsimonson merged commit 7b4fd6f into main Jul 18, 2026
@bryanmatthewsimonson
bryanmatthewsimonson deleted the claude/s4-delete-capture branch July 18, 2026 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant