Repository navigation
Memory: new-memory badge and send memory to task - #228
Merged
Merged
Conversation
Main watches every project's auto-memory folder from startup (one fs.watch each, on the folder or its nearest existing ancestor until it exists) and pushes the project's new-memory count on each change. A project's last look is a new memory_seen_at column, moved to now when its memory modal opens. The project row shows a dot with an "N new memories" tooltip. Claude goes brr.. via Dash
An @ button on the shown memory types `@<memory path> ` into the active task's agent pane, unsent, closes the modal and focuses the terminal, so the user can finish the sentence. It goes through typeIntoTask, as Fix CI and the review toast do. With no active task in the shown project the button is greyed out and its tooltip says why; IconButton gains a disabled state that keeps its tooltip. Fixes #187 Claude goes brr.. via Dash
- The modal marks the project seen again when an edit in the diff editor closes, so saving a memory doesn't bring the dot back. - markSeen broadcasts 0 after any count already sent, and a count reads the seen time only once the folder is read, so a stale count can't relight it. - A memory path with whitespace is mentioned as @"...", the form Claude Code parses (its @-mention regex matches @"([^"]+)"). - The memory_seen_at migration runs its ALTER and UPDATE in one transaction. - The late-folder watcher test retries until notified instead of waiting. Claude goes brr.. via Dash
- The project row shows how many memories are new in a CountBadge, where the dot was, with the same tooltip. - A "Memories" item in the task's ... menu opens its project's memory with that task as the origin. Send to task now goes to the origin task first, then the shown project's active task, else stays disabled. The origin survives switching project in the modal and is dropped on close. Claude goes brr.. via Dash
The task the modal was opened from is skipped once the modal shows another project's memory; the shown project's active task, or the disabled reason, takes over. Rename NewMemoryDot to NewMemoryCount. Claude goes brr.. via Dash
Main has no project-changed signal of its own (projectEvents only tells the renderer), so saveProject and deleteProject, the one path every caller takes, resync the memory watches. The three hand calls in dbIpc and the control API are gone. Syncs are no-ops until startMemoryWatches at app start, so tests and early saves open no watches. memory:markSeen takes the project id. Claude goes brr.. via Dash
memoryBadge sends through broadcast, the memory:newCount listener through preload's listen, and the modal finds its origin task with selectTaskById. MemoryWatcher keeps its own fs.watch: it re-arms on the event type and its debounce must outlive a re-arm, which watchDir's close would cancel. Claude goes brr.. via Dash
nthomsencph
force-pushed
the
feat/187-memory-badge
branch
from
November 8, 2026 23:45
fe9149c to
28fe1bb
Compare
Merged
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.
Stacked on #227 (which is stacked on #229); merge after it.
What was missing
The memory browser read a project's memory only while its modal was open, so nothing told you when Claude had written a new memory. And there was no way to point a task's agent at a memory short of copying its path.
What changed
New-memory badge
MemoryWatcheris back, rebuilt from the version that was cut before Browse and edit Claude auto-memory from Dash #189 landed. It keeps onefs.watchper project for as long as the project exists, starting at launch. A memory folder that doesn't exist yet is watched through its nearest existing ancestor, as before.syncMemoryWatchesadds and drops watches when a project is added (from the UI or the control API) or deleted.projects.memory_seen_atcolumn (epoch ms) records when you last looked. The migration adds it behind apragma_table_infoguard and sets existing projects to "now", so old memories don't all show up as new on the first launch. New projects start at "now" too.memory_seen_at(MEMORY.md doesn't count) and pushesmemory:newCount. The renderer keeps the counts inruntimeStore.CountBadge), with an "N new memories" tooltip. Clicking it opens the memory. Opening the modal, and closing an edit made from it, sets the project as seen and clears the badge.memory:markSeenbroadcasts 0 so a count already on its way can't bring it back.Send memory to task prompt
@<absolute path>into the task's agent pane without sending it, then focuses the terminal. It uses the existingtypeIntoTask. A path with whitespace is typed as@"<path>", the quoted form Claude Code parses.IconButtongets adisabledstate that keeps its tooltip working (a disabled<button>gets no hover events).Verification
pnpm type-checkandpnpm lintpass (0 errors; the 40 warnings were already there).pnpm test: 1780 passed, 3 skipped (on top of Show setup script progress and output #227). New tests cover the migration, the new-memory count, the watcher (real fs: writes, a late folder, delete and recreate, ignoring transcript writes, removing a project), the send target (origin, active, archived, none) and the mention text, the modal's origin task in uiStore, and the runtimeStore badge state.dashctl.test.tssometimes fails when the whole suite runs. It does the same on main without these changes.Still needs a manual check in a dev instance: the count appears when Claude writes a memory and clears when the modal opens or an edit closes; the count after a restart; the task menu's "Memories" item; the @ button types into the right task and focuses it; the disabled tooltip; how the count badge looks in the row.
Fixes #187
🤖 Generated with Claude Code