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

fix([issue-2008]): remove unenforced timeLimitSec/stimulusMs/showMs config surface for cognitive drills

Adam Eivybad12404233e
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 4676709e3e..85d0add321 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -28,6 +28,7 @@
- **[issue-1992] Opt-in adaptive difficulty for mental-math POST drills.** Math drill params (`steps` / `maxDigits` / `maxExponent` / estimation `tolerancePct`) were fixed values from config that never responded to how you were doing. A new **Adaptive difficulty** toggle in the Drill Configuration screen (default OFF, so existing installs are unchanged) makes each math drill nudge its primary difficulty knob from your recent scored performance: sustained high accuracy (≥90% over enough sessions) bumps it one step harder, repeated misses (≤50%) ease it back, all clamped to safe min/max bounds — and it won't move until it has enough scored samples to trust. The adjustment is a pure, unit-tested policy (`server/lib/postAdaptive.js`) applied server-side at drill-generation time, so manual config still wins whenever Adaptive is off. It's fully transparent: each math drill card shows the effective difficulty (e.g. "Adaptive: max digits 2 → 3 (harder · 94% recent)") via a new `GET /post/adaptive-preview` endpoint, so it's never a black box. (`server/lib/postAdaptive.js`, `server/services/meatspacePost.js`, `client/src/components/meatspace/post/PostDrillConfig.jsx`, Closes #1992)
- **[issue-1993] New deterministic cognitive drills — N-Back, Digit Span, and Stroop.** POST spanned math, LLM, and memory drills but was missing classic non-LLM cognitive-training exercises. A new **Cognitive** domain adds three provider-free drills: **N-Back** (1/2/3-back working-memory matching), **Digit Span** (forward/backward sequence recall), and **Stroop** (name the ink color, not the word — attention/inhibition). Each is configurable in the Drill Configuration screen, playable in both Test and Train modes via a dedicated interactive runner, scored, and saved to your training history alongside every other drill — with **zero AI provider calls**. Scoring is recomputed server-side from the generated drill (never trusting the client) using a shared 80% accuracy + 20% speed blend, and the drills are picked up by Full POST and Quick 5 Min automatically. (Closes #1993)
- **[issue-1994] Optional daily reminder for your POST session.** POST is meant to be a daily habit, but nothing ever nudged you to actually do it. A new **Daily Reminder** toggle in the Drill Configuration screen — off by default — lets you pick a time of day; if you haven't completed a session by then, you'll get a single in-app notification reminding you, and it stays silent once you've already practiced that day. Turning it off stops all nudges immediately. No AI calls are involved, and changing the time takes effect right away without a restart. (Closes #1994)
+- **[issue-2008] Cognitive drills (N-Back, Digit Span, Stroop) no longer show a "Time Limit" field that did nothing.** These three drills are self-paced/stimulus-driven and never counted down against it, unlike Mental Math and Wit & Memory drills, which genuinely do enforce their time limit. The dead field is removed from the Drill Configuration screen and drill summaries, along with the unreachable `stimulusMs`/`showMs` config pass-through (no UI ever set them — the drills always used their built-in pacing anyway). No behavior change to how the drills actually play. (Closes #2008)
## Media Generation
diff --git a/client/src/components/meatspace/post/PostDrillConfig.jsx b/client/src/components/meatspace/post/PostDrillConfig.jsx
index 0beb96b768..8f3169a134 100644
--- a/client/src/components/meatspace/post/PostDrillConfig.jsx
+++ b/client/src/components/meatspace/post/PostDrillConfig.jsx
@@ -141,6 +141,12 @@ function seedLlmDrillTypes(saved) {
// clamps in server/services/meatspacePostCognitive.js and the Zod bounds in
// server/lib/postValidation.js. `defaults` mirror the server DEFAULT_CONFIG so
// the launcher and generators agree.
+//
+// No Time Limit field here (unlike the math/LLM drill meta above) — cognitive
+// drills are self-paced/stimulus-driven and never enforce a countdown (see
+// PostCognitiveDrillRunner.jsx). A `timeLimitSec` knob was previously
+// surfaced/validated for these drills without ever being consumed, which
+// promised behavior that didn't happen (issue #2008).
const COGNITIVE_DRILL_META = {
'n-back': {
label: 'N-Back',
@@ -148,9 +154,8 @@ const COGNITIVE_DRILL_META = {
fields: [
{ key: 'n', label: 'N (steps back)', type: 'number', min: 1, max: 3 },
{ key: 'length', label: 'Sequence Length', type: 'number', min: 6, max: 60 },
- { key: 'timeLimitSec', label: 'Time Limit (sec)', type: 'number', min: 10, max: 300 },
],
- defaults: { enabled: true, n: 2, length: 20, timeLimitSec: 90 },
+ defaults: { enabled: true, n: 2, length: 20 },
},
'digit-span': {
label: 'Digit Span',
@@ -162,18 +167,16 @@ const COGNITIVE_DRILL_META = {
] },
{ key: 'startLength', label: 'Start Length', type: 'number', min: 3, max: 9 },
{ key: 'maxLength', label: 'Max Length', type: 'number', min: 3, max: 12 },
- { key: 'timeLimitSec', label: 'Time Limit (sec)', type: 'number', min: 10, max: 300 },
],
- defaults: { enabled: true, direction: 'forward', startLength: 3, maxLength: 8, timeLimitSec: 120 },
+ defaults: { enabled: true, direction: 'forward', startLength: 3, maxLength: 8 },
},
'stroop': {
label: 'Stroop',
desc: 'Name the ink color of a color-word — attention & inhibition',
fields: [
{ key: 'count', label: 'Trials', type: 'number', min: 5, max: 40 },
- { key: 'timeLimitSec', label: 'Time Limit (sec)', type: 'number', min: 10, max: 300 },
],
- defaults: { enabled: true, count: 15, timeLimitSec: 60 },
+ defaults: { enabled: true, count: 15 },
},
};
diff --git a/client/src/components/meatspace/post/PostSessionLauncher.jsx b/client/src/components/meatspace/post/PostSessionLauncher.jsx
index 56b50c730b..dc106381bf 100644
--- a/client/src/components/meatspace/post/PostSessionLauncher.jsx
+++ b/client/src/components/meatspace/post/PostSessionLauncher.jsx
@@ -43,14 +43,17 @@ export default function PostSessionLauncher({ config, recentSessions, stats, sta
: [];
// Only the fields each cognitive generator reads; extras are harmless.
+ // stimulusMs/showMs are intentionally NOT forwarded here — no UI field ever
+ // sets them (PostDrillConfig.jsx exposes no such control), so this config
+ // never carries them; the generators always fall back to their own internal
+ // defaults (server/services/meatspacePostCognitive.js). Forwarding them
+ // would have been dead pass-through (issue #2008).
const cognitiveDrillConfig = (cfg) => ({
n: cfg.n,
length: cfg.length,
- stimulusMs: cfg.stimulusMs,
direction: cfg.direction,
startLength: cfg.startLength,
maxLength: cfg.maxLength,
- showMs: cfg.showMs,
count: cfg.count,
});
@@ -88,8 +91,9 @@ export default function PostSessionLauncher({ config, recentSessions, stats, sta
const cognitiveConfigs = enabledCognitiveDrills.map(([type, cfg]) => ({
type,
- config: cognitiveDrillConfig(cfg),
- timeLimitSec: cfg.timeLimitSec || 90
+ config: cognitiveDrillConfig(cfg)
+ // No timeLimitSec — cognitive drills are self-paced/stimulus-driven and
+ // never enforce a countdown (see PostCognitiveDrillRunner.jsx).
}));
const drillConfigs = [...mathConfigs, ...llmConfigs, ...cognitiveConfigs];
@@ -485,7 +489,6 @@ export default function PostSessionLauncher({ config, recentSessions, stats, sta
<span className="text-white">{DRILL_LABELS[type] || type}</span>
<span className="text-gray-500">
{type === 'n-back' ? `${cfg.n ?? 2}-back` : type === 'digit-span' ? `${cfg.startLength ?? 3}–${cfg.maxLength ?? 8}` : cfg.count ? `${cfg.count} trials` : ''}
- {cfg.timeLimitSec ? ` · ${cfg.timeLimitSec}s` : ''}
</span>
</div>
))}
diff --git a/server/lib/postValidation.js b/server/lib/postValidation.js
index 0fcc604e4a..08c7201daa 100644
--- a/server/lib/postValidation.js
+++ b/server/lib/postValidation.js
@@ -70,13 +70,16 @@ const drillTypeConfigSchema = z.object({
// --- Cognitive drill knobs (n-back / digit-span / stroop) ---
// Bounds match the generator clamps in meatspacePostCognitive.js so the UI /
// API can't accept a value the generator will silently narrow.
+ // (timeLimitSec above is validated but NOT enforced for these drill types —
+ // they're self-paced/stimulus-driven; see PostCognitiveDrillRunner.jsx.)
+ // No stimulusMs/showMs here — no UI ever set them (issue #2008), so they were
+ // dead validated-but-unreachable knobs; the generators (meatspacePostCognitive.js)
+ // keep their own internal defaults regardless.
n: z.number().int().min(1).max(3).optional(),
length: z.number().int().min(6).max(60).optional(),
- stimulusMs: z.number().int().min(1000).max(5000).optional(),
direction: z.enum(['forward', 'backward']).optional(),
startLength: z.number().int().min(3).max(9).optional(),
- maxLength: z.number().int().min(3).max(12).optional(),
- showMs: z.number().int().min(200).max(5000).optional()
+ maxLength: z.number().int().min(3).max(12).optional()
});
// Task result within a session
diff --git a/server/services/meatspacePost.js b/server/services/meatspacePost.js
index e0a6acc5d4..4d958b01aa 100644
--- a/server/services/meatspacePost.js
+++ b/server/services/meatspacePost.js
@@ -41,13 +41,15 @@ const DEFAULT_CONFIG = {
}
},
// Deterministic cognitive drills (working-memory / attention / inhibition).
- // No provider calls — enabled by default since they're free to run.
+ // No provider calls — enabled by default since they're free to run. No
+ // timeLimitSec — these drills are self-paced/stimulus-driven and never
+ // enforce a countdown (see client PostCognitiveDrillRunner.jsx / issue #2008).
cognitive: {
enabled: true,
drillTypes: {
- 'n-back': { enabled: true, n: 2, length: 20, timeLimitSec: 90 },
- 'digit-span': { enabled: true, direction: 'forward', startLength: 3, maxLength: 8, timeLimitSec: 120 },
- 'stroop': { enabled: true, count: 15, timeLimitSec: 60 }
+ 'n-back': { enabled: true, n: 2, length: 20 },
+ 'digit-span': { enabled: true, direction: 'forward', startLength: 3, maxLength: 8 },
+ 'stroop': { enabled: true, count: 15 }
}
},
sessionModules: ['mental-math'],