[GH-ISSUE #1323] [Issue]: Long-Term Memory Debug: selected event isn't visible, plus 1.4.20 follow-ups #675

Closed
opened 2026-10-20 17:29:37 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Promansis on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1323

Originally assigned to: @Promansis on GitHub.

Summary

In the rebuilt Debug tab you can't see which event is selected. The only row highlight comes from mouse hover, and the active filter chip looks like the others. A review of 1.4.20 also found smaller problems:

  • rows repeat their title as "AI extraction: Ok." instead of showing the outcome;
  • the Result line says "1 duplicates";
  • applied changes show raw IDs;
  • an empty "Details" heading renders;
  • recall counts appear twice;
  • the health line always says "Log size unavailable".

Two small audit leftovers remain (D20, D24). None of this changed in 1.4.21–1.4.24. This is the last Debug follow-up after #1275.

Affected package

long-term-memory 1.4.24: Memory Settings → Debug, the Vault memory's "Open debug log" link, and one Chat Settings message.

Expected behavior

  1. Selected event (P2). The open event's row stays visibly selected (background and an accent bar) wherever the pointer is. It is still marked when you go back to Events on a phone. The active chip looks pressed. Muted text on hovered and selected rows meets 4.5:1 contrast.

  2. Rows show the outcome. A row's second line is the outcome in a few words, taken from the counts already logged:

    • extraction: "7 of 12 kept";
    • recall: "1 added · 6 not added", or "Nothing added";
    • apply: "1 saved · 1 skipped".

    A failed row keeps its error message, clamped to two lines. A row with warnings shows its outcome when it has one (the icon already marks the warning), otherwise the warning message. A row with neither shows no second line. Nothing reads "{action}: {status}.", and timeline steps don't repeat it either.

  3. The warning callout says what happened. For a compile-evidence warning, that is "4 candidates failed checks; see Not kept.", not "Compile evidence: Warning.".

  4. Result wording. Counts use the right plural ("1 duplicate", "1 change"), and "kept units" reads "kept".

  5. Applied changes. Result shows how many changes were saved and skipped. "Not saved" shows a count such as "1 change skipped". Raw IDs only appear in Copy JSON.

  6. Sections in the details pane render only when they have content, so there is no empty "Details" heading.

  7. Recall details don't repeat the Result counts or the used-token count under "Details".

  8. The health line no longer shows "Log size unavailable". The client has no debug-log size; adding one to /status would be a separate server change.

  9. The Vault "Open debug log" link has a 44 px target.

  10. "The latest recall failed. Check debug activity for details." names the real place: Memory Settings → Debug. The unused keys activityview.debugActivity and activityview.value1Ms are removed.

Actual behavior

Paths are under packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/. Line numbers are at staging a6cefea4, where these files are unchanged since 1.4.20.

  1. The row button has only hover: styling (ActivityView.tsx:1436). Selection is aria-pressed with no visual state. The chips (:1373-1379) use Button with aria-pressed, and Engine 2.4.1 has no .mari-editor-action[aria-pressed] style. In the attached screenshot, the details pane shows "Apply changes" while an "AI extraction" row is highlighted, because the pointer is over it. axe (dark theme, desktop, pointer left on the selected recall row) reports color-contrast on 2 nodes: the muted subject and summary text in that row.
  2. describeEvent falls back to "{action}: {humanizeLabel(status)}." (:168-171), and the row summary uses it (:1421-1427). Rows read "AI extraction · Legacy global memory / AI extraction: Ok.", "Deferred draft / Deferred draft: Ok." and "Memory recall / Memory recall: Ok.". Long problem messages wrap to four or five lines in the 20rem list.
  3. The compile-evidence warning callout reads "Compile evidence: Warning.". The server logs that event as a warning when counts.candidateRejectionDiagnostics > 0 (source-extraction.ts:688), and the callout doesn't say so.
  4. The Result line reads "12 candidates · 7 kept units · 2 changes · 2 target memories · 1 duplicates". extractionCounts is one fixed sentence with no singular forms (:931).
  5. "Not saved" lists raw change IDs, for example 11111111-2222-3333-4444-555555555555 (:977-994). For the same operation, Result reads "Not recorded".
  6. The data-ltm-debug-facts section always renders its "Details" heading (:1112-1140), even when it's empty, for example for an apply.
  7. Recall shows "Result: 1 added · 6 not added", then "Details: 1 selected · 6 rejected · 42 used tokens", and also "Used: 42 tokens" under Run parameters.
  8. :1300 always renders "Log size unavailable".
  9. The "Open debug log" button (MemoryVault.tsx:4588-4595) is about 16 px tall.
  10. locales/en.json:205 says "Check debug activity for details." Neither of the two keys is used anywhere in the source or tests.

Steps to reproduce

  1. Open Long-Term Memory → Memory Settings → Debug on desktop with a few recorded operations. The fixtures in tests/long-term-memory-browser.regression.ts are enough.
  2. Click a row, then move the pointer over another row. The clicked row loses its highlight and the hovered row gains it. Click "Problems": it looks the same as the other chips.
  3. Look at completed rows: the second line repeats the title, for example "AI extraction: Ok.".
  4. Select "Compile evidence": the callout reads "Compile evidence: Warning." and Result says "1 duplicates".
  5. Select "Apply changes": a raw ID appears under "Not saved", and an empty "Details" heading appears.
  6. Select a recall: the added/not-added counts appear again under "Details".

Environment

  • Marinara Engine version: 2.4.1 (c0ce4d8, the package's minimum)
  • Package version: long-term-memory 1.4.20 when seen. The Debug files are unchanged in 1.4.24 (staging @ a6cefea4).
  • Install type: source (the package browser regression harness, using the committed 1.4.20 artifact)
  • OS + version: Linux
  • Browser or app shell: Chromium 141 (Playwright), at 1280×900 and 390×844

Logs, screenshots, or video

Screenshot attached: the details pane shows "Apply changes" while the highlighted row is "AI extraction" (pointer hover). It contains fixture data only.

axe, dark theme, desktop, with a recall selected and the pointer left on its row: color-contrast [serious], 2 nodes, on the muted subject and summary text inside button[data-ltm-debug-operation="recall"]. Not re-checked with the pointer moved away. Mobile: 0 violations.

Additional context

Follow-up to #1275 (Debug controls and polish). The items come from a review of the Debug audit against 1.4.20: N1–N8, the "1 duplicates" plural, and the leftovers from D20 and D24. A companion issue covers the parts of the agreed two-pane design that were not built (row times, result counts, recall candidate rows, the timeline). This issue is the smaller, client-only set.

Minimal fixes (paths as above)

  1. Selected row and chips. Reuse the Vault's pressed pattern (MemoryVault.tsx:3962):

    • Row button (ActivityView.tsx:1436): add group aria-pressed:bg-[var(--accent)] aria-pressed:shadow-[inset_3px_0_0_var(--primary)].
    • The row's two muted spans (:1455, :1460): add group-hover:text-[var(--foreground)] group-aria-pressed:text-[var(--foreground)]. This also fixes the axe contrast finding.
    • Chips: pass className="aria-pressed:bg-[var(--accent)]" to each chip Button.

    Selection already survives the phone pane switch (selectedOperationId), so no state change is needed.

  2. Row outcome. Add a small operationOutcome(operation) next to operationSubject, and use it for the row's second line unless the operation failed (a failed row keeps the error message from principalEvent, :1421-1427):

    • recall_explanation: the existing recallCounts key, or a new nothingAdded key when counts.selected is 0;
    • evidence_units_compiled: a new key keptOfCandidates, "{{kept}} of {{candidates}} kept", from counts.units and counts.totalCandidates;
    • mutations_selected: a new key savedSkipped, "{{saved}} saved · {{skipped}} skipped", from mutationIds.length and details.skippedMutationIds.length. That is the shape the server logs (reconciliation.ts:826-838).
    • Otherwise, the principal event's message (a warning such as the truncation notice), or nothing.

    Put line-clamp-2 on the summary span (the same pattern as MemoryVault.tsx:3677). Make the status fallback in describeEvent (:168-171) return "", and skip the timeline <p> when it is empty (:1165).

  3. Warning callout. In problemMessages (:273-289), give a compile warning with no message a new key candidatesFailedChecks, "{{count}} candidates failed checks; see Not kept.", from counts.candidateRejectionDiagnostics, with a singular form. If that count is missing, use "Some candidates failed checks; see Not kept.". The browser fixture (:2444-2446) omits the count, which real compile events always carry, so add candidateRejectionDiagnostics: 4 there.

  4. Result plurals. Build the extractionCounts line from parts. Pick the singular key with selectLtmPluralForm, which :1039-1043 already uses for recallContextMessagesOne. Rename "kept units" to "kept".

  5. Apply.

    • Result: add an apply branch to the Result section (:912-966) that uses savedSkipped.
    • Not saved (:977-994): render a count key (skippedChanges / skippedChangesOne) instead of joining the IDs. Keep noSkippedChanges.
    • Fixture: the browser fixture puts mutationIds on an apply_changes event (tests/long-term-memory-browser.regression.ts:2592-2595), which the server never logs. Move it to the mutations_selected event so the test uses the real shape.
  6. Details section. Render data-ltm-debug-facts only when it has a memory source, model, provider, duration or count summary.

  7. Recall counts. Compute countSummary (:836) from the operation's events without recall_explanation; its counts already appear in Result and Run parameters.

  8. Health line. Remove the healthLogSize segment and its comment (:1298-1300), and the key. Open PR #1306 edits the next line, so whichever merges second rebases.

  9. Vault link. MemoryVault.tsx:4590: replace mt-2 block with mt-2 inline-flex min-h-11 items-center.

  10. Strings. en.json:205 becomes "The latest recall failed. Open Memory Settings → Debug for details." Delete activityview.debugActivity (:57) and activityview.value1Ms (:97).

Regression proof (tests/long-term-memory-browser.regression.ts)

  • With the pointer moved away, the selected row's computed background differs from an unselected row's, and the active chip's differs from an inactive chip's. axe color-contrast reports 0 on the list with a row selected and another row hovered.
  • No row or timeline step contains "AI extraction: Ok." or "Memory recall: Ok.". The compile row reads "7 of 12 kept", the recall row "1 added · 6 not added", and the apply row "1 saved · 1 skipped".
  • The compile callout reads "4 candidates failed checks" and not "Compile evidence: Warning.". Result says "1 duplicate", and "7 kept units" is gone. This updates the assertions at :2665-2667.
  • Apply shows "1 change skipped". The ID is not on the page but is in Copy JSON. This replaces the assertion at :2689.
  • The apply operation has no empty "Details" heading, and the recall's "Details" does not contain "1 selected".
  • The health line has no "Log size". This replaces :2783.
  • The newest-events notice (D08), which has no test today: with 200 events, the notice and "Show up to 1,000" appear, and clicking it requests limit=1000. With fewer events, there is no notice. The debug-log?* stub already honours limit.
  • The Vault "Open debug log" link is at least 44 px tall.
  • The existing guarantees stay asserted: token wording, no response snippet on screen, no made-up duration, and no horizontal overflow on desktop and mobile.

Out of scope

  • D19: the compact Chat Settings summary still clips "812 tokens" at 320 px. That needs its own issue.
  • D22 (Korean UI catalog), D30 and --marinara-editor-warning (Engine tokens).
  • Adding the debug-log size to /status (a server change).

Release

Client-only. Patch bump to the next free version (#1306 takes 1.4.25) with a CHANGELOG entry; rebuild the package, artifact and catalog entry.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Oct 12, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1323 Originally assigned to: @Promansis on GitHub. ## Summary In the rebuilt Debug tab you can't see which event is selected. The only row highlight comes from mouse hover, and the active filter chip looks like the others. A review of 1.4.20 also found smaller problems: - rows repeat their title as "AI extraction: Ok." instead of showing the outcome; - the Result line says "1 duplicates"; - applied changes show raw IDs; - an empty "Details" heading renders; - recall counts appear twice; - the health line always says "Log size unavailable". Two small audit leftovers remain (D20, D24). None of this changed in 1.4.21–1.4.24. This is the last Debug follow-up after #1275. ## Affected package `long-term-memory` 1.4.24: Memory Settings → Debug, the Vault memory's "Open debug log" link, and one Chat Settings message. ## Expected behavior 1. **Selected event (P2).** The open event's row stays visibly selected (background and an accent bar) wherever the pointer is. It is still marked when you go back to Events on a phone. The active chip looks pressed. Muted text on hovered and selected rows meets 4.5:1 contrast. 2. **Rows show the outcome.** A row's second line is the outcome in a few words, taken from the counts already logged: - extraction: "7 of 12 kept"; - recall: "1 added · 6 not added", or "Nothing added"; - apply: "1 saved · 1 skipped". A failed row keeps its error message, clamped to two lines. A row with warnings shows its outcome when it has one (the icon already marks the warning), otherwise the warning message. A row with neither shows no second line. Nothing reads "{action}: {status}.", and timeline steps don't repeat it either. 3. **The warning callout says what happened.** For a compile-evidence warning, that is "4 candidates failed checks; see Not kept.", not "Compile evidence: Warning.". 4. **Result wording.** Counts use the right plural ("1 duplicate", "1 change"), and "kept units" reads "kept". 5. **Applied changes.** Result shows how many changes were saved and skipped. "Not saved" shows a count such as "1 change skipped". Raw IDs only appear in Copy JSON. 6. Sections in the details pane render only when they have content, so there is no empty "Details" heading. 7. Recall details don't repeat the Result counts or the used-token count under "Details". 8. The health line no longer shows "Log size unavailable". The client has no debug-log size; adding one to `/status` would be a separate server change. 9. The Vault "Open debug log" link has a 44 px target. 10. "The latest recall failed. Check debug activity for details." names the real place: Memory Settings → Debug. The unused keys `activityview.debugActivity` and `activityview.value1Ms` are removed. ## Actual behavior Paths are under `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/`. Line numbers are at `staging` `a6cefea4`, where these files are unchanged since 1.4.20. 1. The row button has only `hover:` styling (`ActivityView.tsx:1436`). Selection is `aria-pressed` with no visual state. The chips (`:1373-1379`) use `Button` with `aria-pressed`, and Engine 2.4.1 has no `.mari-editor-action[aria-pressed]` style. In the attached screenshot, the details pane shows "Apply changes" while an "AI extraction" row is highlighted, because the pointer is over it. axe (dark theme, desktop, pointer left on the selected recall row) reports `color-contrast` on 2 nodes: the muted subject and summary text in that row. 2. `describeEvent` falls back to `"{action}: {humanizeLabel(status)}."` (`:168-171`), and the row summary uses it (`:1421-1427`). Rows read "AI extraction · Legacy global memory / AI extraction: Ok.", "Deferred draft / Deferred draft: Ok." and "Memory recall / Memory recall: Ok.". Long problem messages wrap to four or five lines in the 20rem list. 3. The compile-evidence warning callout reads "Compile evidence: Warning.". The server logs that event as a warning when `counts.candidateRejectionDiagnostics > 0` (`source-extraction.ts:688`), and the callout doesn't say so. 4. The Result line reads "12 candidates · 7 kept units · 2 changes · 2 target memories · 1 duplicates". `extractionCounts` is one fixed sentence with no singular forms (`:931`). 5. "Not saved" lists raw change IDs, for example `11111111-2222-3333-4444-555555555555` (`:977-994`). For the same operation, Result reads "Not recorded". 6. The `data-ltm-debug-facts` section always renders its "Details" heading (`:1112-1140`), even when it's empty, for example for an apply. 7. Recall shows "Result: 1 added · 6 not added", then "Details: 1 selected · 6 rejected · 42 used tokens", and also "Used: 42 tokens" under Run parameters. 8. `:1300` always renders "Log size unavailable". 9. The "Open debug log" button (`MemoryVault.tsx:4588-4595`) is about 16 px tall. 10. `locales/en.json:205` says "Check debug activity for details." Neither of the two keys is used anywhere in the source or tests. ## Steps to reproduce 1. Open Long-Term Memory → Memory Settings → Debug on desktop with a few recorded operations. The fixtures in `tests/long-term-memory-browser.regression.ts` are enough. 2. Click a row, then move the pointer over another row. The clicked row loses its highlight and the hovered row gains it. Click "Problems": it looks the same as the other chips. 3. Look at completed rows: the second line repeats the title, for example "AI extraction: Ok.". 4. Select "Compile evidence": the callout reads "Compile evidence: Warning." and Result says "1 duplicates". 5. Select "Apply changes": a raw ID appears under "Not saved", and an empty "Details" heading appears. 6. Select a recall: the added/not-added counts appear again under "Details". ## Environment - Marinara Engine version: 2.4.1 (`c0ce4d8`, the package's minimum) - Package version: long-term-memory 1.4.20 when seen. The Debug files are unchanged in 1.4.24 (`staging` @ `a6cefea4`). - Install type: source (the package browser regression harness, using the committed 1.4.20 artifact) - OS + version: Linux - Browser or app shell: Chromium 141 (Playwright), at 1280×900 and 390×844 ## Logs, screenshots, or video Screenshot attached: the details pane shows "Apply changes" while the highlighted row is "AI extraction" (pointer hover). It contains fixture data only. axe, dark theme, desktop, with a recall selected and the pointer left on its row: `color-contrast` [serious], 2 nodes, on the muted subject and summary text inside `button[data-ltm-debug-operation="recall"]`. Not re-checked with the pointer moved away. Mobile: 0 violations. ## Additional context Follow-up to #1275 (Debug controls and polish). The items come from a review of the Debug audit against 1.4.20: N1–N8, the "1 duplicates" plural, and the leftovers from D20 and D24. A companion issue covers the parts of the agreed two-pane design that were not built (row times, result counts, recall candidate rows, the timeline). This issue is the smaller, client-only set. **Minimal fixes** (paths as above) 1. **Selected row and chips.** Reuse the Vault's pressed pattern (`MemoryVault.tsx:3962`): - Row button (`ActivityView.tsx:1436`): add `group aria-pressed:bg-[var(--accent)] aria-pressed:shadow-[inset_3px_0_0_var(--primary)]`. - The row's two muted spans (`:1455`, `:1460`): add `group-hover:text-[var(--foreground)] group-aria-pressed:text-[var(--foreground)]`. This also fixes the axe contrast finding. - Chips: pass `className="aria-pressed:bg-[var(--accent)]"` to each chip `Button`. Selection already survives the phone pane switch (`selectedOperationId`), so no state change is needed. 2. **Row outcome.** Add a small `operationOutcome(operation)` next to `operationSubject`, and use it for the row's second line unless the operation failed (a failed row keeps the error message from `principalEvent`, `:1421-1427`): - `recall_explanation`: the existing `recallCounts` key, or a new `nothingAdded` key when `counts.selected` is 0; - `evidence_units_compiled`: a new key `keptOfCandidates`, "{{kept}} of {{candidates}} kept", from `counts.units` and `counts.totalCandidates`; - `mutations_selected`: a new key `savedSkipped`, "{{saved}} saved · {{skipped}} skipped", from `mutationIds.length` and `details.skippedMutationIds.length`. That is the shape the server logs (`reconciliation.ts:826-838`). - Otherwise, the principal event's message (a warning such as the truncation notice), or nothing. Put `line-clamp-2` on the summary span (the same pattern as `MemoryVault.tsx:3677`). Make the status fallback in `describeEvent` (`:168-171`) return `""`, and skip the timeline `<p>` when it is empty (`:1165`). 3. **Warning callout.** In `problemMessages` (`:273-289`), give a compile warning with no message a new key `candidatesFailedChecks`, "{{count}} candidates failed checks; see Not kept.", from `counts.candidateRejectionDiagnostics`, with a singular form. If that count is missing, use "Some candidates failed checks; see Not kept.". The browser fixture (`:2444-2446`) omits the count, which real compile events always carry, so add `candidateRejectionDiagnostics: 4` there. 4. **Result plurals.** Build the `extractionCounts` line from parts. Pick the singular key with `selectLtmPluralForm`, which `:1039-1043` already uses for `recallContextMessagesOne`. Rename "kept units" to "kept". 5. **Apply.** - Result: add an apply branch to the Result section (`:912-966`) that uses `savedSkipped`. - Not saved (`:977-994`): render a count key (`skippedChanges` / `skippedChangesOne`) instead of joining the IDs. Keep `noSkippedChanges`. - Fixture: the browser fixture puts `mutationIds` on an `apply_changes` event (`tests/long-term-memory-browser.regression.ts:2592-2595`), which the server never logs. Move it to the `mutations_selected` event so the test uses the real shape. 6. **Details section.** Render `data-ltm-debug-facts` only when it has a memory source, model, provider, duration or count summary. 7. **Recall counts.** Compute `countSummary` (`:836`) from the operation's events without `recall_explanation`; its counts already appear in Result and Run parameters. 8. **Health line.** Remove the `healthLogSize` segment and its comment (`:1298-1300`), and the key. Open PR #1306 edits the next line, so whichever merges second rebases. 9. **Vault link.** `MemoryVault.tsx:4590`: replace `mt-2 block` with `mt-2 inline-flex min-h-11 items-center`. 10. **Strings.** `en.json:205` becomes "The latest recall failed. Open Memory Settings → Debug for details." Delete `activityview.debugActivity` (`:57`) and `activityview.value1Ms` (`:97`). **Regression proof** (`tests/long-term-memory-browser.regression.ts`) - With the pointer moved away, the selected row's computed background differs from an unselected row's, and the active chip's differs from an inactive chip's. axe `color-contrast` reports 0 on the list with a row selected and another row hovered. - No row or timeline step contains "AI extraction: Ok." or "Memory recall: Ok.". The compile row reads "7 of 12 kept", the recall row "1 added · 6 not added", and the apply row "1 saved · 1 skipped". - The compile callout reads "4 candidates failed checks" and not "Compile evidence: Warning.". Result says "1 duplicate", and "7 kept units" is gone. This updates the assertions at `:2665-2667`. - Apply shows "1 change skipped". The ID is not on the page but is in Copy JSON. This replaces the assertion at `:2689`. - The apply operation has no empty "Details" heading, and the recall's "Details" does not contain "1 selected". - The health line has no "Log size". This replaces `:2783`. - The newest-events notice (D08), which has no test today: with 200 events, the notice and "Show up to 1,000" appear, and clicking it requests `limit=1000`. With fewer events, there is no notice. The `debug-log?*` stub already honours `limit`. - The Vault "Open debug log" link is at least 44 px tall. - The existing guarantees stay asserted: token wording, no response snippet on screen, no made-up duration, and no horizontal overflow on desktop and mobile. **Out of scope** - D19: the compact Chat Settings summary still clips "812 tokens" at 320 px. That needs its own issue. - D22 (Korean UI catalog), D30 and `--marinara-editor-warning` (Engine tokens). - Adding the debug-log size to `/status` (a server change). **Release** Client-only. Patch bump to the next free version (#1306 takes 1.4.25) with a CHANGELOG entry; rebuild the package, artifact and catalog entry. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:29:37 +07:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#675
No description provided.