Repository navigation
Add a memory directory and search to the memory panel (#3114) - #3170
Merged
Merged
Conversation
The three cases drive the panel main has today: it names no directory, holds no search field, and its directory has no topic row. They fail until the panel reads the loaded view into a directory. Part of #3114 (the umbrella stays open — this slice closes its own issue).
The memory dialog now carries a directory beside its pages: a search over the entries the host already returned, Overview and All entries, and one row per scope-and-topic (own before team, Main memory for untagged entries, in the order the list groups them). A topic or a query filters the loaded view only — no new read, and the host recall index is a different search. A no-result search draws its own empty state. Fixes #3169 Part of #3114 (the umbrella stays open — this slice closes its own issue).
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.
Written-by: Dev
Fixes #3169
Part of #3114 (the umbrella stays open — this slice closes its own issue).
Owner: Dev
Reviewer: Reviewer
Tier: T1 — expected from the changed paths and size; the enqueue-guard/controller computes the final tier from the diff.
What changed
core/src/client/memory-panel.js): aMemoryNavbeside the dialog's pages —<nav aria-label="Memory directory">with a search input (aria-label="Search memory"), Overview, All entries (the count the view already returned), then one row per scope-and-topic: own rows before team rows,Main memoryfor untagged entries, in the order the list groups them.topic,query,navTopics,sameTopicandfilterMemoryEntriesare module-private; nothing is exported for tests.scope + topic(own travel and team travel stay separate). Both filterview.entrieslocally — no new host read, no new endpoint. The host's trigram/graph recall index (core/src/host/memory-search.js) is a different search and is not asked here. A no-result query draws the existing empty-state styles with No entries match "{query}".Entriesgainssubset(defaultfalse): when filtered, empty scope sections are dropped. The default path is unchanged, so the existing read-only cases keep their shape.core/src/client/styles.js, +14):.bt-mem-shell,.bt-mem-main, the 200px.bt-mem-navwith the sidebar background and right divider, the search field, and the nav list/group/heading/item/label/count rules. The dialog stays 680px; no collapse button, no[data-nav], no 640px breakpoint.core/src/client/i18n.js, +6):Overview,Memory directory,Search memory,Main memory, and the two search empty-state sentences.core/test/memory-panel-readonly.test.js, on the existing esbuild/vm/fake-React harness — no new file): a four-entry fixture (own travel, own untagged, team rituals, team travel) and three UI cases — the directory is named and holds the search field and six rows; search keeps entries holding every term and shows the no-match state; a topic row filters and All entries clears it. The original three P-475 cases are untouched.docs/subsystems/core-client.md(memory-panel row) andchangelog.d/3114-memory-directory.added.md.Not in this cut: directory collapse (
Hide directory/Show directory,navHidden,[data-nav]), widening 680px → 880px, amax-width:640pxbreakpoint, the “n entries · m topics” summary line,core/src/shared/memory-catalog.js(a T3 path — the two helpers used here are inlined privately), host-side search, and persisting the directory state.patches/ds-bot/topics.jsonis untouched (no new source file).Verification at the tip
Tip SHA:
54db8b98ad8f365c6908470d64fd80a75f21a89bBase:
8b9e249bcfa4255acc834881f27849c1ded67bb5(livemainwhen the branch was cut and pushed)Ran:
core/test/memory-panel-readonly.test.jschanged:cd core && TZ=UTC node --import ./test/harness-resolve.mjs --test test/memory-panel-readonly.test.js→# tests 6 / # pass 3 / # fail 3, red onAssertionError: the directory is named,TypeError: Cannot read properties of undefined (reading 'props')(no[aria-label="Search memory"]input), andAssertionError: '' !== 'travel1'(no thirdbt-mem-nav-item).# tests 6 / # pass 6 / # fail 0.memory-panel-readonly,memory,memory-empty,i18n,i18n-missing-entries,readonly-reload-lines→# tests 147 / # pass 147 / # fail 0. The five older files on “main implementation + only the new test” →# tests 141 / # pass 141 / # fail 0, so the new cases moved none of the old ones.cd core && node scripts/build-client.mjs→core/client.js24,252 → 24,370 lines;node core/scripts/build-client.mjs --check→ exit 0;git diff --exit-code core/client.js→ empty (no uncommitted drift after the build).node scripts/ds-bot-patches.mjs checkbeforegenerate→ok 10 patches apply cleanly in orderand exactly five differing core paths (core/client.js,core/src/client/i18n.js,core/src/client/memory-panel.js,core/src/client/styles.js,core/test/memory-panel-readonly.test.js); aftergenerate→ok core/ equals ds-bot/ + patches/ds-bot/;node scripts/ds-bot-patches.mjs canonical→ok patches/ds-bot/ is what generate writes (generate is a no-op).TZ=UTC TMPDIR=/data/flybot-tmp npm run verify→ exit 0: core3312 tests / 3311 pass / 0 fail / 1 skipped; plane 20/20; social 715/715; tree 149/149; timeline 172/172; workflow 538/538; project 147/147;.github+policy686/686; interop 37/37; live-e2e 34/34; core lint 89 warnings / 0 errors;arch-docs: OK (11 changed file(s))re-run after the implementation commit.node .github/scripts/changelog.mjs check→8 fragment(s) in changelog.d/ are well formed.git diff --name-only origin/main...HEAD→ the 11 files below;grep -E '^(\.github/|policy/|core/src/shared/|core/src/host/|plugins/)'→ empty;git diff -U0 core/src/client/memory-panel.js | grep -E '^\+.*(actions\.|call\()'→ empty (the directory/search only filterview.entries).Size: 11 files (6 handwritten + 5 generated). Handwritten
git diff --numstat: panel +86/−19, styles +14/−0, i18n +6/−0, test +82/−0, docs +1/−1, changelog +1 → 210 lines, under the T1 400-line / 20-file limit. (The spec's 203 counted bygrep -c '^+[^+]', which misses added blank lines; the diff's own count is 210.)Not run (and why):
Main memoryfor untagged entries, type a word, clear it, and click a topic row and All entries in a narrow and a wide window.core/dev/bench.sh): noindex.js, host or turn-pipeline change.npm ci/npm run harness:node_moduleswere already installed at thiscore/package-lock.jsonanddev/harness/package.json, so no fresh install was needed;verifyran on them end to end.Checkpoint
{
"pr": 3170,
"claim": "Dev",
"issue": 3169,
"summary": "The memory dialog now has a directory beside its pages: a search over the entries the host already loaded, Overview and All entries, then one row per scope-and-topic (own before team, Main memory for untagged entries, in list order). A query keeps entries holding every term; a topic filters by scope and name. Both only filter view.entries, with no new read; a no-result query draws an empty state. Styles add the 200px directory only — no collapse, no widening. Three UI cases join the existing memory-panel harness (red 3/3 first, then 6/6).",
"files": [
"core/src/client/memory-panel.js",
"core/src/client/styles.js",
"core/src/client/i18n.js",
"core/test/memory-panel-readonly.test.js",
"docs/subsystems/core-client.md",
"changelog.d/3114-memory-directory.added.md",
"core/client.js",
"patches/ds-bot/0001-core-fixes.patch",
"patches/ds-bot/0003-flybot-api-client.patch",
"patches/ds-bot/0008-client-bundle.patch",
"patches/ds-bot/files/test/memory-panel-readonly.test.js"
],
"checks": { "ran": "TZ=UTC TMPDIR=/data/flybot-tmp npm run verify", "result": "green", "at": "54db8b98ad8f365c6908470d64fd80a75f21a89b" },
"next": "none — ready for review"
}