Commit 49d4982
committed
feat(dashboard): bulk memory selection with collapsible categories (closes #28)
Issue #28 requested a selectable table in the Memory page with
select/delete/archive and select-all operations. This extends that
request with collapsible category groups (navigation for users with
100+ memories across many categories).
Multi-select model:
- Checkbox per memory row
- Tri-state checkbox per category (none / some / all)
- Tri-state "select all visible" in the bulk-action bar
- Selection resets automatically when filters change so bulk actions
can't silently target hidden memories.
Bulk actions:
- Archive (reversible, flips status to 'archived')
- Delete (destructive, confirms count)
Both run in one SQLite transaction per action, not a frontend loop,
so 100+ memories clear in a single round-trip without partial-failure
states. Count-based ask() confirmation.
Collapsible categories:
- Chevron on the right side of each category header rotates when
collapsed
- Entire header is clickable; tri-state checkbox is a nested
stopPropagation region
- Collapse state persisted per-dashboard in localStorage
(mc.memory.collapsedCategories.v1) so navigation focus survives
reload. Versioned key so future schema changes can't poison old
clients.
- Expand all / Collapse all links above the list.
Rust commands (packages/dashboard/src-tauri/src):
- db::bulk_update_memory_status - IN (?,...) under one transaction
- db::bulk_delete_memory - explicit memory_embeddings DELETE first,
then memories; documents intent even though the FK would cascade
- commands::bulk_update_memory_status /
commands::bulk_delete_memory - thin Tauri wrappers
- main.rs registers both invoke handlers
Frontend (packages/dashboard/src):
- lib/api.ts: bulkUpdateMemoryStatus / bulkDeleteMemory
- components/MemoryBrowser/MemoryBrowser.tsx: full rewrite with
selection + collapse state. Local TriStateCheckbox uses a ref
+ createEffect to set indeterminate (Solid doesn't bind it
declaratively).
- styles.css: chevron rotation, checkbox column, sticky bulk-action
bar (only rendered when >=1 selected), memory card layout with
checkbox gutter, tri-state checkbox styling with explicit check
and dash marks.
Verified: cargo check clean, frontend build clean, bunx tsc clean,
plugin test suite still passes (no plugin changes).1 parent e7c818c commit 49d4982
6 files changed
Lines changed: 744 additions & 57 deletions
File tree
- packages/dashboard
- src-tauri/src
- src
- components/MemoryBrowser
- lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
76 | 97 | | |
77 | 98 | | |
78 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1281 | 1281 | | |
1282 | 1282 | | |
1283 | 1283 | | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
1284 | 1359 | | |
1285 | 1360 | | |
1286 | 1361 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
0 commit comments