Repository navigation
The dashboard erases and exports a namespace's or a user's data, and shows who read what - #346
Merged
Merged
Conversation
zlareb1
force-pushed
the
feat/dashboard-erasure
branch
from
November 7, 2026 09:55
8eb72f7 to
c7fa7e9
Compare
…shows who read what - Activity -> Erasures: Erase data and Export data for the namespace's admin (this namespace) and an org admin (one user across the org), as the erasure handlers decide; Details shows a saga's status and what it left behind (erasure.request, erasure.export, erasure.status). - Activity -> Exposure, for the namespace's admin: the distinct memories each token and agent read and their share of the namespace (memory.exposure_summary), and one user's memory and who read it (memory.owner_report). - Agents: a namespace admin's "Forget its memories" for one agent (memory.clear), with the agent's name typed again. - The six ops leave DASHBOARD_PENDING. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…saga - Details says "Not checked yet" until the residue census has run. - The erase confirmation says what a tombstone covers; an export says when a section stopped at its limit, and its result is typed. - An erase or export runs under a 15-minute bound; an erase that gets no answer closes and says it may still be running, so no second saga starts. - Erase and Export are gated by canCall (erasure.export, ADMIN), as the handlers decide. - Exposure names readers, shows "<1%", and says when it shows the 200 widest; the owner report aborts a stale read and resets on a namespace switch; the tab falls back to Events when its role goes. - Forget counts memories and is not offered for the `-` agent. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…s rule - Only a user's erasure purges, so Purge shows only for that scope; the confirmation says memories restore from Recently deleted, nothing else. - Erase of a namespace reads the namespace role (a grant counts, as row_in_scope does); Export needs an admin claim, since the op is authorized for the org, where only a claim reaches. - A gateway's 5xx with no Loom code counts as no answer; the bound matches the shipped proxy's 600 s. - The owner report asks for 30 days and 50 readers and says when it shows them; one effect resets and aborts it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…fusal Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…pace shows as all Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
zlareb1
force-pushed
the
feat/dashboard-erasure
branch
from
November 7, 2026 10:46
3bd7cd7 to
3ece719
Compare
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.
Related: #315
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
The dashboard can erase or export everything Loom holds for a namespace or a user (Activity → Erasures, with each erasure's status and what it left behind), show which tokens read how much of a namespace and of one user's memory (Activity → Exposure), and forget every memory one agent wrote (Agents).
Why
erasure.request,erasure.export,erasure.status,memory.clear,memory.exposure_summaryandmemory.owner_reportare what a person reaches for when asked to forget someone, hand over their data, or find out what a leaked token read. Each was callable only over HTTP or the SDKs;server/operations/dashboard.pylisted them as pending a dashboard control.Scope and risk
row_in_scopereads it) and a flat claim of writer or above (erasure.requestis authorized for the org at WRITER before the handler reads the grant); exporting one needs an admin claim (erasure.exportis authorized for the org, where only a claim reaches); either for one user across the org needs an org admin claim. Purge is offered only for a user's erasure, the only scope offered here whose saga purges (a namespace's saga tombstones whatever is asked). The confirmation says what happens: a purge hard-deletes everything; otherwise memories can be restored for 14 days from Memories → Recently deleted and everything else, external backends included, is gone. An export asks for 10,000 rows a section, downloads one JSON file and names the sections that stopped at their limit (conversations also stop at a size limit). Both run under a 10-minute bound (the shipped proxy's read timeout), since a saga runs whole inside its call; the dialog cannot be closed while a call runs; an erase that gets no answer or a 5xx (Loom's own can come after the saga was registered) closes and says it may still be running (it shows in the list as in progress), so a second click starts no second saga. Each erasure row has Details (erasure.status: status, verification, failure, and what the residue census left behind, or "Not checked yet" before it runs).memory.exposure_summaryasks): per reader and agent, how many distinct memories it read and what share of the namespace that is, over 24 hours, 7 or 30 days, the 200 widest; and one user's memory (memory.owner_report): what they own here and the 50 most frequent readers of the last 30 days.memory.owner_reportis VIEWER, but a report on any user's memory sits with the admin's other exposure views; the dashboard does not know a viewer's ownuser_idto offer it to them.memory.clearby agent). The agent's name is typed again, as the server'sconfirm_subjectasks; locked memories stay, and the toast counts the memories forgotten and the locked ones kept. The-agent (no agent) is not offered.canCall, so an unknown role sends nothing.server/memory/apiand the erasure handlers are unchanged.DASHBOARD_PENDING; the reach manifest is regenerated, and the without-the-dashboard guide names them.Compatibility, rollout and rollback
Tests
Erasures.test.tsx(erase, no Purge on a namespace, Erase without Export for an admin by grant, export with cut sections, a refused erase, a gateway 504, a network failure and a Loom 5xx, the dialog held while busy, a grant admin whose claim is below writer, a user's export, details before and after the census),Exposure.test.tsx(a fraction past 1 and a read of a namespace emptied since, both shown as all; a near-whole share shown as 99%; the reader cap; an error),OwnerReport.test.tsx(the 50-reader cut, an error, a namespace switch),Agents.forget.test.tsx(the toast, the dialog held while busy, a refused clear, a mistyped name, the-agent), the Activity tab gate and fallback inAudit.test.tsx,canCall.tsc -bclean.tests/unit/test_op_surfaces.py,tests/unit/test_op_reach_census.py,op_reach_census --check.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code. I checked each control's role gate against its op's handler.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
npm --prefix frontend run build) and its tests pass, iffrontend/changed.git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code