mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 20:58:37 +07:00
[GH-ISSUE #1322] [Issue]: Long-Term Memory Debug: finish the agreed two-pane details (row times, result counts, recall rows, timeline) #674
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#674
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Promansis on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1322
Originally assigned to: @Promansis on GitHub.
Summary
The two-pane Debug layout agreed in the Debug audit shipped across 1.4.14–1.4.20, but the details pane only partly follows the agreed design:
All the data is already logged, so this is client-only.
Affected package
long-term-memory1.4.24: Memory Settings → Debug (event list and details pane).Expected behavior
This is the agreed design, minus the parts changed after it (see Additional context).
Row time. Each row shows how long ago its operation last logged an event, for example "4 min ago", on the right of the row.
Result as counts. Result shows each count as a large number with a label, in order:
Recall candidates. Added and Not added are flat rows separated by dividers, with no box around each candidate.
A recall that added nothing explains itself in a neutral callout:
Recall settings used. A labelled grid where every term is a whole label: "Memory limit 8", "Token limit 2,048", "Minimum relevance 50%", "Tokens used 42", "Messages read 3", "Ranking weights Semantic 0.6 · Lexical 0.2", and so on.
What happened reads as steps, one sentence each, taken from the logged counts:
Each step shows its offset from the start ("+72 s") and its status word. Errors and warnings keep their message under the step.
Times and durations. The header reads "4:12 PM · 16 min ago · took 74 s". Durations under a second stay "N ms". Longer ones read in seconds ("12.1 s", "74 s"), and over a minute "1 min 14 s".
Copy JSON note. One line under the details: "Copy JSON copies the 5 log records for this operation." When a record carries a response snippet, it adds "It includes the model's reply excerpt, which isn't shown here."
Actual behavior
Paths are under
packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/. Line numbers are atstaginga6cefea4.Rows show the action, subject and a summary, but no time (
ActivityView.tsx:1436-1462). Only the Today / Earlier group headings place them in time.Result is one line of text (
:912-966): "12 candidates · 7 kept units · 2 changes · 2 target memories · 1 duplicates".:1047-1059).Each candidate is a filled box (
rounded bg-[var(--background)] px-2 py-1,:705) inside the details panel. Those are boxes inside a box, which the two-pane design set out to remove.A recall with nothing added shows the Result counts and the Not added list (
:995-1013), with nothing that says why.Run parameters are fragments joined in JSX (
:1014-1108): "Limits: 8 chunks · 2,048 tokens", "Used: 42 tokens", "Weights: Semantic weight 0.6". The keyslimits("Limits:"),chunks("chunks ·"),used("Used:") andweights("Weights:") can't be translated as sentences (part of D22).The timeline (
:1141-1178) lists one entry per log record, each with:describeEventsentence;Steps don't say what was done, and a reader has to subtract timestamps to see how long a step took.
The header shows
toLocaleString(:875), for example "7/30/2026, 12:00:00 AM". Every duration uses thedurationMskey (:1130-1136,:1168-1172), so a 74-second extraction reads "74,000 ms".Copy JSON is the only hint (
:876-886) that more is recorded than is shown.Steps to reproduce
tests/long-term-memory-browser.regression.tsare enough.recall-rejectedfixture): there is no explanation.Environment
c0ce4d8, the package's minimum)staging@a6cefea4).Logs, screenshots, or video
Screenshot attached: the recall details at 1.4.20, showing the boxed candidates, the Run parameters fragments and the timeline. It contains fixture data only. The design mockup (static HTML, sample data) is available on request.
Additional context
Companion to #ISSUE_1 (selected row, row outcome text, the "1 duplicates" plural and smaller fixes). Land that one first: both touch the row and Result markup. Follow-up to #1275.
Decisions taken after the design that stay as shipped
/statusevents.bytes, but that is the memory event log (dirs.eventLog,routes.ts:494-498), not the debug log.Minimal fixes (paths as above)
formatAge(ts, locale, now)todebug-activity.ts, using the nativeIntl.RelativeTimeFormat(locale, { numeric: "always", style: "short" })with seconds, minutes, hours and days.<time dateTime={lastEvent.ts}>as the row's last child (:1436-1462), withshrink-0 whitespace-nowrap text-[0.6875rem].ponytail:comment notes there is no ticking timer.<ol className="flex flex-wrap items-center gap-x-3 gap-y-1">, where each<li>holds<span className="block text-lg font-semibold tabular-nums">plus a muted label, with anaria-hiddenarrow between items.counts.totalCandidates,unitsandmutations. Recall usesdetails.indexedChunks,details.eligibleChunksandcounts.selected. Apply usesmutationIds.lengthplusdetails.skippedMutationIds.lengthfrommutations_selected(reconciliation.ts:826-838).selectLtmPluralForm. Missing numbers show "Not recorded", as today.recallIndexSummaryfrom Run parameters; the index load outcome stays there as its own term.renderRecallCandidates,:695-738).<ul className="divide-y divide-[var(--border)]">, with each<li className="grid gap-1 py-2">. Line one holds the name link (it stays 44 px), the section, the bar, the percentage and the fused rank. Line two holds the reason.aria-hiddenh-1.5 w-14 rounded-full bg-[var(--border)]track, a fill atscore × 100%, and a 2 px tick atscoreThreshold × 100%. The percentage stays as text, so nothing depends on the bar.recallReasonTokenLimit, "Didn't fit the {{tokens}}-token limit" (frommaxTokens), andrecallReasonMemoryLimit, "Ranked below the {{count}}-memory limit" (frommaxChunks). Keep the current keys when the limit isn't recorded.selectedas an empty array, orcounts.selectedis 0, renderStatusSurface tone="neutral"above Result. A malformedselected, like thenodurationfixture's, shows no callout. The callout has:recallNothingBelowMinimum, "No memory reached the {{threshold}} minimum relevance.", when every rejected candidate'srejectionReasonisscore_thresholdandscoreThresholdis recorded;recallNothingAdded, "No memory was added to this reply.";tryRecallNothingAddedafter "What to try".:1014-1108) with<dl className="grid gap-x-6 gap-y-2 sm:grid-cols-2">ofdt/ddpairs under the heading "Recall settings used".limits,chunks,used,weightsandthresholdonce unused.tokensstays, becauseLastInjectionSummary.tsx:90,140uses it.:1141-1178).stepText(event)next todescribeEvent:evidence_unit_request: "Sent to the model", with the existing estimated-input line under it;evidence_unit_response: "Model replied after {{duration}}", or "Model replied" without a duration. A truncated reply keeps the existingoutputTruncatedtext under it;evidence_units_compiled: "Kept {{kept}} of {{candidates}} candidates";draft_deferred: "Prepared the changes for review";mutations_selected: "Selected {{saved}} of {{total}} changes";apply_draft: "Saved the changes";recall_explanation: "Ranked {{eligible}} usable sections and added {{selected}}";actionLabel(event.action).describeEvent(event)under the step.+{{duration}}from the operation's first event in a narrow left column, with the full timestamp on a<time dateTime title>.tests/long-term-memory-browser.regression.ts:2791-2793.formatDuration(ms, locale)todebug-activity.ts:durationMskey, so the "500 ms" assertions at:2638,:2742,:2936and:3033hold;durationSecondskey, "{{value}} s", with one decimal under 10 s and none above;durationMinutes, "{{minutes}} min {{seconds}} s".:1130-1136, at:1168-1172and for the step offsets.:875):<time dateTime={lastEvent.ts} title={full}>showing the time for today, or the date and time otherwise, then "· {age}" fromformatAge, then "· took {duration}" whenlastEvent.durationMsis recorded.copyJsonNote/copyJsonNoteOne, "Copy JSON copies the {{count}} log records for this operation.", pluscopyJsonNoteExcerptwhen any event has a stringdetails.responseSnippet.Regression proof
tests/long-term-memory-debug-activity.regression.ts:formatDurationat 0, 999, 1,000, 9,999, 10,000, 59,999 and 60,000 ms, andformatAgeat second, minute, hour and day boundaries with a fixednow.tsand phasellm(:2401-2410); give theestimatedoperation's events distinct timestamps so offsets can be asserted;recall-rejectedwithscoreThreshold: 0.5for the threshold callout, and update the chip-count assertions it changes.<time>whosedatetimeequals its operation's last eventts;<li>elements have a transparent computed background. "Fused rank 2" and "45%" are still shown (D15,:2761-2762), and the memory-limit reason reads "Ranked below the 8-memory limit";recall-rejected(no threshold recorded) shows "No memory was added to this reply." and What to try. Its copy with a threshold shows "No memory reached the 50% minimum relevance.", andnodurationshows no callout;dt"Minimum relevance" withdd"50%" (:2751), and "Not recorded" fornoduration(:2707). No "Limits:", "chunks ·", "Used:" or "Weights:" anywhere on the page;nodurationshows no duration in ms or s (extends:2704);Out of scope
--marinara-editor-warningtoken (D14, D30)./statusto report the debug log's size and its 2 MB cap (a server change).Release
Client-only. Patch bump after the companion issue's release, 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: