Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
feat: compose memory into POST sessions (#3254)
[._.]/ Adam Eivy6b9b82703de8
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex cb4463a38c..fe8c7aa432 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -24,7 +24,7 @@## POST- **[issue-3253] Powers practice now teaches a fast mental path before raising the difficulty.** New sessions begin with recall-friendly powers of two, unlock named techniques through speed-and-accuracy mastery, never generate a pair without a documented method, and show the worked steps after a miss and in session review. Manual base and exponent controls remain available when Progressive is switched off.-+- **[issue-3254] Memory drills can now join Full and Quick POST sessions.** Memory remains off in Session Composition by default, but users with an enabled memorized item can opt in to interleave recall work with their daily session; empty or fully-disabled item pools are explained and never produce a broken mid-session drill.- **[issue-3252] A new Practice Plan page decides what you're actually studying.** POST had grown to roughly thirty drill types across six subjects plus three standalone study surfaces, with no single place to say which of them you want. Practice Plan (`/post/plan`, also reachable from ⌘K and by voice) lists every topic with a switch, expandable to its individual drills, and shows a live "your daily POST will include…" summary that updates as you flip switches — so you can see what tomorrow's session becomes before you run it. Drill Config still owns how hard each drill is; Practice Plan owns what's in the rotation.- **[issue-3252] "Wordplay only" is now one switch instead of eight.** Wordplay, Verbal Agility and Imagination all used to hide behind a single "Wit & Memory (AI)" checkbox, so keeping just one of them meant unchecking eight individual drill types by hand — and the subjects the launcher showed you weren't the ones the settings page let you edit. Each is now its own topic, and switching one off drops its drills from Full and Quick sessions and from the "Up next" recommendations together.- **[issue-3252] Memorized texts can leave the daily rotation without being deleted.** Not wanting the built-in Elements Song in your reviews used to mean deleting it, which threw away every bit of mastery and scheduling history you'd built up. Each memorized text now has its own switch: switch one off and it stops being recommended and stops being auto-picked for memory drills, but keeps all its history and stays available to practise any time from its own page.diff --git a/client/src/components/meatspace/post/PostDrillConfig.jsx b/client/src/components/meatspace/post/PostDrillConfig.jsxindex 4a47cf1a2f..28aa4c5e27 100644--- a/client/src/components/meatspace/post/PostDrillConfig.jsx+++ b/client/src/components/meatspace/post/PostDrillConfig.jsx@@ -1,6 +1,6 @@import { useState, useEffect } from 'react';import { ArrowLeft, Save, Brain, Bell, Target, Layers, TrendingUp, TrendingDown, Minus } from 'lucide-react';-import { updatePostConfig, getProviders, getPostAdaptivePreview, getPostMultiplicationProgress, getPostPowersProgress, getPostCognitiveProgress } from '../../../services/api';+import { updatePostConfig, getProviders, getPostAdaptivePreview, getPostMultiplicationProgress, getPostPowersProgress, getPostCognitiveProgress, getMemoryItems } from '../../../services/api';import toast from '../../ui/Toast';import { FormField } from '../../ui/FormField';import { filterSelectableModels, enabledApiProviderFilter } from '../../../utils/providers';@@ -9,10 +9,8 @@ import { GOAL_DEFS, POST_TOPICS, MODULE_LABELS } from './constants';// Modules a Full/Quick composed session can draw from (issue #2100), DERIVED// from the shared topic registry so the list has one owner (issue #3252): a// module is offered exactly when some topic composes into a session-// (`surface: 'session'`). That keeps `memory` and `morse` out — both are-// standalone surfaces with no launcher-composed drill, so offering them here-// would only let a user build an empty session (see issue #3254). Their-// participation is controlled from the Practice Plan instead.+// (`surface: 'session'`). Memory joins this list now that the launcher has a+// real composed-drill source (issue #3254); Morse remains standalone.//// One row per MODULE, not per topic — wordplay / verbal / imagination all share// `llm-drills`, so the dedupe below keeps a single row named by MODULE_LABELS.@@ -542,13 +540,14 @@ export default function PostDrillConfig({ config, onSaved, onBack }) {// goal. Seeded from saved config; the launcher/widget render progress vs these.const [goals, setGoals] = useState(() => ({ ...(config?.goals || {}) }));// Which modules a Full/Quick COMPOSED session draws from (issue #2100). The- // default (mental-math + cognitive + memory) excludes LLM drills so they're- // never auto-run without provider-cost consent — check "Wit & Memory" to opt- // them into composed sessions.+ // default (mental-math + cognitive) excludes Memory and LLM drills. Memory is+ // a deliberate composition opt-in; AI drills are never auto-run without+ // provider-cost consent — check "Wit & Memory" to opt them in.const [sessionModules, setSessionModules] = useState(() => Array.isArray(config?.sessionModules) ? config.sessionModules : ['mental-math', 'cognitive']);const [providers, setProviders] = useState([]);+ const [memoryItemsState, setMemoryItemsState] = useState({ status: 'loading', items: [] });const [saving, setSaving] = useState(false);const setGoalField = (key, raw) => setGoals(prev => {@@ -567,8 +566,14 @@ export default function PostDrillConfig({ config, onSaved, onBack }) {useEffect(() => {getProviders().then(p => setProviders((p?.providers || []).filter(enabledApiProviderFilter))).catch(err => console.warn('⚠️ Failed to load providers: ' + err.message));+ getMemoryItems({ silent: true })+ .then(items => setMemoryItemsState({ status: 'ready', items: Array.isArray(items) ? items : [] }))+ .catch(() => setMemoryItemsState({ status: 'error', items: [] }));}, []);+ const hasEnabledMemoryItem = memoryItemsState.status === 'ready'+ && memoryItemsState.items.some(item => config?.memory?.items?.[item.id]?.enabled !== false);+// Load the effective-difficulty preview when Adaptive is on, so each math card// can show what a session would actually use. Reflects saved config + recent// performance from the server (not the unsaved form values), so it may lag an@@ -887,21 +892,30 @@ export default function PostDrillConfig({ config, onSaved, onBack }) {<div className="flex flex-wrap gap-2">{SESSION_MODULE_OPTIONS.map(opt => {const on = sessionModules.includes(opt.id);+ const memoryUnavailable = opt.id === 'memory' && !hasEnabledMemoryItem;+ const unavailableReason = memoryItemsState.status === 'loading'+ ? 'Checking memory items…'+ : memoryItemsState.status === 'error'+ ? 'Memory items could not be loaded.'+ : 'Add or enable a memory item in Practice Plan first.';return (- <button- key={opt.id}- type="button"- role="checkbox"- aria-checked={on}- onClick={() => toggleModule(opt.id)}- className={`px-3 py-1.5 rounded-lg text-sm font-medium border transition-colors ${- on- ? 'bg-port-accent/20 text-port-accent border-port-accent/50'- : 'bg-port-bg text-gray-400 border-port-border hover:text-white'- }`}- >- {opt.label}- </button>+ <div key={opt.id} className="flex flex-col gap-1">+ <button+ type="button"+ role="checkbox"+ aria-checked={on}+ disabled={memoryUnavailable && !on}+ onClick={() => toggleModule(opt.id)}+ className={`px-3 py-1.5 rounded-lg text-sm font-medium border transition-colors ${+ on+ ? 'bg-port-accent/20 text-port-accent border-port-accent/50'+ : 'bg-port-bg text-gray-400 border-port-border hover:text-white'+ } disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:text-gray-400`}+ >+ {opt.label}+ </button>+ {memoryUnavailable && <span className="max-w-48 text-xs text-gray-500">{unavailableReason}</span>}+ </div>);})}</div>diff --git a/client/src/components/meatspace/post/PostDrillConfig.test.jsx b/client/src/components/meatspace/post/PostDrillConfig.test.jsxindex 9b9b2eb47a..9434fb8c1c 100644--- a/client/src/components/meatspace/post/PostDrillConfig.test.jsx+++ b/client/src/components/meatspace/post/PostDrillConfig.test.jsx@@ -8,11 +8,12 @@ vi.mock('../../../services/api', () => ({getPostMultiplicationProgress: vi.fn(),getPostPowersProgress: vi.fn(),getPostCognitiveProgress: vi.fn(),+ getMemoryItems: vi.fn(),}));vi.mock('../../ui/Toast', () => ({ default: { success: vi.fn(), error: vi.fn() } }));import PostDrillConfig from './PostDrillConfig';-import { updatePostConfig, getProviders, getPostAdaptivePreview, getPostMultiplicationProgress, getPostPowersProgress, getPostCognitiveProgress } from '../../../services/api';+import { updatePostConfig, getProviders, getPostAdaptivePreview, getPostMultiplicationProgress, getPostPowersProgress, getPostCognitiveProgress, getMemoryItems } from '../../../services/api';import { LLM_DRILL_TYPES, DRILL_LABELS } from './constants';// The generatable LLM drill types + labels, imported from the canonical@@ -82,6 +83,7 @@ beforeEach(() => {thresholds: { minSamples: 3, targetAccuracy: 0.85 }, windowDays: 30,},});+ getMemoryItems.mockResolvedValue([{ id: 'example-memory' }]);});// Render + settle the mount-effect fetches (providers, adaptive preview,@@ -141,6 +143,24 @@ describe('PostDrillConfig', () => {expect(payload.sessionModules).toContain('mental-math');});+ it('offers Memory for composed sessions when an enabled item exists', async () => {+ await renderConfig(<PostDrillConfig config={config} onSaved={vi.fn()} onBack={vi.fn()} />);+ const memory = await screen.findByRole('checkbox', { name: 'Memory' });+ expect(memory.disabled).toBe(false);+ fireEvent.click(memory);+ fireEvent.click(screen.getByText('Save'));+ await waitFor(() => expect(updatePostConfig).toHaveBeenCalled());+ expect(updatePostConfig.mock.calls[0][0].sessionModules).toContain('memory');+ });++ it('disables Memory composition and explains why when no enabled item exists', async () => {+ getMemoryItems.mockResolvedValue([]);+ await renderConfig(<PostDrillConfig config={config} onSaved={vi.fn()} onBack={vi.fn()} />);+ const memory = await screen.findByRole('checkbox', { name: 'Memory' });+ expect(memory.disabled).toBe(true);+ expect(screen.getByText('Add or enable a memory item in Practice Plan first.')).toBeTruthy();+ });+it('clears a previously-set goal to an empty goals patch on save', async () => {await renderConfig(<PostDrillConfig config={{ ...config, goals: { streakTarget: 5 } }} onSaved={vi.fn()} onBack={vi.fn()} />);fireEvent.change(screen.getByLabelText(/Streak/i), { target: { value: '' } });diff --git a/client/src/components/meatspace/post/PostSessionLauncher.jsx b/client/src/components/meatspace/post/PostSessionLauncher.jsxindex 866610e28e..b22c53c395 100644--- a/client/src/components/meatspace/post/PostSessionLauncher.jsx+++ b/client/src/components/meatspace/post/PostSessionLauncher.jsx@@ -1,7 +1,7 @@import { useState, useEffect } from 'react';import { Link } from 'react-router-dom';import { Zap, History, Settings, Play, Brain, BookOpen, Dumbbell, Timer, Radio, Target, TrendingUp, TrendingDown, Minus, Compass, ArrowRight, ChevronRight, Layers } from 'lucide-react';-import { getProviders, getPostReviewReps, getPostRecommendations, getMorseProgress, getPostProgress } from '../../../services/api';+import { getProviders, getPostReviewReps, getPostRecommendations, getMorseProgress, getPostProgress, getMemoryItems } from '../../../services/api';import { FormField } from '../../ui/FormField';import { isApiProvider } from '../../../utils/providers';import { DOMAINS, DRILL_TO_DOMAIN, DRILL_LABELS, computeDomainAverages, computeGoalProgress, isTopicEnabled, resolveTopicForDrillType } from './constants';@@ -97,11 +97,18 @@ export default function PostSessionLauncher({ config, recentSessions, stats, sta// Training mode, Morse, memory) for the daily-minutes goal. Fetched only when// that goal is set; null falls back to the scored-session-only estimate.const [todayMinutesTotal, setTodayMinutesTotal] = useState(null);+ // Memory is opt-in for composed sessions, but its generator cannot run+ // without an enabled item. Keep loading/error distinct from a confirmed-empty+ // list and fail closed until the item pool is known (issue #3254).+ const [memoryItemsState, setMemoryItemsState] = useState({ status: 'loading', items: [] });useEffect(() => {getProviders().then(p => setProviders((p || []).filter(pr => pr.enabled && isApiProvider(pr)))).catch(err => console.warn('⚠️ Failed to load providers: ' + err.message));getPostReviewReps(5).then(r => setReviewReps(r?.reps || [])).catch(() => setReviewReps([]));getPostRecommendations().then(r => setRecommendations(r?.recommendations || [])).catch(() => setRecommendations([]));+ getMemoryItems({ silent: true })+ .then(items => setMemoryItemsState({ status: 'ready', items: Array.isArray(items) ? items : [] }))+ .catch(() => setMemoryItemsState({ status: 'error', items: [] }));}, []);// Only fetch Morse progress when a Morse WPM goal exists — avoids an extra@@ -176,6 +183,14 @@ export default function PostSessionLauncher({ config, recentSessions, stats, sta? Object.entries(config.cognitive?.drillTypes || {}).filter(([type, cfg]) => cfg.enabled !== false && topicAllowed(type)): [];+ const hasEnabledMemoryItem = memoryItemsState.status === 'ready'+ && memoryItemsState.items.some(item => config.memory?.items?.[item.id]?.enabled !== false);+ const enabledMemoryDrills = config.memory?.enabled !== false && hasEnabledMemoryItem+ ? DOMAINS.memory.drillTypes+ .map(type => [type, config.memory?.drillTypes?.[type]])+ .filter(([type, cfg]) => cfg && cfg.enabled !== false && topicAllowed(type))+ : [];+// Only the fields each cognitive generator reads; extras are harmless.// stimulusMs (n-back) / showMs (digit-span) are forwarded so that manual mode// (Progressive off) actually uses the presentation-speed values the user set@@ -199,7 +214,8 @@ export default function PostSessionLauncher({ config, recentSessions, stats, sta// Composed sessions (Full POST / Quick) honor `sessionModules` (issue #2100):// a module's drills are only added when it's listed. The default- // (mental-math + cognitive + memory) excludes LLM drills, so wit/verbal work+ // (mental-math + cognitive) excludes Memory and LLM drills, so both remain+ // deliberate opt-ins and wit/verbal work// is never auto-added to a default session — provider-cost consent stays// opt-in (CLAUDE.md AI-provider policy). An empty/absent list means "all// enabled" (back-compat). Focus-practice on a specific weak domain bypasses@@ -209,7 +225,7 @@ export default function PostSessionLauncher({ config, recentSessions, stats, sta// unchecking every module in Config is a deliberate "no composed sessions"// choice, not the same as never having set it (issue #2100 review).const sessionModules = Array.isArray(config.sessionModules) ? config.sessionModules : null;- const SOURCE_TO_MODULE = { math: 'mental-math', llm: 'llm-drills', cognitive: 'cognitive' };+ const SOURCE_TO_MODULE = { math: 'mental-math', llm: 'llm-drills', cognitive: 'cognitive', memory: 'memory' };const moduleAllowed = (source) => sessionModules === null || sessionModules.includes(SOURCE_TO_MODULE[source]);function handleStart() {@@ -246,11 +262,18 @@ export default function PostSessionLauncher({ config, recentSessions, stats, sta// never enforce a countdown (see PostCognitiveDrillRunner.jsx).}));+ const memoryConfigs = (moduleAllowed('memory') ? enabledMemoryDrills : []).map(([type, cfg]) => ({+ type,+ domain: 'memory',+ config: { count: cfg.count },+ timeLimitSec: DOMAINS.memory.timeBudgetSec,+ }));+// Interleave across domains (math → cognitive → memory → verbal …) rather// than running each module blocked, so a full session spaces varied work// for better retention (issue #2100). Full coverage is preserved — every// enabled drill still runs, just reordered.- const drillConfigs = interleaveByDomain([...mathConfigs, ...llmConfigs, ...cognitiveConfigs]);+ const drillConfigs = interleaveByDomain([...mathConfigs, ...llmConfigs, ...cognitiveConfigs, ...memoryConfigs]);onStart(drillConfigs, buildCleanTags(tags), mode === 'train');}@@ -259,6 +282,7 @@ export default function PostSessionLauncher({ config, recentSessions, stats, sta...enabledMathDrills.map(([type, cfg]) => ({ type, cfg, source: 'math' })),...enabledLlmDrills.map(([type, cfg]) => ({ type, cfg, source: 'llm' })),...enabledCognitiveDrills.map(([type, cfg]) => ({ type, cfg, source: 'cognitive' })),+ ...enabledMemoryDrills.map(([type, cfg]) => ({ type, cfg, source: 'memory' })),];const enabledDomains = {};@@ -433,7 +457,7 @@ export default function PostSessionLauncher({ config, recentSessions, stats, staonStart([drillConfig], buildCleanTags(tags), mode === 'train');}- const hasAnyDrills = enabledMathDrills.length > 0 || enabledLlmDrills.length > 0 || enabledCognitiveDrills.length > 0;+ const hasAnyDrills = enabledMathDrills.length > 0 || enabledLlmDrills.length > 0 || enabledCognitiveDrills.length > 0 || enabledMemoryDrills.length > 0;// Quick-session domain count reflects the sessionModules-filtered set, so the// "Quick 5 Min (N domains)" button matches what it will actually run.const domainCount = Object.keys(sessionEnabledDomains).length;diff --git a/client/src/components/meatspace/post/PostSessionLauncher.test.jsx b/client/src/components/meatspace/post/PostSessionLauncher.test.jsxindex 1b84f56e09..be6c52ff7c 100644--- a/client/src/components/meatspace/post/PostSessionLauncher.test.jsx+++ b/client/src/components/meatspace/post/PostSessionLauncher.test.jsx@@ -10,12 +10,13 @@ vi.mock('../../../services/api', () => ({getPostRecommendations: vi.fn().mockResolvedValue({ recommendations: [] }),getMorseProgress: vi.fn().mockResolvedValue({ settings: { wpm: 18, farnsworthWpm: 12 } }),getPostProgress: vi.fn().mockResolvedValue({ series: { byDay: [] } }),+ getMemoryItems: vi.fn().mockResolvedValue([{ id: 'example-memory' }]),// useUserTimezone (via the today day key) reads getSettings; pin to UTC.getSettings: vi.fn().mockResolvedValue({ timezone: 'UTC' }),}));import PostSessionLauncher, { buildCleanTags, cognitiveSummary, interleaveByDomain } from './PostSessionLauncher';-import { getPostRecommendations, getMorseProgress, getPostProgress, getPostReviewReps } from '../../../services/api';+import { getPostRecommendations, getMorseProgress, getPostProgress, getPostReviewReps, getMemoryItems } from '../../../services/api';// Pure-function tests for PostSessionLauncher's pre-submit helpers (issue// #2102 gap #10). Both were lifted from component-body closures to module@@ -594,3 +595,91 @@ describe('PostSessionLauncher honors the mentalMath module flag (issue #3252)',expect(onStart.mock.calls[0][0].map(d => d.type)).toEqual(['n-back']);});});++describe('PostSessionLauncher composed memory drills (issue #3254)', () => {+ const memoryConfig = (overrides = {}) => ({+ mentalMath: { enabled: true, drillTypes: { multiplication: { enabled: true, count: 10 } } },+ llmDrills: { enabled: false, drillTypes: {} },+ cognitive: { enabled: false, drillTypes: {} },+ memory: {+ enabled: true,+ drillTypes: {+ 'memory-sequence': { enabled: true, count: 4 },+ 'memory-element-flash': { enabled: false, count: 6 },+ },+ items: {},+ },+ sessionModules: ['mental-math', 'memory'],+ ...overrides,+ });++ const renderWith = (config, onStart) => render(+ <MemoryRouter>+ <PostSessionLauncher+ config={config}+ recentSessions={[]}+ stats={{ sessionCount: 1, overall: 70, currentStreak: 1, longestStreak: 1, byDrill: {} }}+ statsWeek={{ sessionCount: 1 }}+ onStart={onStart}+ onViewHistory={vi.fn()}+ onViewConfig={vi.fn()}+ onViewMemory={vi.fn()}+ onViewMorse={vi.fn()}+ />+ </MemoryRouter>,+ );++ beforeEach(() => {+ vi.clearAllMocks();+ getPostRecommendations.mockResolvedValue({ recommendations: [] });+ getPostReviewReps.mockResolvedValue({ reps: [] });+ getMemoryItems.mockResolvedValue([{ id: 'example-memory' }]);+ });++ it('adds enabled memory drill types to Full and Quick sessions', async () => {+ const onStart = vi.fn();+ renderWith(memoryConfig(), onStart);+ await waitFor(() => expect(getMemoryItems).toHaveBeenCalledWith({ silent: true }));++ fireEvent.click(screen.getByText('Full POST'));+ expect(onStart.mock.calls[0][0]).toEqual(expect.arrayContaining([+ expect.objectContaining({+ type: 'memory-sequence',+ domain: 'memory',+ config: { count: 4 },+ timeLimitSec: 90,+ }),+ ]));+ expect(onStart.mock.calls[0][0].some(d => d.type === 'memory-element-flash')).toBe(false);++ fireEvent.click(screen.getByRole('button', { name: /Quick 5 Min/ }));+ expect(onStart.mock.calls[1][0]).toEqual(expect.arrayContaining([+ expect.objectContaining({ type: 'memory-sequence', domain: 'memory', config: { count: 3 } }),+ ]));+ });++ it('does not compose memory when no items exist', async () => {+ const onStart = vi.fn();+ getMemoryItems.mockResolvedValue([]);+ renderWith(memoryConfig(), onStart);+ await waitFor(() => expect(getMemoryItems).toHaveBeenCalled());++ fireEvent.click(screen.getByText('Full POST'));+ expect(onStart.mock.calls[0][0].map(d => d.type)).toEqual(['multiplication']);+ });++ it('does not compose memory when every item is disabled in the Practice Plan', async () => {+ const onStart = vi.fn();+ renderWith(memoryConfig({+ memory: {+ enabled: true,+ drillTypes: { 'memory-sequence': { enabled: true, count: 4 } },+ items: { 'example-memory': { enabled: false } },+ },+ }), onStart);+ await waitFor(() => expect(getMemoryItems).toHaveBeenCalled());++ fireEvent.click(screen.getByText('Full POST'));+ expect(onStart.mock.calls[0][0].some(d => d.domain === 'memory')).toBe(false);+ });+});diff --git a/client/src/components/meatspace/post/PracticePlan.jsx b/client/src/components/meatspace/post/PracticePlan.jsxindex 20f2ea8f09..2e8a52a23a 100644--- a/client/src/components/meatspace/post/PracticePlan.jsx+++ b/client/src/components/meatspace/post/PracticePlan.jsx@@ -300,11 +300,11 @@ export default function PracticePlan({ config, onSaved, onBack }) {<p className="mt-3 pt-3 border-t border-port-border/60 text-xs text-gray-400">Also in your rotation (practiced from their own tabs):{' '}<span className="text-gray-300">{standaloneOn.map(t => t.label).join(', ')}</span>- {memoryItems?.length > 0 && standaloneOn.some(t => t.id === 'memory') && (- <span className="text-gray-500">- {' '}· {enabledMemoryItems.length} of {memoryItems.length} memorized text{memoryItems.length === 1 ? '' : 's'}- </span>- )}+ </p>+ )}+ {memoryOn && memoryItems?.length > 0 && (+ <p className="mt-2 text-xs text-gray-500">+ Memory rotation: {enabledMemoryItems.length} of {memoryItems.length} memorized text{memoryItems.length === 1 ? '' : 's'}</p>)}</div>diff --git a/client/src/components/meatspace/post/constants.js b/client/src/components/meatspace/post/constants.jsindex 3cd16d24fa..472b3a1f16 100644--- a/client/src/components/meatspace/post/constants.js+++ b/client/src/components/meatspace/post/constants.js@@ -56,7 +56,7 @@ export const POST_TOPICS = [id: 'memory',label: 'Memory',module: 'memory',- surface: 'standalone',+ surface: 'session',drillTypes: ['memory-fill-blank', 'memory-sequence', 'memory-element-flash'],},{diff --git a/client/src/components/meatspace/post/constants.test.js b/client/src/components/meatspace/post/constants.test.jsindex 865d85fe98..5305ac80d6 100644--- a/client/src/components/meatspace/post/constants.test.js+++ b/client/src/components/meatspace/post/constants.test.js@@ -177,13 +177,13 @@ describe('composedSessionDrillTypes (issue #3252)', () => {expect(Object.keys(out)).toEqual(['math']);});- it('never includes a standalone topic (memory / morse)', () => {+ it('includes session-enabled memory but never standalone Morse', () => {const out = composedSessionDrillTypes({...config,memory: { enabled: true, drillTypes: { 'memory-sequence': { enabled: true } } },morse: { enabled: true },});- expect(out.memory).toBeUndefined();+ expect(out.memory).toEqual(['memory-sequence']);expect(out.morse).toBeUndefined();});});diff --git a/server/lib/postTopics.js b/server/lib/postTopics.jsindex 49429f3c7a..944eb434a2 100644--- a/server/lib/postTopics.js+++ b/server/lib/postTopics.js@@ -44,7 +44,7 @@ export const POST_TOPICS = [id: 'memory',label: 'Memory',module: 'memory',- surface: 'standalone',+ surface: 'session',drillTypes: ['memory-fill-blank', 'memory-sequence', 'memory-element-flash'],},{diff --git a/server/lib/postTopics.test.js b/server/lib/postTopics.test.jsindex aa22e9a379..3bb0be0352 100644--- a/server/lib/postTopics.test.js+++ b/server/lib/postTopics.test.js@@ -28,15 +28,15 @@ describe('POST_TOPICS registry (issue #3252)', () => {expect(new Set(all).size).toBe(all.length);});- it('covers the standalone surfaces that previously had no opt-out', () => {- expect(getTopic('memory').surface).toBe('standalone');+ it('keeps Morse standalone while Memory participates in composed sessions', () => {+ expect(getTopic('memory').surface).toBe('session');expect(getTopic('morse').surface).toBe('standalone');// Morse never posts a scored POST task, so it carries no coarse module.expect(getTopic('morse').module).toBeNull();});it('SESSION_TOPIC_IDS is exactly the composable subset', () => {- expect(SESSION_TOPIC_IDS).toEqual(['math', 'wordplay', 'verbal', 'imagination', 'cognitive']);+ expect(SESSION_TOPIC_IDS).toEqual(['math', 'memory', 'wordplay', 'verbal', 'imagination', 'cognitive']);});// The registry partitions the SAME drill types the config schema validates. Ifdiff --git a/server/services/meatspacePost.js b/server/services/meatspacePost.jsindex 61e196428d..25bb53798f 100644--- a/server/services/meatspacePost.js+++ b/server/services/meatspacePost.js@@ -132,9 +132,9 @@ const DEFAULT_CONFIG = {// excluded: auto-enabling them would queue provider calls the user hasn't// consented to (see CLAUDE.md's AI Provider Usage Policy) — a user who wants// wit/verbal drills in every session adds `llm-drills` here explicitly.- // `memory` is intentionally NOT a default: memory practice lives in its own- // tab and has no launcher-composed drill yet, so including it would only risk- // an empty composed session. Legacy installs that persisted the old+ // `memory` is intentionally NOT a default: composed memory practice is opt-in,+ // so existing installs keep exactly their prior daily session mix. Legacy+ // installs that persisted the old// `['mental-math']` default are upgraded to this by migration 159.sessionModules: ['mental-math', 'cognitive'],// Optional practice goals (issue #2100). All fields absent by default so a