Repository navigation
feat(user-memory): restore dismissed memories to the active set (issue 670) - #675
Merged
ualtinok merged 4 commits intoOct 13, 2026
Merged
Conversation
…e 670) user_memories.status had only an active->dismissed transition and no way back, so a dismissed profile entry was unrecoverable from the dashboard. - plugin: restoreUserMemory(db, id) next to dismissUserMemory, setting the status back to 'active' (the profile-version bump stays with the caller, matching dismissUserMemory) - dashboard: restore_user_memory in db.rs / commands.rs / serve dispatch / main.rs. It bumps the global user-profile version like dismiss does, so running sessions re-render <user-profile> with the restored entry - dashboard UI: Restore button on dismissed cards, behind the inverse of the gate that wraps Dismiss - tests: Rust asserts the restored row is back in the active set and the profile version bumped (memory_epoch untouched); TS asserts active-set membership after restore - docs: one sentence that dismiss is reversible from the dashboard
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 10 files
Reply to a comment to ask cubic a question or push back. It learns from your replies.
View guided diff | Re-trigger cubic
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
UPDATE ... WHERE id = ? reports affected = 1 for a row that is already active (SQLite counts matched rows, not changed values), so a no-op restore bumped the global user-profile version and invalidated the cached <user-profile> in every running session. The predicate now carries AND status = 'dismissed' in both the Rust command path and the TS storage twin, so only a real transition writes. Tests: Rust asserts an already-active row keeps its updated_at and bumps nothing; TS asserts the same no-op.
|
Merged, thank you. Dismissed user memories can now be restored from the dashboard. It ships in the next dashboard release. |
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.
Approved issue: #670
What
Adds the reverse edge to the user-memory state machine: a dismissed user memory can be restored to the active set from the dashboard's User Memories page, and running sessions pick the restored entry up again.
Changes
Harness coverage (required)
Notes
The TS restoreUserMemory currently has no in-plugin caller (dashboard restore goes through the Rust path); it mirrors dismissUserMemory as the storage-layer primitive named in the approved shape. Rust changes were not compiled locally (no Rust toolchain on the contributor machine) — they mirror dismiss_user_memory line for line; CI's rust-crates job is the first real build.
Summary by cubic
Adds a Restore action for dismissed user memories so they can be brought back to the active set and injected into
<user-profile>again.Dismissal was previously irreversible from the dashboard. The new
restoreUserMemory/restore_user_memorymirrors dismiss at the plugin storage and dashboard Rust layers, sets the memory's status back toactive, and bumps the cached user-profile version so running sessions pick up the restored entry. The update is scoped withAND status = 'dismissed', so restoring an already-active row is a no-op that neither rewritesupdated_atnor invalidates every running session's cached profile. A Restore button appears on dismissed cards in the User Memories page with the same error and refetch handling as existing memory actions, and the docs now note dismiss is reversible. Tests cover the restored row returning to the active set, the profile-version bump, the no-op case, and dashboard entry points for both Tauri and serve modes.Written for commit 1d60940. Summary will update on new commits.

Confidence Score: 5/5
The PR appears safe to merge; no new blocking issue was found.Summary
Adds Restore for dismissed user memories in the dashboard.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR D[Dismissed memory] -->|Restore| A[Active memory] A --> V[Update profile version] V --> P[Refresh cached user profile] E[Already active] -->|Restore| N[No write or version change]Reviews (4) · Last reviewed commit: "fix(user-memory): scope restore to dismi..." · Reviewed by Greptile