[GH-ISSUE #1376] [Issue]: Long-Term Memory: move the client's largest screens into per-screen folders #703

Closed
opened 2026-10-20 17:29:54 +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/1376

Originally assigned to: @Promansis on GitHub.

Summary

Three Long-Term Memory screens are single files of 3,600 to 4,700 lines, and each already contains separate components defined inline. Moving those into per-screen folders, without changing behaviour, makes each later change and review smaller. Two small parts of the shell and Settings screens also move into their own files.

Affected package

long-term-memory 1.4.31, under packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/:

  • MemoryVault.tsx 4,666 lines
  • SourcesWorkspace.tsx 4,072
  • ReviewQueue.tsx 3,631
  • ActivityView.tsx 1,938
  • MemorySettings.tsx 1,736
  • LongTermMemoryDetail.tsx 1,632

Expected behavior

Each screen lives in its own folder, and shared modules stay at the root. Two different components no longer share the name ScopeTargetPicker.

Actual behavior

Each large screen is one component that holds 25 to 38 state values (Vault 38, Review 26, Sources 25), with already-separate components defined inline in the same file. Two different components are both named ScopeTargetPicker (MemoryVault.tsx:210, SourcesWorkspace.tsx:112).

Steps to reproduce

  1. Count lines in the files listed above.
  2. Search the feature folder for function ScopeTargetPicker: there are two definitions.

Environment

  • Marinara Engine version: 2.5.0 line (staging)
  • Package version: long-term-memory 1.4.31 (upstream/staging 39a5c5cfb; LTM files unchanged since cdb583a95)
  • Install type: source (code audit)
  • OS + version: not platform-specific
  • Browser or app shell: any

Logs, screenshots, or video

Not applicable; line numbers are at cdb583a95 and will shift once #1374 and #1375 land.

Minimal fix

Pure moves (git mv plus cutting inline components into sibling files, updating imports and the test path map from #1373). No logic changes.

  • vault/: MemoryVault.tsx; VaultScopePicker (the Vault ScopeTargetPicker, renamed); MemoryAvailabilityWorkbench; BulkAvailabilityWorkbench; Pill; TargetPicker.tsx; detail-name.ts; and the types they use (MemoryVault.tsx:157-176).
  • sources/: SourcesWorkspace.tsx; SourceScopeCombobox (the Sources ScopeTargetPicker, renamed); DestinationScopePanel; EntrySelect; SourceOperationWorkbench; ImportedSourceInspector.
  • review/: ReviewQueue.tsx; review-state.ts (the pure row-building, persistence and fingerprint helpers, about 600 lines, :394-588 and nearby); MutationEditor; ExtractionDetails; AmbiguousLinkChoice and its small siblings; SubjectIdentityReview.tsx; review-queue-ambiguous-link.ts.
  • settings/: MemorySettings.tsx, ExtractionPromptTemplates.tsx, ActivityView.tsx, debug-activity.ts.
  • Stay at the root: api.ts, types.ts, shared-controls.tsx, LtmWorkspace.tsx, LastInjectionSummary.tsx, client-entry.tsx, LongTermMemoryDetail.tsx, LongTermMemoryNavigation.tsx, ChatSettings.tsx, localization.tsx, display-labels.ts, scope-targets.ts, source-task.ts, recall-style.ts, locales/.
  • Update the lazy import path for MemoryVault (LongTermMemoryDetail.tsx:94-99).

Two small extractions, which move a little state with them (review these as behaviour changes):

  • Onboarding.tsx beside LongTermMemoryDetail.tsx: the setup guide (onboardingSteps at :35-93, JSX at about :937-1572, including the 88-line <style> at :940). Its three state values (open, step, source) move with it, and the header help button opens it through an onOpen prop.
  • settings/MaintenancePanel.tsx: the Maintenance tab (MemorySettings.tsx:1387-1696) with its seven state values, plus its own busy and message state.

Validation per PR: npm run check, node scripts/typecheck-packages.mjs long-term-memory, rebuild LTM, node scripts/validate-catalog.mjs, node tests/long-term-memory-feedback-clarity-ui.regression.mjs, node tests/long-term-memory-loading.regression.mjs, and the LTM browser test.

Additional context

  • Depends on #1373: the source-text tests read 15 fixed paths, and behaviour tests import api.ts, detail-name.ts, display-labels.ts, review-queue-ambiguous-link.ts, source-task.ts and debug-activity.ts by path. With the path map, each move changes one line in the tests.
  • The build needs no change: only client-entry.tsx is referenced, and directories are copied recursively.
  • Every PR here changes client.js and ships as a patch bump, so batch the moves: one PR, or one per folder.
  • Out of scope: changing which component owns which state (deferred until typing in a large Vault has been timed), merging the place pickers (a separate issue after this one), and renaming locale keys.

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/1376 Originally assigned to: @Promansis on GitHub. ## Summary Three Long-Term Memory screens are single files of 3,600 to 4,700 lines, and each already contains separate components defined inline. Moving those into per-screen folders, without changing behaviour, makes each later change and review smaller. Two small parts of the shell and Settings screens also move into their own files. ## Affected package `long-term-memory` 1.4.31, under `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/`: - `MemoryVault.tsx` 4,666 lines - `SourcesWorkspace.tsx` 4,072 - `ReviewQueue.tsx` 3,631 - `ActivityView.tsx` 1,938 - `MemorySettings.tsx` 1,736 - `LongTermMemoryDetail.tsx` 1,632 ## Expected behavior Each screen lives in its own folder, and shared modules stay at the root. Two different components no longer share the name `ScopeTargetPicker`. ## Actual behavior Each large screen is one component that holds 25 to 38 state values (Vault 38, Review 26, Sources 25), with already-separate components defined inline in the same file. Two different components are both named `ScopeTargetPicker` (`MemoryVault.tsx:210`, `SourcesWorkspace.tsx:112`). ## Steps to reproduce 1. Count lines in the files listed above. 2. Search the feature folder for `function ScopeTargetPicker`: there are two definitions. ## Environment - Marinara Engine version: 2.5.0 line (`staging`) - Package version: long-term-memory 1.4.31 (`upstream/staging` 39a5c5cfb; LTM files unchanged since cdb583a95) - Install type: source (code audit) - OS + version: not platform-specific - Browser or app shell: any ## Logs, screenshots, or video Not applicable; line numbers are at cdb583a95 and will shift once #1374 and #1375 land. ## Minimal fix Pure moves (`git mv` plus cutting inline components into sibling files, updating imports and the test path map from #1373). No logic changes. - `vault/`: `MemoryVault.tsx`; `VaultScopePicker` (the Vault `ScopeTargetPicker`, renamed); `MemoryAvailabilityWorkbench`; `BulkAvailabilityWorkbench`; `Pill`; `TargetPicker.tsx`; `detail-name.ts`; and the types they use (`MemoryVault.tsx:157-176`). - `sources/`: `SourcesWorkspace.tsx`; `SourceScopeCombobox` (the Sources `ScopeTargetPicker`, renamed); `DestinationScopePanel`; `EntrySelect`; `SourceOperationWorkbench`; `ImportedSourceInspector`. - `review/`: `ReviewQueue.tsx`; `review-state.ts` (the pure row-building, persistence and fingerprint helpers, about 600 lines, `:394-588` and nearby); `MutationEditor`; `ExtractionDetails`; `AmbiguousLinkChoice` and its small siblings; `SubjectIdentityReview.tsx`; `review-queue-ambiguous-link.ts`. - `settings/`: `MemorySettings.tsx`, `ExtractionPromptTemplates.tsx`, `ActivityView.tsx`, `debug-activity.ts`. - Stay at the root: `api.ts`, `types.ts`, `shared-controls.tsx`, `LtmWorkspace.tsx`, `LastInjectionSummary.tsx`, `client-entry.tsx`, `LongTermMemoryDetail.tsx`, `LongTermMemoryNavigation.tsx`, `ChatSettings.tsx`, `localization.tsx`, `display-labels.ts`, `scope-targets.ts`, `source-task.ts`, `recall-style.ts`, `locales/`. - Update the `lazy` import path for `MemoryVault` (`LongTermMemoryDetail.tsx:94-99`). Two small extractions, which move a little state with them (review these as behaviour changes): - `Onboarding.tsx` beside `LongTermMemoryDetail.tsx`: the setup guide (`onboardingSteps` at `:35-93`, JSX at about `:937-1572`, including the 88-line `<style>` at `:940`). Its three state values (open, step, source) move with it, and the header help button opens it through an `onOpen` prop. - `settings/MaintenancePanel.tsx`: the Maintenance tab (`MemorySettings.tsx:1387-1696`) with its seven state values, plus its own busy and message state. Validation per PR: `npm run check`, `node scripts/typecheck-packages.mjs long-term-memory`, rebuild LTM, `node scripts/validate-catalog.mjs`, `node tests/long-term-memory-feedback-clarity-ui.regression.mjs`, `node tests/long-term-memory-loading.regression.mjs`, and the LTM browser test. ## Additional context - Depends on #1373: the source-text tests read 15 fixed paths, and behaviour tests import `api.ts`, `detail-name.ts`, `display-labels.ts`, `review-queue-ambiguous-link.ts`, `source-task.ts` and `debug-activity.ts` by path. With the path map, each move changes one line in the tests. - The build needs no change: only `client-entry.tsx` is referenced, and directories are copied recursively. - Every PR here changes `client.js` and ships as a patch bump, so batch the moves: one PR, or one per folder. - Out of scope: changing which component owns which state (deferred until typing in a large Vault has been timed), merging the place pickers (a separate issue after this one), and renaming locale keys. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:29:54 +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#703
No description provided.