[GH-ISSUE #1374] [Issue]: Long-Term Memory: 58 styles the UI uses are missing in real installs #700

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

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

Originally assigned to: @Promansis on GitHub.

Summary

Long-Term Memory ships no stylesheet. It relies on Tailwind classes that the Engine's own CSS happens to include. Compiling the Engine 2.5.0 stylesheet with and without the LTM client source gives 5,569 vs 5,511 class selectors, so 58 classes LTM uses don't exist in real installs. The package tests compile CSS with the LTM source included, so they show styling that users never get.

Affected package

long-term-memory 1.4.31:

  • tests/engine-visual-styles.ts:14-17: @source points at the package client source, so tests see classes the host doesn't serve
  • scripts/build-feature-packages.mjs:1650-1656: LTM gets no package stylesheet; only Noodle and Slurp2 call buildPackageStyles (:924-972)
  • client files under packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/

Expected behavior

  1. Every class LTM uses is served by the Engine stylesheet, and a test fails when one isn't.
  2. Checkboxes are one size across Vault, Sources and Review.
  3. Tab focus rings use the editor focus colour.
  4. Single-choice place lists are announced as single-choice, not as checkboxes.

Actual behavior

Missing classes, all still in source, include:

  • [&>:not([data-ltm-source-operation-workbench])]:hidden and the task-result variant (SourcesWorkspace.tsx:2786-2790). In a host-CSS probe at 1.4.9, Sources → Manage source showed the imported-source inspector ("Not Found / Refresh preview") underneath the workbench.
  • size-6 (SourcesWorkspace.tsx:894): Sources checkboxes fall back to native size (about 13px). Review uses h-3.5 w-3.5 (14px, ReviewQueue.tsx:761) and the Vault uses native size.
  • focus-visible:ring-[var(--marinara-editor-focus-ring)] and focus-visible:outline-[var(--marinara-editor-focus-ring)]: focus rings on the 9 tab rails fall back to currentColor.
  • text-[var(--marinara-editor-warning)], border-[var(--marinara-editor-warning)]/40 and /45 (status tones, shared-controls.tsx:324-327, ReviewQueue.tsx:141).
  • md:static md:z-auto md:border-0 md:bg-transparent md:p-0 md:shadow-none (sticky action bars, ReviewQueue.tsx:3472, SourcesWorkspace.tsx:896).
  • inline-grid (shared-controls.tsx:186), m-4 (client-entry.tsx:52), max-md:pb-24 (LongTermMemoryDetail.tsx:831), md:grid-cols-[12rem_1fr] (ExtractionPromptTemplates.tsx:217), !h-11 !w-11 !min-w-11, min-h-[2.75rem], and popover sizing w-[min(26rem,…)] / max-h-[min(20rem,…)].

Also, single-select place options use role="checkbox" (MemoryVault.tsx:344, :469).

Workarounds have built up: 9 inline <style> blocks totalling 457 lines.

Steps to reproduce

  1. Compile the Engine 2.5.0 client stylesheet as shipped.
  2. Compile it again with the LTM client source added as an @source.
  3. Diff the class selectors: 58 appear only in the second build.
  4. In an install (not the test harness), open Sources → Manage source on an imported source: the inspector shows under the workbench. Observed at 1.4.9; the classes involved are unchanged.

Environment

  • Marinara Engine version: 2.5.0 (also measured on 2.4.6)
  • Package version: long-term-memory 1.4.31 (upstream/staging 39a5c5cfb; LTM files unchanged since cdb583a95)
  • Install type: source (stylesheet compile-and-diff plus the package's browser regression harness)
  • OS + version: not platform-specific
  • Browser or app shell: any

Logs, screenshots, or video

The 1.4.9 host-CSS probe (Engine stylesheet compiled without the package source) changed 6 of 13 browser-test screenshots.

Minimal fix

  1. Add a guard test that compiles the Engine stylesheet with and without the LTM client source (the same @source switch tests/engine-visual-styles.ts already uses) and fails when the second build has any selector the first lacks.
  2. Replace each of the 58 classes with one the host already serves, or an existing mari-* component class. Where neither exists, write a plain CSS rule in the screen's existing inline <style> block (add one only if the screen has none). For example, [&>:not([data-ltm-source-operation-workbench])]:hidden hides every direct child of its container except the workbench; it becomes <container> > :not([data-ltm-source-operation-workbench]) { display: none; }.
  3. Give the Review, Sources and Vault checkboxes one host-served size class. Update the feedback-clarity-ui assertion that expects size-6 (tests/long-term-memory-feedback-clarity-ui.regression.mjs:634).
  4. In the Vault single-select place lists (MemoryVault.tsx:344, :469), change role="checkbox" to role="radio" inside a role="radiogroup"; aria-checked stays as is.

No behaviour change beyond the styling and the role.

Additional context

Alternatives considered: building an LTM stylesheet with buildPackageStyles (self-contained, but Noodle's embedded CSS was about 910 KB, which would roughly double client.js), or adding LTM classes to the Engine safelist (ties LTM styling to Engine releases).

engine.min is 2.4.1. Only 2.4.6 and 2.5.0 were measured; older Engines probably miss more.

After #1373, so the browser test covers the change.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Oct 14, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1374 Originally assigned to: @Promansis on GitHub. ## Summary Long-Term Memory ships no stylesheet. It relies on Tailwind classes that the Engine's own CSS happens to include. Compiling the Engine 2.5.0 stylesheet with and without the LTM client source gives 5,569 vs 5,511 class selectors, so 58 classes LTM uses don't exist in real installs. The package tests compile CSS with the LTM source included, so they show styling that users never get. ## Affected package `long-term-memory` 1.4.31: - `tests/engine-visual-styles.ts:14-17`: `@source` points at the package client source, so tests see classes the host doesn't serve - `scripts/build-feature-packages.mjs:1650-1656`: LTM gets no package stylesheet; only Noodle and Slurp2 call `buildPackageStyles` (`:924-972`) - client files under `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/` ## Expected behavior 1. Every class LTM uses is served by the Engine stylesheet, and a test fails when one isn't. 2. Checkboxes are one size across Vault, Sources and Review. 3. Tab focus rings use the editor focus colour. 4. Single-choice place lists are announced as single-choice, not as checkboxes. ## Actual behavior Missing classes, all still in source, include: - `[&>:not([data-ltm-source-operation-workbench])]:hidden` and the task-result variant (`SourcesWorkspace.tsx:2786-2790`). In a host-CSS probe at 1.4.9, Sources → Manage source showed the imported-source inspector ("Not Found / Refresh preview") underneath the workbench. - `size-6` (`SourcesWorkspace.tsx:894`): Sources checkboxes fall back to native size (about 13px). Review uses `h-3.5 w-3.5` (14px, `ReviewQueue.tsx:761`) and the Vault uses native size. - `focus-visible:ring-[var(--marinara-editor-focus-ring)]` and `focus-visible:outline-[var(--marinara-editor-focus-ring)]`: focus rings on the 9 tab rails fall back to `currentColor`. - `text-[var(--marinara-editor-warning)]`, `border-[var(--marinara-editor-warning)]/40` and `/45` (status tones, `shared-controls.tsx:324-327`, `ReviewQueue.tsx:141`). - `md:static md:z-auto md:border-0 md:bg-transparent md:p-0 md:shadow-none` (sticky action bars, `ReviewQueue.tsx:3472`, `SourcesWorkspace.tsx:896`). - `inline-grid` (`shared-controls.tsx:186`), `m-4` (`client-entry.tsx:52`), `max-md:pb-24` (`LongTermMemoryDetail.tsx:831`), `md:grid-cols-[12rem_1fr]` (`ExtractionPromptTemplates.tsx:217`), `!h-11 !w-11 !min-w-11`, `min-h-[2.75rem]`, and popover sizing `w-[min(26rem,…)]` / `max-h-[min(20rem,…)]`. Also, single-select place options use `role="checkbox"` (`MemoryVault.tsx:344`, `:469`). Workarounds have built up: 9 inline `<style>` blocks totalling 457 lines. ## Steps to reproduce 1. Compile the Engine 2.5.0 client stylesheet as shipped. 2. Compile it again with the LTM client source added as an `@source`. 3. Diff the class selectors: 58 appear only in the second build. 4. In an install (not the test harness), open Sources → Manage source on an imported source: the inspector shows under the workbench. Observed at 1.4.9; the classes involved are unchanged. ## Environment - Marinara Engine version: 2.5.0 (also measured on 2.4.6) - Package version: long-term-memory 1.4.31 (`upstream/staging` 39a5c5cfb; LTM files unchanged since cdb583a95) - Install type: source (stylesheet compile-and-diff plus the package's browser regression harness) - OS + version: not platform-specific - Browser or app shell: any ## Logs, screenshots, or video The 1.4.9 host-CSS probe (Engine stylesheet compiled without the package source) changed 6 of 13 browser-test screenshots. ## Minimal fix 1. Add a guard test that compiles the Engine stylesheet with and without the LTM client source (the same `@source` switch `tests/engine-visual-styles.ts` already uses) and fails when the second build has any selector the first lacks. 2. Replace each of the 58 classes with one the host already serves, or an existing `mari-*` component class. Where neither exists, write a plain CSS rule in the screen's existing inline `<style>` block (add one only if the screen has none). For example, `[&>:not([data-ltm-source-operation-workbench])]:hidden` hides every direct child of its container except the workbench; it becomes `<container> > :not([data-ltm-source-operation-workbench]) { display: none; }`. 3. Give the Review, Sources and Vault checkboxes one host-served size class. Update the `feedback-clarity-ui` assertion that expects `size-6` (`tests/long-term-memory-feedback-clarity-ui.regression.mjs:634`). 4. In the Vault single-select place lists (`MemoryVault.tsx:344`, `:469`), change `role="checkbox"` to `role="radio"` inside a `role="radiogroup"`; `aria-checked` stays as is. No behaviour change beyond the styling and the role. ## Additional context Alternatives considered: building an LTM stylesheet with `buildPackageStyles` (self-contained, but Noodle's embedded CSS was about 910 KB, which would roughly double `client.js`), or adding LTM classes to the Engine safelist (ties LTM styling to Engine releases). `engine.min` is 2.4.1. Only 2.4.6 and 2.5.0 were measured; older Engines probably miss more. After #1373, so the browser test covers the change. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:29:52 +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#700
No description provided.