Skip to content

feat(dashboard): bulk restore and make permanent for memories (issue 676) - #678

Open
ICEY16360 wants to merge 2 commits into
cortexkit:masterfrom
ICEY16360:feat/bulk-restore-permanent-memories
Open

ICEY16360 wants to merge 2 commits into
cortexkit:masterfrom
ICEY16360:feat/bulk-restore-permanent-memories

Conversation

@ICEY16360

@ICEY16360 ICEY16360 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Approved issue: #676

What

Adds Restore and Make permanent to the Memories bulk-action bar, so a selection can be brought back from archived (or lifted to permanent) in one command. The backend already supports both: bulk_update_memory_status accepts any status, treats a change into active/permanent as a restore for epoch-bump purposes, and only bumps for rows whose status actually changes.

Changes

  • packages/dashboard/src/components/MemoryBrowser/MemoryBrowser.tsx: handleBulkRestore / handleBulkPermanent mirroring handleBulkArchive (confirm → bulkUpdateMemoryStatus → clear selection → refetch), plus Restore and Make permanent buttons next to Archive. Confirm dialogs mirror the Archive one, including the singular/plural template.
  • packages/dashboard/src-tauri/tests/db_mutations.rs: bulk_restore_mixed_selection_changes_and_bumps_only_actually_changed_rows — a mixed selection (archived→active and permanent→active that change, active→active no-ops, including one project path with no changes at all) asserts only the transitioning rows change, only their paths bump the epoch, and a restore queues no memory mutations.
  • packages/docs/src/content/docs/reference/dashboard.md: the bulk-select line now lists restore and make permanent.

No production Rust change — the approved shape is frontend plus a test of the existing command.

Harness coverage (required)

  • OpenCode 1: covered — shared dashboard over the shared context.db
  • OpenCode 2: covered — same dashboard
  • Pi: covered — same dashboard; Pi shares the store
  • OMP: covered — same dashboard
  • Rust module: covered — new integration test in db_mutations.rs exercises bulk_update_memory_status's no-op guard and epoch semantics (no production Rust change)

Summary by cubic

Adds Restore and Make permanent to the Memories bulk-action bar, so a selection can be brought back from archived or lifted to permanent in one command, alongside the existing Archive and Delete.

  • The backend already supports both via bulk_update_memory_status; only frontend, tests, and docs change.
  • Confirm dialogs mirror the Archive flow; Restore warns when selected permanent memories would lose never-expire status.
  • All bulk actions are disabled while a reload is in flight, so the dialogs never act without fresh statuses.
  • Selection is pruned whenever a refetch drops selected rows from the visible list, so bulk actions never act on rows the user can no longer see.
  • New integration tests cover restore-to-active and make-permanent: only rows that actually change status bump the epoch, and neither queues memory mutations.
  • The bulk-action bar now wraps on narrow windows, and the dashboard docs list the new actions.

Written for commit 32bada9. Summary will update on new commits.

View guided diff

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues remain in the reviewed changes.

Summary

Adds confirmed bulk Restore and Make permanent actions, with tests and updated docs.

  • People can restore selected memories or make them permanent in one confirmed action.
  • Selections drop memories that disappear from the loaded list.

Reviews (5) · Last reviewed commit: "fix(dashboard): gate archive and delete ..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

@ICEY16360
ICEY16360 force-pushed the feat/bulk-restore-permanent-memories branch from b65279d to 2a41742 Compare October 13, 2026 13:24
@ICEY16360
ICEY16360 force-pushed the feat/bulk-restore-permanent-memories branch from 2a41742 to effa624 Compare October 13, 2026 13:35
@magic-alfonso

magic-alfonso Bot commented Nov 6, 2026

Copy link
Copy Markdown

This is ready to merge once it applies cleanly: it now conflicts with master in packages/dashboard/src/components/MemoryBrowser/MemoryBrowser.tsx. Could you rebase it onto the current master? Once the conflict is resolved and the checks pass, I'll merge it.

…676)

The Memories bulk bar could archive or delete a selection but not bring
rows back, even though bulk_update_memory_status already accepts active
and permanent and only bumps the epoch for rows whose status actually
changes. Archived entries could be restored one at a time through the
detail Status dropdown, but not in bulk.

- MemoryBrowser: Restore and Make permanent buttons next to Archive,
  with confirm dialogs mirroring the Archive one
- db_mutations: a mixed-selection test asserting only the rows that
  actually transition change status, only their project paths bump the
  epoch, and a restore queues no memory mutations
- docs: the bulk-select line now lists restore and make permanent
@ICEY16360
ICEY16360 force-pushed the feat/bulk-restore-permanent-memories branch from effa624 to 224ac28 Compare November 9, 2026 12:54
@ICEY16360

Copy link
Copy Markdown
Contributor Author

@cubic review

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

@cubic review

@ICEY16360 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 4 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/dashboard/src/components/MemoryBrowser/MemoryBrowser.tsx">

<violation number="1" location="packages/dashboard/src/components/MemoryBrowser/MemoryBrowser.tsx:738">
P2: Restore and Make permanent are disabled while lists reload, but Archive and Delete stay enabled. During that window the selection can still include rows the pruning effect is about to drop, so those two actions act on rows the user can no longer see, which the new comment says should not happen. Either disable all four bulk buttons during the reload, or state in the comment that only the two new actions are gated.</violation>
</file>

This branch has not been deployed

No deployments
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