Skip to content

The memory drawer locks, expires, rejects, shares, judges and redacts a memory, and shows its evidence and links - #351

Merged
zlareb1 merged 26 commits into
mainfrom
feat/dashboard-memory-drawer
Nov 8, 2026
Merged

zlareb1 merged 26 commits into
mainfrom
feat/dashboard-memory-drawer

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

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 memory drawer can lock and unlock a memory, mark it as wrong, share it with every agent in the namespace, record whether it helped, redact a past version, and show the source turns it came from and the typed links into and out of it. Memory history rows carry version_text, the version as an exact decimal string.

Why

memory.lock, memory.unlock, memory.reject, memory.promote, memory.demote, memory.outcome, memory.redact, memory.evidence and memory.backlinks act on one memory, and a person reviewing that memory reaches for them in its drawer. Each was callable only over HTTP or the SDKs; server/operations/dashboard.py listed them as pending a dashboard control.

Scope and risk

  • More menu: Lock… (a mode and a reason, writer) or Unlock on a locked row (admin, as memory.unlock asks); Share with every agent / Stop sharing (memory.promote / memory.demote, admin; demote is addressed by namespace and key, all its input takes); This helped / This misled (memory.outcome, writer; a bad outcome that rejects the memory says so and reads it again); Mark as wrong… (memory.reject with its reason, writer), not offered on a locked row. A locked row shows its mode in the footer, with the reason, who locked it and when the lock lapses as a tip. Each of these actions writes through the row's own identity (rowIdentity), and so do the drawer's edit, tags, expiry and Delete, which wrote under the drawer's identity and so landed a second row beside (or deleted nothing of) a row another agent or session wrote; a Delete that tombstones nothing says so. Every write reads the row again only while the drawer still shows the key it was made for, so a drawer moved to another key keeps that key's row; a late save closes only the edit it saved, a late rename leaves the new key's drawer as it is and names where the old key went, and a move closes the drawer's open dialogs, edit and rename. A lock hides what it refuses: read_only hides Edit, the expiry control and Delete, no_delete hides Delete; tags stay, since no lock gates them. While a Lock, Mark-as-wrong or Redact dialog is open the drawer's shortcuts do nothing. Rename and Verify keep the drawer's identity, as on main. Rename is hidden on a read_only row and keeps its redirect on a no_delete one, since memory.move checks the lock. Share is not offered on a profile or high row, which memory.promote refuses; Stop sharing says it may find nothing.
  • History: an admin's Redact vN on a past version (memory.redact by memory_id and version, with a reason the redaction keeps). The version is above 2^53, which JSON.parse rounds, so memory.history rows carry version_text, set from version by a validator, and the dashboard sends that; MemoryRedactInput.version is declared int | str with the decimal validator memory.delete_version uses, so the SDKs and the MCP schema say what the dashboard sends. A live version (refused_head) or one no longer recorded keeps the dialog open with the reason. MemoryRedactInput's docstring now says the version is looked up in the loom.memory_versions mirror, which keeps every version.
  • The drawer's lifecycle client is frontend/src/api/memoryLifecycle.ts, imported by the lazy drawer, not through api.ts, so the index chunk stays in budget.
  • Two sections that read when opened (so their reads are paid only when someone opens them): Evidence (memory.evidence under the row's own identity, since an extracted row carries its session: the source turns, their role, time and span) and Links (memory.backlinks: typed links in and out, each opening the linked memory).
  • The reason dialogs cannot be closed while their call runs.
  • memory.cross_promote and memory.touch move from pending to NOT_IN_DASHBOARD. The drawer's Copy to… (memory.copy_to) makes the same copy as cross_promote, with its lineage link; the by-id form needs admin on both namespaces. memory.touch is an agent's keep-alive; the drawer changes an expiry with memory.set, which audits the change (touch is not audited).
  • Eleven ops leave DASHBOARD_PENDING; the reach manifest and both SDKs are regenerated.
  • Not here: memory.reject on a locked row is not refused by its handler. The drawer does not offer it; the handler fix is a separate change.

Compatibility, rollout and rollback

  • Wire: memory.history rows gain version_text (additive); a build N-1 dashboard ignores it. memory.redact also accepts its version as a decimal string (it was coerced before; now declared). No op's behaviour changes.
  • Operator steps: none.
  • Rollback: revert; nothing is stored.

Tests

  • vitest: MemoryInspector.lifecycle.test.tsx (a viewer offered nothing, an unlock included, a Delete of the shown row and one that deletes nothing, no write a lock refuses, sharing for an admin only and not of a high row, an outcome not recorded, an expiry and an edit written to the shown row's identity, an unlock that finds no lock, a refused share, the lock tip, lock with mode and reason, the dialog held while busy, unlock for an admin and not a writer, no reject on a locked row, reject with its reason, share and stop sharing, evidence under the row's identity and links, both read only when opened, redact by the exact version_text with its reason, a live version refused in the dialog, a writer's verdict, a rejecting outcome read again), the More menu order in MemoryInspector.nav.test.tsx, canCall. tsc -b clean.
  • tests/unit/test_history_written_at_and_pack_bookmarks.py (version_text is exact past 2^53), tests/unit/test_delete_by_key.py (MemoryRedactInput takes a decimal version back exactly, next to memory.delete_version's), tests/unit/test_op_surfaces.py, tests/unit/test_op_reach_census.py, tests/unit/test_sdk_parity.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 registry role and handler.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

🤖 Generated with Claude Code

@zlareb1
zlareb1 force-pushed the feat/dashboard-memory-drawer branch 7 times, most recently from cfe0fdb to 2dd6dc4 Compare November 7, 2026 23:30
zlareb1 and others added 23 commits November 8, 2026 00:29
… a memory, and shows its evidence and links

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…redact takes a reason

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… their row

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]>
…l version, and the lock tip names who and until when

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…and rereads through one guard

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… and memory.redact reads one int version

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]>
…a lock, and a lock holds the rename's redirect

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…e dialog rule, and the redirect and locked-tag writes are tested

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…s the dialog rule

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…er moved leaves the next editor open

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…r that moved never shows the key it left

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…as made for, and a move closes the drawer's dialogs

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…he key went, and a move closing the dialogs is tested

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… form, and the late rename says whether the old key redirects

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…nter is named for both forms

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… closes the drawer

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ch the call

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 and others added 3 commits November 8, 2026 00:29
…omote keeps its reason

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-memory-drawer branch from d4aa3d6 to dd6d533 Compare November 8, 2026 00:32
@zlareb1
zlareb1 merged commit 4b5bb00 into main Nov 8, 2026
37 of 38 checks passed
@zlareb1
zlareb1 deleted the feat/dashboard-memory-drawer branch November 8, 2026 01:25
@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