@modusensus/dsh-mneme 0.6.7 → 0.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +463 -463
- package/cordis.patch.yml +15 -15
- package/lib/api.js +783 -783
- package/lib/client.js +1757 -1757
- package/lib/commands.js +64 -64
- package/lib/config.js +288 -288
- package/lib/dream/clustering.js +118 -118
- package/lib/dream/decisions.js +439 -439
- package/lib/dream/sleep.js +561 -554
- package/lib/dream/tag-extractor.js +156 -156
- package/lib/dream.js +935 -929
- package/lib/embedding.js +154 -154
- package/lib/entities/extractor.js +242 -242
- package/lib/hot-memory.js +53 -53
- package/lib/index.js +361 -361
- package/lib/inject.js +208 -208
- package/lib/local-embedder.js +282 -282
- package/lib/mirror.js +170 -170
- package/lib/parser/tag.js +59 -59
- package/lib/parser/wiki-link.js +38 -38
- package/lib/quality-filter.js +123 -123
- package/lib/reranker.js +218 -218
- package/lib/search/adaptive.js +22 -22
- package/lib/search/bm25.js +96 -96
- package/lib/search/tag-boost.js +61 -61
- package/lib/service.js +1726 -1726
- package/lib/settings.js +172 -172
- package/lib/store.js +2238 -2238
- package/lib/summarize.js +236 -236
- package/lib/tools.js +290 -290
- package/lib/vector-index.js +116 -116
- package/package.json +80 -80
- package/scripts/benchmark-embed.js +201 -201
- package/scripts/benchmark-recall.js +133 -133
- package/scripts/benchmark-rerank.js +166 -166
- package/scripts/e2e-dsh.js +218 -218
- package/scripts/stress-dsh.js +255 -255
- package/scripts/sync-lib.js +52 -52
- package/src/api.js +783 -783
- package/src/commands.js +64 -64
- package/src/config.js +288 -288
- package/src/dream/clustering.js +118 -118
- package/src/dream/decisions.js +439 -439
- package/src/dream/sleep.js +561 -554
- package/src/dream/tag-extractor.js +156 -156
- package/src/dream.js +935 -929
- package/src/embedding.js +154 -154
- package/src/entities/extractor.js +242 -242
- package/src/hot-memory.js +53 -53
- package/src/index.js +361 -361
- package/src/inject.js +208 -208
- package/src/local-embedder.js +282 -282
- package/src/mirror.js +170 -170
- package/src/parser/tag.js +59 -59
- package/src/parser/wiki-link.js +38 -38
- package/src/quality-filter.js +123 -123
- package/src/reranker.js +218 -218
- package/src/search/adaptive.js +22 -22
- package/src/search/bm25.js +96 -96
- package/src/search/tag-boost.js +61 -61
- package/src/service.js +1726 -1726
- package/src/settings.js +172 -172
- package/src/store.js +2238 -2238
- package/src/summarize.js +236 -236
- package/src/tools.js +290 -290
- package/src/vector-index.js +116 -116
- package/test/api.test.js +594 -594
- package/test/audit.test.js +448 -448
- package/test/benchmark.test.js +35 -35
- package/test/boundary-v0625.test.js +82 -82
- package/test/client.test.js +368 -368
- package/test/clustering.test.js +100 -100
- package/test/commands.test.js +69 -69
- package/test/config.test.js +50 -50
- package/test/conflict-freeze.test.js +290 -290
- package/test/directory.test.js +134 -134
- package/test/dream.test.js +903 -901
- package/test/entities.test.js +522 -522
- package/test/epistemic.test.js +298 -298
- package/test/fnew-0112.test.js +311 -311
- package/test/fnew-03.test.js +422 -422
- package/test/graph-api.test.js +175 -175
- package/test/helpers/dream-mock.js +82 -82
- package/test/hot-memory.test.js +174 -174
- package/test/inject.test.js +103 -103
- package/test/llm-audit.test.js +279 -279
- package/test/local-embedder.test.js +227 -227
- package/test/mirror-dirty.test.js +424 -424
- package/test/mirror-edit-digest.test.js +187 -187
- package/test/mirror-generation.test.js +499 -499
- package/test/mirror.test.js +249 -249
- package/test/normalize-decisions.test.js +120 -120
- package/test/peer-blockers.test.js +190 -190
- package/test/policy-epoch.test.js +259 -259
- package/test/provenance.test.js +103 -103
- package/test/quality-filter.test.js +118 -118
- package/test/reasoning-effort.test.js +199 -199
- package/test/recall-evals.test.js +235 -235
- package/test/recall-layer.test.js +315 -315
- package/test/receipt-chain.test.js +451 -451
- package/test/reflection.test.js +226 -226
- package/test/reranker.test.js +240 -240
- package/test/search-fusion.test.js +90 -90
- package/test/semantic.test.js +124 -124
- package/test/service-search.test.js +199 -199
- package/test/service.test.js +435 -435
- package/test/settings.test.js +118 -118
- package/test/sleep.test.js +365 -365
- package/test/store.test.js +436 -436
- package/test/stress.test.js +209 -209
- package/test/summarize.test.js +191 -191
- package/test/tag-boost.test.js +125 -125
- package/test/tag.test.js +312 -312
- package/test/tools.test.js +285 -285
- package/test/vector-index.test.js +221 -221
- package/test/wiki-link.test.js +332 -332
package/test/client.test.js
CHANGED
|
@@ -1,368 +1,368 @@
|
|
|
1
|
-
import test from "node:test";
|
|
2
|
-
import assert from "node:assert/strict";
|
|
3
|
-
import { readFileSync, existsSync } from "node:fs";
|
|
4
|
-
import { fileURLToPath } from "node:url";
|
|
5
|
-
import { dirname, join } from "node:path";
|
|
6
|
-
|
|
7
|
-
const root = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
8
|
-
const clientSource = readFileSync(join(root, "lib/client.js"), "utf8");
|
|
9
|
-
const pkg = JSON.parse(readFileSync(join(root, "package.json"), "utf8"));
|
|
10
|
-
|
|
11
|
-
// The Web client bundle registers itself via __ModuleLoader__.load. DSH
|
|
12
|
-
// resolves the bundle by plugin package name, so the registered id must match
|
|
13
|
-
// package.json `name` exactly (a mismatch surfaces as "loaded without
|
|
14
|
-
// registering '@modusensus/dsh-mneme'" in the DSH client).
|
|
15
|
-
test("client bundle registers under the package name", () => {
|
|
16
|
-
const match = clientSource.match(/__ModuleLoader__\.load\(\{\s*id:\s*"([^"]+)"/);
|
|
17
|
-
assert.ok(match, "client bundle must call __ModuleLoader__.load with an id");
|
|
18
|
-
assert.equal(match[1], pkg.name, "registered id must equal package.json name");
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
// client.js is hand-authored under lib/ only (no src/ counterpart), so the
|
|
22
|
-
// src->lib sync must never prune it.
|
|
23
|
-
test("client bundle is lib-only with no src counterpart", () => {
|
|
24
|
-
assert.equal(existsSync(join(root, "src/client.js")), false, "src/ must not contain client.js");
|
|
25
|
-
assert.equal(existsSync(join(root, "lib/client.js")), true, "lib/client.js must exist");
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
// The memory entry lives at the sidebar foot, not in the settings modal: the
|
|
29
|
-
// migration must register into `sidebar.footer.action` (the list slot the
|
|
30
|
-
// sidebar shell renders beside Settings) and must not keep a `settings.section`
|
|
31
|
-
// registration, or the entry would appear twice under different hosts.
|
|
32
|
-
test("memory entry registers into the sidebar foot slot", () => {
|
|
33
|
-
assert.ok(
|
|
34
|
-
clientSource.includes('ctx.slots.inject("sidebar.footer.action"'),
|
|
35
|
-
"client must inject into sidebar.footer.action"
|
|
36
|
-
);
|
|
37
|
-
assert.equal(
|
|
38
|
-
clientSource.includes('"settings.section"'),
|
|
39
|
-
false,
|
|
40
|
-
"the old settings.section registration must be gone"
|
|
41
|
-
);
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
// The drawer era is over as the PRIMARY surface: the sidebar entry must
|
|
45
|
-
// activate the main-area memory library tab first. The one sanctioned
|
|
46
|
-
// exception is the hero screen — the host hides the whole tab ring while a
|
|
47
|
-
// session is blank, so activation legitimately fails there and the same
|
|
48
|
-
// click falls back to a full-viewport overlay (same MemoryExplorer, not the
|
|
49
|
-
// old 420px side drawer). A dialog role stays banned either way.
|
|
50
|
-
test("tab-first activation with hero-screen overlay fallback", () => {
|
|
51
|
-
assert.equal(
|
|
52
|
-
clientSource.includes("role: \"dialog\""),
|
|
53
|
-
false,
|
|
54
|
-
"no dialog surface should remain"
|
|
55
|
-
);
|
|
56
|
-
assert.ok(
|
|
57
|
-
clientSource.includes("activateExplorerTab(t(\"memory.view.label\"))"),
|
|
58
|
-
"the sidebar trigger must activate the memory library tab by its label"
|
|
59
|
-
);
|
|
60
|
-
assert.ok(
|
|
61
|
-
clientSource.includes("activateExplorerTab(t(\"memory.view.label\")).then((ok) => { if (!ok) setOpen(true); })"),
|
|
62
|
-
"a failed tab activation must open the fallback overlay"
|
|
63
|
-
);
|
|
64
|
-
assert.ok(
|
|
65
|
-
/if \(!tab\) \{ resolve\(false\); return; \}/.test(clientSource),
|
|
66
|
-
"activation must resolve false when the tab ring is absent (hero screen)"
|
|
67
|
-
);
|
|
68
|
-
assert.ok(
|
|
69
|
-
/aria-selected.*true/.test(clientSource),
|
|
70
|
-
"activation is only confirmed once the host marks the tab selected"
|
|
71
|
-
);
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
// The fallback overlay reuses the full MemoryExplorer (three columns, graph,
|
|
75
|
-
// settings) at viewport size — not the old side drawer — and closes on Esc
|
|
76
|
-
// or the close button.
|
|
77
|
-
test("hero fallback overlay is a full-viewport MemoryExplorer with a close affordance", () => {
|
|
78
|
-
assert.ok(
|
|
79
|
-
clientSource.includes('.mneme-overlay{position:fixed;inset:0'),
|
|
80
|
-
"the overlay must cover the full viewport"
|
|
81
|
-
);
|
|
82
|
-
assert.ok(
|
|
83
|
-
clientSource.includes('h(MemoryExplorer, { t })'),
|
|
84
|
-
"the overlay renders the same MemoryExplorer component as the tab"
|
|
85
|
-
);
|
|
86
|
-
assert.ok(
|
|
87
|
-
clientSource.includes('e.key === "Escape"'),
|
|
88
|
-
"Esc must close the overlay"
|
|
89
|
-
);
|
|
90
|
-
assert.ok(
|
|
91
|
-
clientSource.includes('"memory.overlay.close"'),
|
|
92
|
-
"the overlay ships a localized close label in both dictionaries"
|
|
93
|
-
);
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
// The sidebar hands each footer action only its column state: a wide row
|
|
97
|
-
// (icon + label) when expanded, a bare rail icon when collapsed.
|
|
98
|
-
test("trigger renders a wide row or a rail icon from the wide flag", () => {
|
|
99
|
-
assert.ok(
|
|
100
|
-
/wide \? "mneme-trigger" : "mneme-trigger mneme-rail"/.test(clientSource),
|
|
101
|
-
"trigger must branch on the wide flag"
|
|
102
|
-
);
|
|
103
|
-
assert.ok(
|
|
104
|
-
/wide && h\("span", \{ className: "mneme-trigger-label" \}/.test(clientSource),
|
|
105
|
-
"the label span must render only when wide"
|
|
106
|
-
);
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
// The full-width memory browser lives in the conversation view ring beside
|
|
110
|
-
// Chat / Trajectory, so the client must inject into `conversation.view` with
|
|
111
|
-
// a stable entry id (the active view is persisted by that id).
|
|
112
|
-
test("explorer registers into the conversation view ring", () => {
|
|
113
|
-
assert.ok(
|
|
114
|
-
clientSource.includes('ctx.slots.inject("conversation.view"'),
|
|
115
|
-
"client must inject into conversation.view"
|
|
116
|
-
);
|
|
117
|
-
assert.ok(
|
|
118
|
-
clientSource.includes('id: "dsh-mneme-memory"'),
|
|
119
|
-
"the view entry needs a stable, unique id"
|
|
120
|
-
);
|
|
121
|
-
assert.ok(
|
|
122
|
-
clientSource.includes('"memory.view.label"'),
|
|
123
|
-
"the tab label must come from the memory.view.label dictionary key"
|
|
124
|
-
);
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
// The graph toggle must not read as "share": the primitives share icon is
|
|
128
|
-
// banned and a custom node-graph glyph takes its place.
|
|
129
|
-
test("graph toggle uses a node-graph glyph, not the share icon", () => {
|
|
130
|
-
assert.equal(
|
|
131
|
-
clientSource.includes("IconShareOutline16"),
|
|
132
|
-
false,
|
|
133
|
-
"IconShareOutline16 reads as share and must not appear"
|
|
134
|
-
);
|
|
135
|
-
assert.ok(
|
|
136
|
-
clientSource.includes("GraphNodesIcon"),
|
|
137
|
-
"the custom node-graph icon must back the graph toggle"
|
|
138
|
-
);
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
// Every memory feature lives in the main-area library now: the explorer
|
|
142
|
-
// hosts three sub-views (browse / graph / settings) switched by tabs whose
|
|
143
|
-
// labels come from dedicated dictionary keys.
|
|
144
|
-
test("explorer hosts browse, graph and settings sub-views", () => {
|
|
145
|
-
for (const key of ["tabMemory", "tabGraph", "tabSettings"]) {
|
|
146
|
-
assert.ok(
|
|
147
|
-
clientSource.includes(`"memory.explorer.${key}"`),
|
|
148
|
-
`sub-view labels must come from memory.explorer.${key}`
|
|
149
|
-
);
|
|
150
|
-
}
|
|
151
|
-
assert.ok(
|
|
152
|
-
clientSource.includes('h(GraphPanel, { t, focusEntity: graphFocus, onJumpMemory: jumpToMemory })'),
|
|
153
|
-
"the graph panel must be embedded as a sub-view"
|
|
154
|
-
);
|
|
155
|
-
assert.ok(
|
|
156
|
-
clientSource.includes('h(SettingsContent, { t })'),
|
|
157
|
-
"the settings forms must be embedded as a sub-view"
|
|
158
|
-
);
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
// The graph panel jumps back into the browser: related-memory rows and the
|
|
162
|
-
// edge source button must land on the browse tab with the target selected.
|
|
163
|
-
test("graph jump lands on the selected memory in the browser", () => {
|
|
164
|
-
assert.ok(
|
|
165
|
-
/onClick: \(\) => onJumpMemory && onJumpMemory\(m\)/.test(clientSource),
|
|
166
|
-
"related-memory rows must jump via onJumpMemory(m)"
|
|
167
|
-
);
|
|
168
|
-
assert.ok(
|
|
169
|
-
clientSource.includes("onJumpMemory({ id: selected.edge.memory_id })"),
|
|
170
|
-
"the edge source button must jump to the origin memory by id"
|
|
171
|
-
);
|
|
172
|
-
assert.ok(
|
|
173
|
-
/const jumpToMemory = \(target\) => \{/.test(clientSource),
|
|
174
|
-
"jumpToMemory must reset filters and select the target"
|
|
175
|
-
);
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
// "entity:" in the browser search is the graph entry grammar: it must offer
|
|
179
|
-
// a jump chip instead of filtering the list.
|
|
180
|
-
test("entity: search grammar offers a graph jump", () => {
|
|
181
|
-
assert.ok(
|
|
182
|
-
clientSource.includes('query.trim().startsWith("entity:")'),
|
|
183
|
-
"the entity: prefix must be recognized"
|
|
184
|
-
);
|
|
185
|
-
assert.ok(
|
|
186
|
-
/onClick: \(\) => openGraphFor\(entityQuery\)/.test(clientSource),
|
|
187
|
-
"the jump chip must switch to the graph sub-view"
|
|
188
|
-
);
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
// The explorer is a three-pane layout: types with counts, a month→day time
|
|
192
|
-
// tree, and a detail pane rendering the untruncated content.
|
|
193
|
-
test("explorer lays out types, timeline, and full-text detail", () => {
|
|
194
|
-
assert.ok(
|
|
195
|
-
clientSource.includes('className: "mneme-xmain"'),
|
|
196
|
-
"the three-column grid must be present"
|
|
197
|
-
);
|
|
198
|
-
assert.ok(
|
|
199
|
-
clientSource.includes('className: "mneme-xdcontent"'),
|
|
200
|
-
"the detail pane must render the full content"
|
|
201
|
-
);
|
|
202
|
-
assert.ok(
|
|
203
|
-
/toLocaleDateString\(undefined, \{ year: "numeric", month: "long" \}\)/.test(clientSource),
|
|
204
|
-
"month groups must format via the host locale, not hardcoded strings"
|
|
205
|
-
);
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
// The library page must read as a first-party view: the chrome resolves to
|
|
209
|
-
// the host's design tokens (layer-1 canvas, brand-blue active states) and
|
|
210
|
-
// the boxed-panel / pill-chip patterns of the drawer era must stay gone.
|
|
211
|
-
test("explorer chrome aligns with the host design system", () => {
|
|
212
|
-
assert.ok(
|
|
213
|
-
clientSource.includes("background:var(--dsw-alias-bg-layer-1)"),
|
|
214
|
-
"the page canvas must sit on the host bg-layer-1 token"
|
|
215
|
-
);
|
|
216
|
-
assert.ok(
|
|
217
|
-
/\.mneme-vtab\.mneme-active::after/.test(clientSource),
|
|
218
|
-
"active sub-tabs use the host underline treatment"
|
|
219
|
-
);
|
|
220
|
-
assert.ok(
|
|
221
|
-
clientSource.includes(".mneme-vtab.mneme-active{color:var(--dsw-alias-state-business-primary)}"),
|
|
222
|
-
"active sub-tab text must turn the host brand blue"
|
|
223
|
-
);
|
|
224
|
-
assert.equal(
|
|
225
|
-
/\.mneme-xmain\{[^}]*border:1px/.test(clientSource),
|
|
226
|
-
false,
|
|
227
|
-
"the three-column layout must not wrap itself in a boxed panel"
|
|
228
|
-
);
|
|
229
|
-
assert.equal(
|
|
230
|
-
clientSource.includes("border-radius:999px"),
|
|
231
|
-
false,
|
|
232
|
-
"pill chips belong to the drawer era and must stay gone"
|
|
233
|
-
);
|
|
234
|
-
});
|
|
235
|
-
|
|
236
|
-
// The v0.6.1 wiki-link feature: the detail pane mounts a BacklinksPanel that
|
|
237
|
-
// fetches the two read-only link endpoints by the selected memory id and
|
|
238
|
-
// renders back/forward rows, each jumping back into the browser.
|
|
239
|
-
test("detail pane mounts a BacklinksPanel backed by the two link endpoints", () => {
|
|
240
|
-
assert.ok(
|
|
241
|
-
clientSource.includes("h(BacklinksPanel, { memory: selected, t, onJump: jumpToMemory })"),
|
|
242
|
-
"the detail pane must mount BacklinksPanel after the actions row"
|
|
243
|
-
);
|
|
244
|
-
assert.ok(
|
|
245
|
-
clientSource.includes("/api/dsh-mneme/wikilinks/backlinks?id="),
|
|
246
|
-
"BacklinksPanel must fetch the backlinks endpoint by memory id"
|
|
247
|
-
);
|
|
248
|
-
assert.ok(
|
|
249
|
-
clientSource.includes("/api/dsh-mneme/wikilinks/forward?id="),
|
|
250
|
-
"BacklinksPanel must fetch the forward-links endpoint by memory id"
|
|
251
|
-
);
|
|
252
|
-
});
|
|
253
|
-
|
|
254
|
-
// Detail content turns [[target]] / [[display|target]] into clickable links:
|
|
255
|
-
// the display text survives, the target title is kept for hover, and a click
|
|
256
|
-
// resolves the title through the resolve endpoint before jumping.
|
|
257
|
-
test("detail content renders wiki-links and resolves them on click", () => {
|
|
258
|
-
assert.ok(
|
|
259
|
-
clientSource.includes('className: "mneme-wikilink"'),
|
|
260
|
-
"inline [[target]] links must use the .mneme-wikilink style"
|
|
261
|
-
);
|
|
262
|
-
assert.ok(
|
|
263
|
-
clientSource.includes("/api/dsh-mneme/wikilinks/resolve?title="),
|
|
264
|
-
"clicking a wiki-link must resolve the title via the resolve endpoint"
|
|
265
|
-
);
|
|
266
|
-
assert.ok(
|
|
267
|
-
clientSource.includes('className: "mneme-backlinks"'),
|
|
268
|
-
"the panel must render inside a .mneme-backlinks block"
|
|
269
|
-
);
|
|
270
|
-
});
|
|
271
|
-
|
|
272
|
-
// v0.6.2 tag system: the detail pane renders tags as clickable chips wired to
|
|
273
|
-
// the memory/tags endpoints, and a tag: query always goes server-side.
|
|
274
|
-
test("detail pane renders editable tag chips backed by the tags endpoint", () => {
|
|
275
|
-
assert.ok(
|
|
276
|
-
clientSource.includes("/api/dsh-mneme/memory/tags?id="),
|
|
277
|
-
"the panel must fetch the selected memory's tags via the GET endpoint"
|
|
278
|
-
);
|
|
279
|
-
assert.ok(
|
|
280
|
-
clientSource.includes('method: "POST"'),
|
|
281
|
-
"adding/removing a tag must POST to the tags endpoint"
|
|
282
|
-
);
|
|
283
|
-
assert.ok(
|
|
284
|
-
clientSource.includes("onClick: () => onTagClick(tag)"),
|
|
285
|
-
"a tag chip click must trigger a tag: search"
|
|
286
|
-
);
|
|
287
|
-
assert.ok(
|
|
288
|
-
clientSource.includes("tagManual"),
|
|
289
|
-
"the panel must read the manualTagEnabled gate to hide editing"
|
|
290
|
-
);
|
|
291
|
-
});
|
|
292
|
-
|
|
293
|
-
test("tag: queries run server-side regardless of the semantic toggle", () => {
|
|
294
|
-
assert.ok(
|
|
295
|
-
clientSource.includes('(!semantic && !q.startsWith("tag:"))'),
|
|
296
|
-
"tag: must bypass the semantic toggle and use the search endpoint"
|
|
297
|
-
);
|
|
298
|
-
assert.ok(
|
|
299
|
-
clientSource.includes('setQuery(`tag:${tag}`)'),
|
|
300
|
-
"a tag chip click must set the query to tag:<tag>"
|
|
301
|
-
);
|
|
302
|
-
});
|
|
303
|
-
|
|
304
|
-
test("tag UI ships localized labels in both dictionaries", () => {
|
|
305
|
-
for (const key of ["tagAdd", "tagRemove", "tagPlaceholder", "tagsEmpty"]) {
|
|
306
|
-
assert.ok(
|
|
307
|
-
clientSource.includes(`"memory.explorer.${key}"`),
|
|
308
|
-
`memory.explorer.${key} key must exist`
|
|
309
|
-
);
|
|
310
|
-
}
|
|
311
|
-
});
|
|
312
|
-
|
|
313
|
-
// v0.6.3 directory view: a tag-folder tree backed by the directory endpoint.
|
|
314
|
-
// Folders accordion via data-expanded controlled by MemoryExplorer-lifted
|
|
315
|
-
// state; a memory entry click jumps back into the browser via onJump.
|
|
316
|
-
test("directory sub-view mounts DirectoryPanel backed by the directory endpoint", () => {
|
|
317
|
-
assert.ok(
|
|
318
|
-
clientSource.includes("h(DirectoryPanel, { t, onJump: jumpToMemory, collapsed: dirCollapsed, setCollapsed: setDirCollapsed })"),
|
|
319
|
-
"the directory panel must be embedded as a sub-view with lifted collapse state"
|
|
320
|
-
);
|
|
321
|
-
assert.ok(
|
|
322
|
-
clientSource.includes("/api/dsh-mneme/directory"),
|
|
323
|
-
"DirectoryPanel must fetch the directory endpoint"
|
|
324
|
-
);
|
|
325
|
-
assert.ok(
|
|
326
|
-
clientSource.includes('className: "mneme-directory"'),
|
|
327
|
-
"the directory panel must render inside the .mneme-directory block"
|
|
328
|
-
);
|
|
329
|
-
});
|
|
330
|
-
|
|
331
|
-
test("directory folders accordion via data-expanded driven by MemoryExplorer state", () => {
|
|
332
|
-
assert.ok(
|
|
333
|
-
clientSource.includes('"data-expanded": String(open)'),
|
|
334
|
-
"folder expansion must be driven by the data-expanded attribute"
|
|
335
|
-
);
|
|
336
|
-
assert.ok(
|
|
337
|
-
clientSource.includes("const [dirCollapsed, setDirCollapsed] = useState({})"),
|
|
338
|
-
"collapse state must live in MemoryExplorer so tab switches keep it"
|
|
339
|
-
);
|
|
340
|
-
assert.ok(
|
|
341
|
-
clientSource.includes('"aria-expanded": String(open)'),
|
|
342
|
-
"folder headers must announce their expanded state"
|
|
343
|
-
);
|
|
344
|
-
});
|
|
345
|
-
|
|
346
|
-
test("directory entry click jumps to the memory detail via onJump", () => {
|
|
347
|
-
assert.ok(
|
|
348
|
-
clientSource.includes("onClick: () => onJump(m)"),
|
|
349
|
-
"clicking a memory entry must call onJump with the memory"
|
|
350
|
-
);
|
|
351
|
-
assert.ok(
|
|
352
|
-
clientSource.includes("formatDate(m.updated_at || m.created_at)"),
|
|
353
|
-
"entries must render a timestamp via formatDate"
|
|
354
|
-
);
|
|
355
|
-
assert.ok(
|
|
356
|
-
clientSource.includes("memory.directory.untagged"),
|
|
357
|
-
"untagged memories must be bucketed under a labeled fallback folder"
|
|
358
|
-
);
|
|
359
|
-
});
|
|
360
|
-
|
|
361
|
-
test("directory ships localized labels in both dictionaries", () => {
|
|
362
|
-
for (const key of ["memory.explorer.tabDirectory", "memory.directory.untagged", "memory.directory.loading", "memory.directory.empty"]) {
|
|
363
|
-
assert.ok(
|
|
364
|
-
clientSource.includes(`"${key}"`),
|
|
365
|
-
`${key} key must exist`
|
|
366
|
-
);
|
|
367
|
-
}
|
|
368
|
-
});
|
|
1
|
+
import test from "node:test";
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { readFileSync, existsSync } from "node:fs";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { dirname, join } from "node:path";
|
|
6
|
+
|
|
7
|
+
const root = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
8
|
+
const clientSource = readFileSync(join(root, "lib/client.js"), "utf8");
|
|
9
|
+
const pkg = JSON.parse(readFileSync(join(root, "package.json"), "utf8"));
|
|
10
|
+
|
|
11
|
+
// The Web client bundle registers itself via __ModuleLoader__.load. DSH
|
|
12
|
+
// resolves the bundle by plugin package name, so the registered id must match
|
|
13
|
+
// package.json `name` exactly (a mismatch surfaces as "loaded without
|
|
14
|
+
// registering '@modusensus/dsh-mneme'" in the DSH client).
|
|
15
|
+
test("client bundle registers under the package name", () => {
|
|
16
|
+
const match = clientSource.match(/__ModuleLoader__\.load\(\{\s*id:\s*"([^"]+)"/);
|
|
17
|
+
assert.ok(match, "client bundle must call __ModuleLoader__.load with an id");
|
|
18
|
+
assert.equal(match[1], pkg.name, "registered id must equal package.json name");
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// client.js is hand-authored under lib/ only (no src/ counterpart), so the
|
|
22
|
+
// src->lib sync must never prune it.
|
|
23
|
+
test("client bundle is lib-only with no src counterpart", () => {
|
|
24
|
+
assert.equal(existsSync(join(root, "src/client.js")), false, "src/ must not contain client.js");
|
|
25
|
+
assert.equal(existsSync(join(root, "lib/client.js")), true, "lib/client.js must exist");
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// The memory entry lives at the sidebar foot, not in the settings modal: the
|
|
29
|
+
// migration must register into `sidebar.footer.action` (the list slot the
|
|
30
|
+
// sidebar shell renders beside Settings) and must not keep a `settings.section`
|
|
31
|
+
// registration, or the entry would appear twice under different hosts.
|
|
32
|
+
test("memory entry registers into the sidebar foot slot", () => {
|
|
33
|
+
assert.ok(
|
|
34
|
+
clientSource.includes('ctx.slots.inject("sidebar.footer.action"'),
|
|
35
|
+
"client must inject into sidebar.footer.action"
|
|
36
|
+
);
|
|
37
|
+
assert.equal(
|
|
38
|
+
clientSource.includes('"settings.section"'),
|
|
39
|
+
false,
|
|
40
|
+
"the old settings.section registration must be gone"
|
|
41
|
+
);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
// The drawer era is over as the PRIMARY surface: the sidebar entry must
|
|
45
|
+
// activate the main-area memory library tab first. The one sanctioned
|
|
46
|
+
// exception is the hero screen — the host hides the whole tab ring while a
|
|
47
|
+
// session is blank, so activation legitimately fails there and the same
|
|
48
|
+
// click falls back to a full-viewport overlay (same MemoryExplorer, not the
|
|
49
|
+
// old 420px side drawer). A dialog role stays banned either way.
|
|
50
|
+
test("tab-first activation with hero-screen overlay fallback", () => {
|
|
51
|
+
assert.equal(
|
|
52
|
+
clientSource.includes("role: \"dialog\""),
|
|
53
|
+
false,
|
|
54
|
+
"no dialog surface should remain"
|
|
55
|
+
);
|
|
56
|
+
assert.ok(
|
|
57
|
+
clientSource.includes("activateExplorerTab(t(\"memory.view.label\"))"),
|
|
58
|
+
"the sidebar trigger must activate the memory library tab by its label"
|
|
59
|
+
);
|
|
60
|
+
assert.ok(
|
|
61
|
+
clientSource.includes("activateExplorerTab(t(\"memory.view.label\")).then((ok) => { if (!ok) setOpen(true); })"),
|
|
62
|
+
"a failed tab activation must open the fallback overlay"
|
|
63
|
+
);
|
|
64
|
+
assert.ok(
|
|
65
|
+
/if \(!tab\) \{ resolve\(false\); return; \}/.test(clientSource),
|
|
66
|
+
"activation must resolve false when the tab ring is absent (hero screen)"
|
|
67
|
+
);
|
|
68
|
+
assert.ok(
|
|
69
|
+
/aria-selected.*true/.test(clientSource),
|
|
70
|
+
"activation is only confirmed once the host marks the tab selected"
|
|
71
|
+
);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
// The fallback overlay reuses the full MemoryExplorer (three columns, graph,
|
|
75
|
+
// settings) at viewport size — not the old side drawer — and closes on Esc
|
|
76
|
+
// or the close button.
|
|
77
|
+
test("hero fallback overlay is a full-viewport MemoryExplorer with a close affordance", () => {
|
|
78
|
+
assert.ok(
|
|
79
|
+
clientSource.includes('.mneme-overlay{position:fixed;inset:0'),
|
|
80
|
+
"the overlay must cover the full viewport"
|
|
81
|
+
);
|
|
82
|
+
assert.ok(
|
|
83
|
+
clientSource.includes('h(MemoryExplorer, { t })'),
|
|
84
|
+
"the overlay renders the same MemoryExplorer component as the tab"
|
|
85
|
+
);
|
|
86
|
+
assert.ok(
|
|
87
|
+
clientSource.includes('e.key === "Escape"'),
|
|
88
|
+
"Esc must close the overlay"
|
|
89
|
+
);
|
|
90
|
+
assert.ok(
|
|
91
|
+
clientSource.includes('"memory.overlay.close"'),
|
|
92
|
+
"the overlay ships a localized close label in both dictionaries"
|
|
93
|
+
);
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
// The sidebar hands each footer action only its column state: a wide row
|
|
97
|
+
// (icon + label) when expanded, a bare rail icon when collapsed.
|
|
98
|
+
test("trigger renders a wide row or a rail icon from the wide flag", () => {
|
|
99
|
+
assert.ok(
|
|
100
|
+
/wide \? "mneme-trigger" : "mneme-trigger mneme-rail"/.test(clientSource),
|
|
101
|
+
"trigger must branch on the wide flag"
|
|
102
|
+
);
|
|
103
|
+
assert.ok(
|
|
104
|
+
/wide && h\("span", \{ className: "mneme-trigger-label" \}/.test(clientSource),
|
|
105
|
+
"the label span must render only when wide"
|
|
106
|
+
);
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// The full-width memory browser lives in the conversation view ring beside
|
|
110
|
+
// Chat / Trajectory, so the client must inject into `conversation.view` with
|
|
111
|
+
// a stable entry id (the active view is persisted by that id).
|
|
112
|
+
test("explorer registers into the conversation view ring", () => {
|
|
113
|
+
assert.ok(
|
|
114
|
+
clientSource.includes('ctx.slots.inject("conversation.view"'),
|
|
115
|
+
"client must inject into conversation.view"
|
|
116
|
+
);
|
|
117
|
+
assert.ok(
|
|
118
|
+
clientSource.includes('id: "dsh-mneme-memory"'),
|
|
119
|
+
"the view entry needs a stable, unique id"
|
|
120
|
+
);
|
|
121
|
+
assert.ok(
|
|
122
|
+
clientSource.includes('"memory.view.label"'),
|
|
123
|
+
"the tab label must come from the memory.view.label dictionary key"
|
|
124
|
+
);
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
// The graph toggle must not read as "share": the primitives share icon is
|
|
128
|
+
// banned and a custom node-graph glyph takes its place.
|
|
129
|
+
test("graph toggle uses a node-graph glyph, not the share icon", () => {
|
|
130
|
+
assert.equal(
|
|
131
|
+
clientSource.includes("IconShareOutline16"),
|
|
132
|
+
false,
|
|
133
|
+
"IconShareOutline16 reads as share and must not appear"
|
|
134
|
+
);
|
|
135
|
+
assert.ok(
|
|
136
|
+
clientSource.includes("GraphNodesIcon"),
|
|
137
|
+
"the custom node-graph icon must back the graph toggle"
|
|
138
|
+
);
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
// Every memory feature lives in the main-area library now: the explorer
|
|
142
|
+
// hosts three sub-views (browse / graph / settings) switched by tabs whose
|
|
143
|
+
// labels come from dedicated dictionary keys.
|
|
144
|
+
test("explorer hosts browse, graph and settings sub-views", () => {
|
|
145
|
+
for (const key of ["tabMemory", "tabGraph", "tabSettings"]) {
|
|
146
|
+
assert.ok(
|
|
147
|
+
clientSource.includes(`"memory.explorer.${key}"`),
|
|
148
|
+
`sub-view labels must come from memory.explorer.${key}`
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
assert.ok(
|
|
152
|
+
clientSource.includes('h(GraphPanel, { t, focusEntity: graphFocus, onJumpMemory: jumpToMemory })'),
|
|
153
|
+
"the graph panel must be embedded as a sub-view"
|
|
154
|
+
);
|
|
155
|
+
assert.ok(
|
|
156
|
+
clientSource.includes('h(SettingsContent, { t })'),
|
|
157
|
+
"the settings forms must be embedded as a sub-view"
|
|
158
|
+
);
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
// The graph panel jumps back into the browser: related-memory rows and the
|
|
162
|
+
// edge source button must land on the browse tab with the target selected.
|
|
163
|
+
test("graph jump lands on the selected memory in the browser", () => {
|
|
164
|
+
assert.ok(
|
|
165
|
+
/onClick: \(\) => onJumpMemory && onJumpMemory\(m\)/.test(clientSource),
|
|
166
|
+
"related-memory rows must jump via onJumpMemory(m)"
|
|
167
|
+
);
|
|
168
|
+
assert.ok(
|
|
169
|
+
clientSource.includes("onJumpMemory({ id: selected.edge.memory_id })"),
|
|
170
|
+
"the edge source button must jump to the origin memory by id"
|
|
171
|
+
);
|
|
172
|
+
assert.ok(
|
|
173
|
+
/const jumpToMemory = \(target\) => \{/.test(clientSource),
|
|
174
|
+
"jumpToMemory must reset filters and select the target"
|
|
175
|
+
);
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
// "entity:" in the browser search is the graph entry grammar: it must offer
|
|
179
|
+
// a jump chip instead of filtering the list.
|
|
180
|
+
test("entity: search grammar offers a graph jump", () => {
|
|
181
|
+
assert.ok(
|
|
182
|
+
clientSource.includes('query.trim().startsWith("entity:")'),
|
|
183
|
+
"the entity: prefix must be recognized"
|
|
184
|
+
);
|
|
185
|
+
assert.ok(
|
|
186
|
+
/onClick: \(\) => openGraphFor\(entityQuery\)/.test(clientSource),
|
|
187
|
+
"the jump chip must switch to the graph sub-view"
|
|
188
|
+
);
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
// The explorer is a three-pane layout: types with counts, a month→day time
|
|
192
|
+
// tree, and a detail pane rendering the untruncated content.
|
|
193
|
+
test("explorer lays out types, timeline, and full-text detail", () => {
|
|
194
|
+
assert.ok(
|
|
195
|
+
clientSource.includes('className: "mneme-xmain"'),
|
|
196
|
+
"the three-column grid must be present"
|
|
197
|
+
);
|
|
198
|
+
assert.ok(
|
|
199
|
+
clientSource.includes('className: "mneme-xdcontent"'),
|
|
200
|
+
"the detail pane must render the full content"
|
|
201
|
+
);
|
|
202
|
+
assert.ok(
|
|
203
|
+
/toLocaleDateString\(undefined, \{ year: "numeric", month: "long" \}\)/.test(clientSource),
|
|
204
|
+
"month groups must format via the host locale, not hardcoded strings"
|
|
205
|
+
);
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
// The library page must read as a first-party view: the chrome resolves to
|
|
209
|
+
// the host's design tokens (layer-1 canvas, brand-blue active states) and
|
|
210
|
+
// the boxed-panel / pill-chip patterns of the drawer era must stay gone.
|
|
211
|
+
test("explorer chrome aligns with the host design system", () => {
|
|
212
|
+
assert.ok(
|
|
213
|
+
clientSource.includes("background:var(--dsw-alias-bg-layer-1)"),
|
|
214
|
+
"the page canvas must sit on the host bg-layer-1 token"
|
|
215
|
+
);
|
|
216
|
+
assert.ok(
|
|
217
|
+
/\.mneme-vtab\.mneme-active::after/.test(clientSource),
|
|
218
|
+
"active sub-tabs use the host underline treatment"
|
|
219
|
+
);
|
|
220
|
+
assert.ok(
|
|
221
|
+
clientSource.includes(".mneme-vtab.mneme-active{color:var(--dsw-alias-state-business-primary)}"),
|
|
222
|
+
"active sub-tab text must turn the host brand blue"
|
|
223
|
+
);
|
|
224
|
+
assert.equal(
|
|
225
|
+
/\.mneme-xmain\{[^}]*border:1px/.test(clientSource),
|
|
226
|
+
false,
|
|
227
|
+
"the three-column layout must not wrap itself in a boxed panel"
|
|
228
|
+
);
|
|
229
|
+
assert.equal(
|
|
230
|
+
clientSource.includes("border-radius:999px"),
|
|
231
|
+
false,
|
|
232
|
+
"pill chips belong to the drawer era and must stay gone"
|
|
233
|
+
);
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
// The v0.6.1 wiki-link feature: the detail pane mounts a BacklinksPanel that
|
|
237
|
+
// fetches the two read-only link endpoints by the selected memory id and
|
|
238
|
+
// renders back/forward rows, each jumping back into the browser.
|
|
239
|
+
test("detail pane mounts a BacklinksPanel backed by the two link endpoints", () => {
|
|
240
|
+
assert.ok(
|
|
241
|
+
clientSource.includes("h(BacklinksPanel, { memory: selected, t, onJump: jumpToMemory })"),
|
|
242
|
+
"the detail pane must mount BacklinksPanel after the actions row"
|
|
243
|
+
);
|
|
244
|
+
assert.ok(
|
|
245
|
+
clientSource.includes("/api/dsh-mneme/wikilinks/backlinks?id="),
|
|
246
|
+
"BacklinksPanel must fetch the backlinks endpoint by memory id"
|
|
247
|
+
);
|
|
248
|
+
assert.ok(
|
|
249
|
+
clientSource.includes("/api/dsh-mneme/wikilinks/forward?id="),
|
|
250
|
+
"BacklinksPanel must fetch the forward-links endpoint by memory id"
|
|
251
|
+
);
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
// Detail content turns [[target]] / [[display|target]] into clickable links:
|
|
255
|
+
// the display text survives, the target title is kept for hover, and a click
|
|
256
|
+
// resolves the title through the resolve endpoint before jumping.
|
|
257
|
+
test("detail content renders wiki-links and resolves them on click", () => {
|
|
258
|
+
assert.ok(
|
|
259
|
+
clientSource.includes('className: "mneme-wikilink"'),
|
|
260
|
+
"inline [[target]] links must use the .mneme-wikilink style"
|
|
261
|
+
);
|
|
262
|
+
assert.ok(
|
|
263
|
+
clientSource.includes("/api/dsh-mneme/wikilinks/resolve?title="),
|
|
264
|
+
"clicking a wiki-link must resolve the title via the resolve endpoint"
|
|
265
|
+
);
|
|
266
|
+
assert.ok(
|
|
267
|
+
clientSource.includes('className: "mneme-backlinks"'),
|
|
268
|
+
"the panel must render inside a .mneme-backlinks block"
|
|
269
|
+
);
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
// v0.6.2 tag system: the detail pane renders tags as clickable chips wired to
|
|
273
|
+
// the memory/tags endpoints, and a tag: query always goes server-side.
|
|
274
|
+
test("detail pane renders editable tag chips backed by the tags endpoint", () => {
|
|
275
|
+
assert.ok(
|
|
276
|
+
clientSource.includes("/api/dsh-mneme/memory/tags?id="),
|
|
277
|
+
"the panel must fetch the selected memory's tags via the GET endpoint"
|
|
278
|
+
);
|
|
279
|
+
assert.ok(
|
|
280
|
+
clientSource.includes('method: "POST"'),
|
|
281
|
+
"adding/removing a tag must POST to the tags endpoint"
|
|
282
|
+
);
|
|
283
|
+
assert.ok(
|
|
284
|
+
clientSource.includes("onClick: () => onTagClick(tag)"),
|
|
285
|
+
"a tag chip click must trigger a tag: search"
|
|
286
|
+
);
|
|
287
|
+
assert.ok(
|
|
288
|
+
clientSource.includes("tagManual"),
|
|
289
|
+
"the panel must read the manualTagEnabled gate to hide editing"
|
|
290
|
+
);
|
|
291
|
+
});
|
|
292
|
+
|
|
293
|
+
test("tag: queries run server-side regardless of the semantic toggle", () => {
|
|
294
|
+
assert.ok(
|
|
295
|
+
clientSource.includes('(!semantic && !q.startsWith("tag:"))'),
|
|
296
|
+
"tag: must bypass the semantic toggle and use the search endpoint"
|
|
297
|
+
);
|
|
298
|
+
assert.ok(
|
|
299
|
+
clientSource.includes('setQuery(`tag:${tag}`)'),
|
|
300
|
+
"a tag chip click must set the query to tag:<tag>"
|
|
301
|
+
);
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
test("tag UI ships localized labels in both dictionaries", () => {
|
|
305
|
+
for (const key of ["tagAdd", "tagRemove", "tagPlaceholder", "tagsEmpty"]) {
|
|
306
|
+
assert.ok(
|
|
307
|
+
clientSource.includes(`"memory.explorer.${key}"`),
|
|
308
|
+
`memory.explorer.${key} key must exist`
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
// v0.6.3 directory view: a tag-folder tree backed by the directory endpoint.
|
|
314
|
+
// Folders accordion via data-expanded controlled by MemoryExplorer-lifted
|
|
315
|
+
// state; a memory entry click jumps back into the browser via onJump.
|
|
316
|
+
test("directory sub-view mounts DirectoryPanel backed by the directory endpoint", () => {
|
|
317
|
+
assert.ok(
|
|
318
|
+
clientSource.includes("h(DirectoryPanel, { t, onJump: jumpToMemory, collapsed: dirCollapsed, setCollapsed: setDirCollapsed })"),
|
|
319
|
+
"the directory panel must be embedded as a sub-view with lifted collapse state"
|
|
320
|
+
);
|
|
321
|
+
assert.ok(
|
|
322
|
+
clientSource.includes("/api/dsh-mneme/directory"),
|
|
323
|
+
"DirectoryPanel must fetch the directory endpoint"
|
|
324
|
+
);
|
|
325
|
+
assert.ok(
|
|
326
|
+
clientSource.includes('className: "mneme-directory"'),
|
|
327
|
+
"the directory panel must render inside the .mneme-directory block"
|
|
328
|
+
);
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
test("directory folders accordion via data-expanded driven by MemoryExplorer state", () => {
|
|
332
|
+
assert.ok(
|
|
333
|
+
clientSource.includes('"data-expanded": String(open)'),
|
|
334
|
+
"folder expansion must be driven by the data-expanded attribute"
|
|
335
|
+
);
|
|
336
|
+
assert.ok(
|
|
337
|
+
clientSource.includes("const [dirCollapsed, setDirCollapsed] = useState({})"),
|
|
338
|
+
"collapse state must live in MemoryExplorer so tab switches keep it"
|
|
339
|
+
);
|
|
340
|
+
assert.ok(
|
|
341
|
+
clientSource.includes('"aria-expanded": String(open)'),
|
|
342
|
+
"folder headers must announce their expanded state"
|
|
343
|
+
);
|
|
344
|
+
});
|
|
345
|
+
|
|
346
|
+
test("directory entry click jumps to the memory detail via onJump", () => {
|
|
347
|
+
assert.ok(
|
|
348
|
+
clientSource.includes("onClick: () => onJump(m)"),
|
|
349
|
+
"clicking a memory entry must call onJump with the memory"
|
|
350
|
+
);
|
|
351
|
+
assert.ok(
|
|
352
|
+
clientSource.includes("formatDate(m.updated_at || m.created_at)"),
|
|
353
|
+
"entries must render a timestamp via formatDate"
|
|
354
|
+
);
|
|
355
|
+
assert.ok(
|
|
356
|
+
clientSource.includes("memory.directory.untagged"),
|
|
357
|
+
"untagged memories must be bucketed under a labeled fallback folder"
|
|
358
|
+
);
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
test("directory ships localized labels in both dictionaries", () => {
|
|
362
|
+
for (const key of ["memory.explorer.tabDirectory", "memory.directory.untagged", "memory.directory.loading", "memory.directory.empty"]) {
|
|
363
|
+
assert.ok(
|
|
364
|
+
clientSource.includes(`"${key}"`),
|
|
365
|
+
`${key} key must exist`
|
|
366
|
+
);
|
|
367
|
+
}
|
|
368
|
+
});
|