[GH-ISSUE #1588] [Issue]: Long-Term Memory UI audit follow-ups: focus, results, narrow panels, speed, warnings and docs #1558

Closed
opened 2026-10-23 04:03:02 +07:00 by bsakaguchi · 0 comments
Owner

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

Originally assigned to: @Promansis on GitHub.

Summary

The 2026-10-22 code audit of the Long-Term Memory screens found eight patterns of smaller faults, after the five blockers that shipped first in #1584 (PR #1587, 1.4.85). They touch the same few screen files, so separate PRs would conflict with each other and each add a release and a zip. They ship together: one branch and one pull request, one commit per item.

One branch and one pull request for these related changes. Each item is implemented, tested and reviewed on its own before it is committed.

  1. Return focus after actions and tie errors to their fields
  2. Show results next to the action that made them
  3. Fit narrow panels and fingers
  4. Stop whole-screen re-renders on hover and typing
  5. Give warnings a cue beyond color
  6. Bring the design docs up to date and fix one off-scale label
  7. Final polish pass

Affected package

  • Package: long-term-memory 1.4.85
  • Package type: Agent package (client UI and its design docs)
  • Area: Review Queue, Memory Vault, Sources, onboarding, Memory Settings (Maintenance, Debug), the place pickers, shared controls, DESIGN.md and docs/UI.md

Expected behavior

  1. After an action, focus moves to the next sensible control. A validation error is tied to its field and shows in the same pane.
  2. A result shows next to the action that made it. Progress is announced politely, and only danger uses an alert.
  3. The workspace follows its panel's width, not the window's. Batch bars stay in view, and touch targets are at least 2.75rem.
  4. Hovering and typing don't re-render a whole screen.
  5. A warning has a cue beyond color.
  6. The design docs match the code, and every label size is on the type scale.
  7. The touched screens are consistent in alignment, spacing, focus rings and copy.

Actual behavior

  1. Focus is dropped after accept and skip (Review), archive, delete, pill removal and rename close (Vault), Manage source (Sources), onboarding steps and close, Save and Discard, and "Show up to 1,000 events" (Settings). Errors carry no aria-describedby or aria-invalid; some render behind a modal or in another pane. Sources posts one role="alert" per failure.
  2. The Reindex result appears only inside a closed info popover. The Review batch result lumps skipped with failed, and ticking a checkbox erases it. Sources task completion is not announced, and a failed batch says "complete". Maintenance results show at the top of the panel, away from their buttons. Disabled Accept and import give no visible reason.
  3. sm:/md: classes and @media (min-width: 48rem) follow the window, so a narrow docked panel on a wide window keeps the wide layout. The Review and Sources batch bars scroll away. 100vh - 12rem caps in Vault and Sources break at zoom and on landscape phones. <summary> toggles, checkboxes and their labels, text-style buttons and the Back button are under 2.75rem.
  4. The Debug list keeps hover in React state and builds a time formatter per row, for up to 1,000 rows. Review's per-row work grows with rows × all rows. Sources search sends a request per keystroke. Pickers filter every target with no cap.
  5. StatusSurface's warning tone has no styling, and no Engine defines a warning color, so warnings look like plain notes.
  6. DESIGN.md lacks the Micro-label size, names a nonexistent editor-warning token and a stale rule. docs/UI.md still describes lazy-loaded destinations, an onboarding Close that suspends, and a "retention" settings group. One activation label uses 0.8125rem, off the type scale.

Steps to reproduce

Found by reading the code; details and line references are in the audit report. Two examples:

  1. Memory Settings, Maintenance: run Reindex. The result is only visible after opening the info popover.
  2. Debug: load 1,000 events and move the pointer over the rows. Each row hover re-renders the whole list.

Each item adds a browser regression case where its behavior changes.

Minimal fix

One PR, patch bump. One commit per item with a Bundle-Item: <n> trailer; the changelog is written once at the end. F = packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory.

  1. Focus and field errors. Copy ActivityView's toolbar pattern (aria-disabled plus a ref guard, focus restored in finally) to the actions listed above. Tie errors to fields with aria-describedby and aria-invalid, in the field's pane. One polite summary replaces Sources' per-failure alerts. Files: F/review/ReviewQueue.tsx, F/vault/MemoryVault.tsx, F/sources/SourcesWorkspace.tsx, F/LtmWorkspace.tsx (onboarding), F/settings/ActivityView.tsx, settings panels.
  2. Results beside actions. Reindex result beside Reindex; keep the Review batch result until the next batch and split skipped from failed; announce Sources task completion and never call a failed batch "complete"; Maintenance results under their buttons; a visible reason on disabled Accept and import; a labelled status instead of the raw value; an exit from Manage source. role="status" for progress, role="alert" only for danger. Files: LongTermMemoryDetail.tsx, ReviewQueue.tsx, SourcesWorkspace.tsx, MaintenancePanel.tsx.
  3. Narrow panels and fingers. Container queries instead of viewport breakpoints inside the workspace (the container contract in docs/UI.md); batch bars stay in view; drop the 100vh - 12rem caps; 2.75rem targets. Files: ReviewQueue.tsx, SourcesWorkspace.tsx, MemoryVault.tsx, LtmWorkspace.tsx, shared-controls.tsx.
  4. Re-renders. Debug row hover in CSS and one shared Intl.RelativeTimeFormat; debounce Sources search and keep the previous results while it loads; memoize Review's per-row work; cap picker lists. Measure first: split a screen only above about 100 ms per keystroke. Vault is already fine. Files: ActivityView.tsx, SourcesWorkspace.tsx, ReviewQueue.tsx, picker components.
  5. Warning cue. An icon and a border from existing tokens inside StatusSurface's warning tone, modelled on the two shell health banners, so every warning picks it up. Files: shared-controls.tsx and any call site that fakes its own warning look.
  6. Docs and one label. F/DESIGN.md: add Micro-label and the compact ChatSettings sizes, describe item 5's warning treatment, remove editor-warning and the stale rule. packages/long-term-memory/docs/UI.md: no lazy loading, onboarding Close records complete, settings rail Recall, Extraction, Maintenance, Debug. Snap the 0.8125rem activation label in LongTermMemoryDetail.tsx to the scale.
  7. Polish. One pass over the surfaces items 1-6 touched; small fixes only, bigger ones listed for a later critique.

Every item keeps the host-styles guard green, adds no raw colors, and puts every new string in all locales.

Not included: the five blockers (shipped in #1584); a new warning color token or Engine changes; screen splits under the 100 ms threshold; raising the ChatSettings sizes; the 1.5.0 transcript release.

Environment

  • Marinara Engine version: any supported (engine.min 2.4.1)
  • Package version: 1.4.85
  • Install type: source
  • OS + version: not applicable (code audit)
  • Browser or app shell: not applicable (code audit)

Logs, screenshots, or video

None; the audit was code-only. Each item's regression case records the behavior.

Additional context

  • Blockers first: #1584, merged to staging in PR #1587 as 1.4.85.
  • Audit health score 12/20 (accessibility 2, performance 2, responsive 2, theming 3, integrity 3).

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 22, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1588 Originally assigned to: @Promansis on GitHub. ## Summary The 2026-10-22 code audit of the Long-Term Memory screens found eight patterns of smaller faults, after the five blockers that shipped first in #1584 (PR #1587, 1.4.85). They touch the same few screen files, so separate PRs would conflict with each other and each add a release and a zip. They ship together: one branch and one pull request, one commit per item. One branch and one pull request for these related changes. Each item is implemented, tested and reviewed on its own before it is committed. 1. Return focus after actions and tie errors to their fields 2. Show results next to the action that made them 3. Fit narrow panels and fingers 4. Stop whole-screen re-renders on hover and typing 5. Give warnings a cue beyond color 6. Bring the design docs up to date and fix one off-scale label 7. Final polish pass ## Affected package - Package: `long-term-memory` 1.4.85 - Package type: Agent package (client UI and its design docs) - Area: Review Queue, Memory Vault, Sources, onboarding, Memory Settings (Maintenance, Debug), the place pickers, shared controls, `DESIGN.md` and `docs/UI.md` ## Expected behavior 1. After an action, focus moves to the next sensible control. A validation error is tied to its field and shows in the same pane. 2. A result shows next to the action that made it. Progress is announced politely, and only danger uses an alert. 3. The workspace follows its panel's width, not the window's. Batch bars stay in view, and touch targets are at least 2.75rem. 4. Hovering and typing don't re-render a whole screen. 5. A warning has a cue beyond color. 6. The design docs match the code, and every label size is on the type scale. 7. The touched screens are consistent in alignment, spacing, focus rings and copy. ## Actual behavior 1. Focus is dropped after accept and skip (Review), archive, delete, pill removal and rename close (Vault), Manage source (Sources), onboarding steps and close, Save and Discard, and "Show up to 1,000 events" (Settings). Errors carry no `aria-describedby` or `aria-invalid`; some render behind a modal or in another pane. Sources posts one `role="alert"` per failure. 2. The Reindex result appears only inside a closed info popover. The Review batch result lumps skipped with failed, and ticking a checkbox erases it. Sources task completion is not announced, and a failed batch says "complete". Maintenance results show at the top of the panel, away from their buttons. Disabled Accept and import give no visible reason. 3. `sm:`/`md:` classes and `@media (min-width: 48rem)` follow the window, so a narrow docked panel on a wide window keeps the wide layout. The Review and Sources batch bars scroll away. `100vh - 12rem` caps in Vault and Sources break at zoom and on landscape phones. `<summary>` toggles, checkboxes and their labels, text-style buttons and the Back button are under 2.75rem. 4. The Debug list keeps hover in React state and builds a time formatter per row, for up to 1,000 rows. Review's per-row work grows with rows × all rows. Sources search sends a request per keystroke. Pickers filter every target with no cap. 5. StatusSurface's `warning` tone has no styling, and no Engine defines a warning color, so warnings look like plain notes. 6. `DESIGN.md` lacks the Micro-label size, names a nonexistent `editor-warning` token and a stale rule. `docs/UI.md` still describes lazy-loaded destinations, an onboarding Close that suspends, and a "retention" settings group. One activation label uses 0.8125rem, off the type scale. ## Steps to reproduce Found by reading the code; details and line references are in the audit report. Two examples: 1. Memory Settings, Maintenance: run Reindex. The result is only visible after opening the info popover. 2. Debug: load 1,000 events and move the pointer over the rows. Each row hover re-renders the whole list. Each item adds a browser regression case where its behavior changes. ## Minimal fix One PR, patch bump. One commit per item with a `Bundle-Item: <n>` trailer; the changelog is written once at the end. F = `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory`. 1. **Focus and field errors.** Copy ActivityView's toolbar pattern (`aria-disabled` plus a ref guard, focus restored in `finally`) to the actions listed above. Tie errors to fields with `aria-describedby` and `aria-invalid`, in the field's pane. One polite summary replaces Sources' per-failure alerts. Files: `F/review/ReviewQueue.tsx`, `F/vault/MemoryVault.tsx`, `F/sources/SourcesWorkspace.tsx`, `F/LtmWorkspace.tsx` (onboarding), `F/settings/ActivityView.tsx`, settings panels. 2. **Results beside actions.** Reindex result beside Reindex; keep the Review batch result until the next batch and split skipped from failed; announce Sources task completion and never call a failed batch "complete"; Maintenance results under their buttons; a visible reason on disabled Accept and import; a labelled status instead of the raw value; an exit from Manage source. `role="status"` for progress, `role="alert"` only for danger. Files: `LongTermMemoryDetail.tsx`, `ReviewQueue.tsx`, `SourcesWorkspace.tsx`, `MaintenancePanel.tsx`. 3. **Narrow panels and fingers.** Container queries instead of viewport breakpoints inside the workspace (the container contract in `docs/UI.md`); batch bars stay in view; drop the `100vh - 12rem` caps; 2.75rem targets. Files: `ReviewQueue.tsx`, `SourcesWorkspace.tsx`, `MemoryVault.tsx`, `LtmWorkspace.tsx`, `shared-controls.tsx`. 4. **Re-renders.** Debug row hover in CSS and one shared `Intl.RelativeTimeFormat`; debounce Sources search and keep the previous results while it loads; memoize Review's per-row work; cap picker lists. Measure first: split a screen only above about 100 ms per keystroke. Vault is already fine. Files: `ActivityView.tsx`, `SourcesWorkspace.tsx`, `ReviewQueue.tsx`, picker components. 5. **Warning cue.** An icon and a border from existing tokens inside StatusSurface's `warning` tone, modelled on the two shell health banners, so every warning picks it up. Files: `shared-controls.tsx` and any call site that fakes its own warning look. 6. **Docs and one label.** `F/DESIGN.md`: add Micro-label and the compact ChatSettings sizes, describe item 5's warning treatment, remove `editor-warning` and the stale rule. `packages/long-term-memory/docs/UI.md`: no lazy loading, onboarding Close records complete, settings rail Recall, Extraction, Maintenance, Debug. Snap the 0.8125rem activation label in `LongTermMemoryDetail.tsx` to the scale. 7. **Polish.** One pass over the surfaces items 1-6 touched; small fixes only, bigger ones listed for a later critique. Every item keeps the host-styles guard green, adds no raw colors, and puts every new string in all locales. **Not included:** the five blockers (shipped in #1584); a new warning color token or Engine changes; screen splits under the 100 ms threshold; raising the ChatSettings sizes; the 1.5.0 transcript release. ## Environment - Marinara Engine version: any supported (`engine.min` 2.4.1) - Package version: 1.4.85 - Install type: source - OS + version: not applicable (code audit) - Browser or app shell: not applicable (code audit) ## Logs, screenshots, or video None; the audit was code-only. Each item's regression case records the behavior. ## Additional context - Blockers first: #1584, merged to staging in PR #1587 as 1.4.85. - Audit health score 12/20 (accessibility 2, performance 2, responsive 2, theming 3, integrity 3). ## 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-24 04:02:12 +07:00
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#1558
No description provided.