[GH-ISSUE #1584] [Issue]: Long-Term Memory: five keyboard and focus faults block tasks in Sources, Review, Vault and Settings #1557

Closed
opened 2026-10-23 04:03:00 +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/1584

Originally assigned to: @Promansis on GitHub.

Summary

A code audit of the Long-Term Memory screens found five faults that stop a user from finishing a task. Keyboard users cannot open an imported source. Every accepted Review draft hides the whole queue and loses the user's place. Vault dialogs can open invisible on a narrow panel and freeze the screen. The place picker's highlight scrolls out of sight. The backup file input is an invisible Tab stop. Each fix is small and local; they ship together ahead of the audit's other fixes.

Affected package

  • Package: long-term-memory 1.4.84
  • Package type: Agent package (client UI)
  • Area: Sources list rows, Review queue, Vault dialogs, place picker combobox, Maintenance backup restore

Expected behavior

  • Tab reaches each imported source row, and Enter or Space opens it.
  • Accepting a draft keeps the queue, its scroll position and focus in place. A background refresh shows a quiet busy cue at most.
  • At any panel width, the Vault rename and unsaved-changes dialogs are visible when they open.
  • Arrow keys in the place picker keep the highlighted option on screen.
  • Tab after "Choose backup" goes to the next visible control. A screen reader hears "Choose backup" once.

Actual behavior

  • Sources rows open only on a mouse click. Re-extract, Manage, Review and Open memory are out of reach from the keyboard (WCAG 2.1.1).
  • After each accept the queue disappears and reappears, scrolled to the top, with focus lost.
  • Below 48rem with the workbench pane active, the dialog sits inside a hidden pane. showModal() still makes the page inert, so the screen freezes with nothing visible. Rename hits this every time at that width.
  • With more places than fit in the list, the highlight moves out of view and Enter picks an option the user cannot see (WCAG 2.4.11).
  • The hidden file input takes focus with no visible indicator (WCAG 2.4.7), and screen readers announce the button's name twice.

Steps to reproduce

  1. Sources: import a character or chat. Tab through the list: no row can be opened.
  2. Review: with several drafts pending, scroll down and accept one. The queue blanks and returns at the top.
  3. Vault: in a panel narrower than 48rem, open a memory so the workbench shows, then choose Rename. The page stops responding and no dialog shows.
  4. Vault or Sources: open the place picker with more than about 10 places and press Arrow Down repeatedly. The highlight leaves the visible list.
  5. Memory Settings, Maintenance: Tab to "Choose backup", then Tab again. Focus disappears.

Steps 1, 2, 4 and 5 are confirmed in code. Step 3 is confirmed in code and needs one 390px browser capture to confirm the frozen screen.

Minimal fix

One PR, patch bump. C = packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory.

  • Sources rows. In C/sources/SourcesWorkspace.tsx (the row ClickSurface with onClick, around lines 1255-1266), make the row title a real <button> that opens the workbench. Keep ClickSurface (C/shared-controls.tsx) as the pointer and focus-within wrapper.
  • Review accept. In C/review/ReviewQueue.tsx, reviewContextBusy (around lines 355-356) includes notes.isFetching, and accept invalidates queryKeys.notes (around line 1263), which prefixes the review-context key (around line 350). Hide the workspace only on first load (!notes.isSuccess), not during a background refetch (workspaceUnavailable around line 1969, which sets the hidden class around line 2089). Show a quiet busy cue instead.
  • Vault dialogs. In C/vault/MemoryVault.tsx, the unsaved-changes and rename <dialog>s (around lines 2479-2598) render inside the navigator slot, which C/LtmWorkspace.tsx (around line 241) hides when that pane is inactive. Render both dialogs as a sibling of the workspace, outside the panes. showModal (around lines 1243-1268) is unchanged.
  • Place picker. In C/SourceScopeCombobox.tsx, call scrollIntoView({ block: "nearest" }) on the highlighted option whenever moveHighlight (around lines 132-142) changes it. The list is max-h-72 overflow-y-auto (around line 311).
  • Backup input. In C/settings/MaintenancePanel.tsx (around lines 563-573), give the sr-only file input tabIndex={-1} and aria-hidden="true". The visible "Choose backup" button already opens it.
  • CHANGELOG under ## Unreleased: keyboard users can open imported sources; accepting a Review draft keeps your place; Vault dialogs show on narrow panels; the place picker keeps its highlight in view; the backup file input no longer takes an invisible Tab stop.

Not included

  • The audit's P2 and P3 fixes (focus after other actions, results next to actions, container queries, touch targets, re-render costs, warning cue, docs). They follow in one bundled PR.
  • Any change to ClickSurface itself or to other showModal callers.

Regression proof

  • tests/long-term-memory-browser.regression.ts, beside the existing 390x844 cases:
    • Sources: focus a row's title with Tab, press Enter, and expect the workbench for that source.
    • Review: accept one of three drafts and expect the queue to stay visible (never hidden) and the next draft row to be in the document with focus inside the queue.
    • Vault at 390x844 with the workbench active: open Rename and expect the dialog to be open and visible (non-zero bounding box).
    • Place picker with 30 places: press Arrow Down 20 times and expect the highlighted option to sit inside the listbox's visible rectangle.
    • Maintenance: expect the backup file input to have tabIndex -1 and aria-hidden="true".
  • Each case fails on staging and passes with the fix. The Vault case also confirms the frozen-screen fault before the fix.
  • tests/long-term-memory-host-styles.regression.ts stays green.

Environment

  • Marinara Engine version: 2.5.1
  • Package version: long-term-memory 1.4.84 (upstream/staging 9393553b5)
  • Install type: source (code audit)
  • OS + version: any
  • Browser or app shell: any

Additional context

Found by a code-only /impeccable audit of the Long-Term Memory client UI on 2026-10-22 (score 12/20). These are its five P1 findings; it found no P0. The audit read staging a6e2b20ce (1.4.82); every file and line above was re-checked on 9393553b5 (1.4.84), where none of these files has changed.

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/1584 Originally assigned to: @Promansis on GitHub. ## Summary A code audit of the Long-Term Memory screens found five faults that stop a user from finishing a task. Keyboard users cannot open an imported source. Every accepted Review draft hides the whole queue and loses the user's place. Vault dialogs can open invisible on a narrow panel and freeze the screen. The place picker's highlight scrolls out of sight. The backup file input is an invisible Tab stop. Each fix is small and local; they ship together ahead of the audit's other fixes. ## Affected package - Package: `long-term-memory` 1.4.84 - Package type: Agent package (client UI) - Area: Sources list rows, Review queue, Vault dialogs, place picker combobox, Maintenance backup restore ## Expected behavior - Tab reaches each imported source row, and Enter or Space opens it. - Accepting a draft keeps the queue, its scroll position and focus in place. A background refresh shows a quiet busy cue at most. - At any panel width, the Vault rename and unsaved-changes dialogs are visible when they open. - Arrow keys in the place picker keep the highlighted option on screen. - Tab after "Choose backup" goes to the next visible control. A screen reader hears "Choose backup" once. ## Actual behavior - Sources rows open only on a mouse click. Re-extract, Manage, Review and Open memory are out of reach from the keyboard (WCAG 2.1.1). - After each accept the queue disappears and reappears, scrolled to the top, with focus lost. - Below 48rem with the workbench pane active, the dialog sits inside a hidden pane. `showModal()` still makes the page inert, so the screen freezes with nothing visible. Rename hits this every time at that width. - With more places than fit in the list, the highlight moves out of view and Enter picks an option the user cannot see (WCAG 2.4.11). - The hidden file input takes focus with no visible indicator (WCAG 2.4.7), and screen readers announce the button's name twice. ## Steps to reproduce 1. Sources: import a character or chat. Tab through the list: no row can be opened. 2. Review: with several drafts pending, scroll down and accept one. The queue blanks and returns at the top. 3. Vault: in a panel narrower than 48rem, open a memory so the workbench shows, then choose Rename. The page stops responding and no dialog shows. 4. Vault or Sources: open the place picker with more than about 10 places and press Arrow Down repeatedly. The highlight leaves the visible list. 5. Memory Settings, Maintenance: Tab to "Choose backup", then Tab again. Focus disappears. Steps 1, 2, 4 and 5 are confirmed in code. Step 3 is confirmed in code and needs one 390px browser capture to confirm the frozen screen. ## Minimal fix One PR, patch bump. C = `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory`. - **Sources rows.** In `C/sources/SourcesWorkspace.tsx` (the row `ClickSurface` with `onClick`, around lines 1255-1266), make the row title a real `<button>` that opens the workbench. Keep `ClickSurface` (`C/shared-controls.tsx`) as the pointer and focus-within wrapper. - **Review accept.** In `C/review/ReviewQueue.tsx`, `reviewContextBusy` (around lines 355-356) includes `notes.isFetching`, and accept invalidates `queryKeys.notes` (around line 1263), which prefixes the review-context key (around line 350). Hide the workspace only on first load (`!notes.isSuccess`), not during a background refetch (`workspaceUnavailable` around line 1969, which sets the `hidden` class around line 2089). Show a quiet busy cue instead. - **Vault dialogs.** In `C/vault/MemoryVault.tsx`, the unsaved-changes and rename `<dialog>`s (around lines 2479-2598) render inside the navigator slot, which `C/LtmWorkspace.tsx` (around line 241) hides when that pane is inactive. Render both dialogs as a sibling of the workspace, outside the panes. `showModal` (around lines 1243-1268) is unchanged. - **Place picker.** In `C/SourceScopeCombobox.tsx`, call `scrollIntoView({ block: "nearest" })` on the highlighted option whenever `moveHighlight` (around lines 132-142) changes it. The list is `max-h-72 overflow-y-auto` (around line 311). - **Backup input.** In `C/settings/MaintenancePanel.tsx` (around lines 563-573), give the `sr-only` file input `tabIndex={-1}` and `aria-hidden="true"`. The visible "Choose backup" button already opens it. - **CHANGELOG under `## Unreleased`**: keyboard users can open imported sources; accepting a Review draft keeps your place; Vault dialogs show on narrow panels; the place picker keeps its highlight in view; the backup file input no longer takes an invisible Tab stop. **Not included** - The audit's P2 and P3 fixes (focus after other actions, results next to actions, container queries, touch targets, re-render costs, warning cue, docs). They follow in one bundled PR. - Any change to `ClickSurface` itself or to other `showModal` callers. ## Regression proof - `tests/long-term-memory-browser.regression.ts`, beside the existing 390x844 cases: - Sources: focus a row's title with Tab, press Enter, and expect the workbench for that source. - Review: accept one of three drafts and expect the queue to stay visible (never `hidden`) and the next draft row to be in the document with focus inside the queue. - Vault at 390x844 with the workbench active: open Rename and expect the dialog to be open and visible (non-zero bounding box). - Place picker with 30 places: press Arrow Down 20 times and expect the highlighted option to sit inside the listbox's visible rectangle. - Maintenance: expect the backup file input to have `tabIndex` -1 and `aria-hidden="true"`. - Each case fails on `staging` and passes with the fix. The Vault case also confirms the frozen-screen fault before the fix. - `tests/long-term-memory-host-styles.regression.ts` stays green. ## Environment - Marinara Engine version: 2.5.1 - Package version: long-term-memory 1.4.84 (`upstream/staging` 9393553b5) - Install type: source (code audit) - OS + version: any - Browser or app shell: any ## Additional context Found by a code-only `/impeccable audit` of the Long-Term Memory client UI on 2026-10-22 (score 12/20). These are its five P1 findings; it found no P0. The audit read `staging` a6e2b20ce (1.4.82); every file and line above was re-checked on 9393553b5 (1.4.84), where none of these files has changed. ## 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-23 04:03:00 +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#1557
No description provided.