Skip to content

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

refactor([issue-3252]): give the coarse POST modules one shared label map

[._.]/ Adam Eivy0c72bc1bcd24
diff --git a/client/src/components/meatspace/post/PostDrillConfig.jsx b/client/src/components/meatspace/post/PostDrillConfig.jsx
index 05ef77c529..8288ef3aab 100644
--- a/client/src/components/meatspace/post/PostDrillConfig.jsx
+++ b/client/src/components/meatspace/post/PostDrillConfig.jsx
@@ -4,26 +4,21 @@ import { updatePostConfig, getProviders, getPostAdaptivePreview, getPostMultipli
import toast from '../../ui/Toast';
import { FormField } from '../../ui/FormField';
import { filterSelectableModels, enabledApiProviderFilter } from '../../../utils/providers';
-import { GOAL_DEFS, POST_TOPICS } from './constants';
+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. Their participation is
-// controlled from the Practice Plan instead.
-const MODULE_LABEL_OVERRIDES = { 'llm-drills': 'Wit & Memory (AI)' };
-const SESSION_MODULE_OPTIONS = POST_TOPICS
- .filter(t => t.surface === 'session' && t.module)
- .reduce((out, t) => {
- if (out.some(o => o.id === t.module)) return out;
- // One row per MODULE, not per topic — several topics (wordplay / verbal /
- // imagination) share `llm-drills`, so the first topic's label would be
- // misleading; the override names the module.
- out.push({ id: t.module, label: MODULE_LABEL_OVERRIDES[t.module] || t.label });
- return out;
- }, []);
+// would only let a user build an empty session (see issue #3254). Their
+// participation is controlled from the Practice Plan instead.
+//
+// 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.
+const SESSION_MODULE_OPTIONS = [...new Set(
+ POST_TOPICS.filter(t => t.surface === 'session' && t.module).map(t => t.module)
+)].map(module => ({ id: module, label: MODULE_LABELS[module] }));
// Human labels for the adaptive difficulty knob each math drill tunes.
const ADAPTIVE_FIELD_LABELS = {
diff --git a/client/src/components/meatspace/post/PracticePlan.jsx b/client/src/components/meatspace/post/PracticePlan.jsx
index f60a05bf78..c84c7f8125 100644
--- a/client/src/components/meatspace/post/PracticePlan.jsx
+++ b/client/src/components/meatspace/post/PracticePlan.jsx
@@ -7,6 +7,7 @@ import {
TOPIC_UI,
DRILL_LABELS,
MODULE_CONFIG_KEY,
+ MODULE_LABELS,
isTopicEnabled,
isMemoryItemEnabled,
composedSessionDrillTypes,
@@ -16,13 +17,11 @@ import {
// Practice Plan owns the WHAT (which topics, drill types, and memorized texts
// participate); Drill Config still owns the HOW HARD (per-drill knobs).
-// Coarse module → the heading topics are grouped under. Morse has a null module
-// (it never posts a scored POST task) and lands in its own group.
+// Group order for the topic rows: every coarse module (named by the shared
+// MODULE_LABELS so Config and Practice Plan can't disagree), then the null-module
+// bucket for topics that never post a scored POST task (Morse).
const MODULE_GROUPS = [
- { module: 'mental-math', label: 'Mental Math' },
- { module: 'llm-drills', label: 'Wit & Language (AI)' },
- { module: 'cognitive', label: 'Cognitive' },
- { module: 'memory', label: 'Memory' },
+ ...['mental-math', 'llm-drills', 'cognitive', 'memory'].map(module => ({ module, label: MODULE_LABELS[module] })),
{ module: null, label: 'Other Practice' },
];
diff --git a/client/src/components/meatspace/post/constants.js b/client/src/components/meatspace/post/constants.js
index 89a8314377..2d748a19fe 100644
--- a/client/src/components/meatspace/post/constants.js
+++ b/client/src/components/meatspace/post/constants.js
@@ -171,6 +171,18 @@ export const MODULE_CONFIG_KEY = {
memory: 'memory',
};
+// Human label for a coarse module. Several topics share `llm-drills`, so no
+// single topic label names it — hence an explicit map rather than deriving from
+// the first topic. Shared by Config's Session Composition checkboxes and the
+// Practice Plan's group headings so the same module can't be called two
+// different things on two screens.
+export const MODULE_LABELS = {
+ 'mental-math': 'Mental Math',
+ 'llm-drills': 'Wit & Memory (AI)',
+ cognitive: 'Cognitive',
+ memory: 'Memory',
+};
+
/** Whether a coarse module passes the `sessionModules` composition filter. */
export function isModuleInSession(config, module) {
const sm = Array.isArray(config?.sessionModules) ? config.sessionModules : null;