Skip to content

The dashboard erases and exports a namespace's or a user's data, and shows who read what - #346

Merged
zlareb1 merged 7 commits into
mainfrom
feat/dashboard-erasure
Nov 7, 2026
Merged

zlareb1 merged 7 commits into
mainfrom
feat/dashboard-erasure

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Related: #315

Changelog category (leave one):

  • New Feature

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_summary and memory.owner_report are 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.py listed them as pending a dashboard control.

Scope and risk

  • Activity → Erasures: Erase data and Export data, each scope offered by the rule its handler applies. Erasing a namespace needs admin there (a grant counts, as row_in_scope reads it) and a flat claim of writer or above (erasure.request is authorized for the org at WRITER before the handler reads the grant); exporting one needs an admin claim (erasure.export is 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).
  • Activity → Exposure, for the namespace's admin (as memory.exposure_summary asks): 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_report is 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 own user_id to offer it to them.
  • Agents: a namespace admin's row menu Forget its memories in (memory.clear by agent). The agent's name is typed again, as the server's confirm_subject asks; locked memories stay, and the toast counts the memories forgotten and the locked ones kept. The - agent (no agent) is not offered.
  • A read that runs on open goes through canCall, so an unknown role sends nothing.
  • server/memory/api and the erasure handlers are unchanged.
  • The six ops leave DASHBOARD_PENDING; the reach manifest is regenerated, and the without-the-dashboard guide names them.

Compatibility, rollout and rollback

  • Wire: none.
  • Operator steps: none.
  • Rollback: revert; nothing is stored.

Tests

  • vitest: 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 in Audit.test.tsx, canCall. tsc -b clean.
  • 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

  • Generated files are regenerated in this PR, not by hand (the reach manifest).
  • The frontend builds (npm --prefix frontend run build) and its tests pass, if frontend/ changed.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers.
  • Commits are signed off (git commit -s), as CONTRIBUTING.md asks.

🤖 Generated with Claude Code

@zlareb1
zlareb1 force-pushed the feat/dashboard-erasure branch from 8eb72f7 to c7fa7e9 Compare November 7, 2026 09:55
zlareb1 and others added 7 commits November 7, 2026 10:46
…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]>
…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
zlareb1 force-pushed the feat/dashboard-erasure branch from 3bd7cd7 to 3ece719 Compare November 7, 2026 10:46
@zlareb1
zlareb1 merged commit 3acd376 into main Nov 7, 2026
35 of 38 checks passed
@zlareb1
zlareb1 deleted the feat/dashboard-erasure branch November 7, 2026 12:24
@zlareb1 zlareb1 mentioned this pull request Nov 12, 2026
3 tasks done
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