Skip to content

Commit fe31eef

Browse files
committed
Refresh task manifest and stimulus bank
1 parent 86d9673 commit fe31eef

3 files changed

Lines changed: 40 additions & 31 deletions

File tree

public/task-manifest.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"schema_version": 1,
3-
"generated_at": "2026-03-18T11:48:04.764Z",
3+
"generated_at": "2026-03-19T00:17:27.377Z",
44
"org": "TaskBeacon",
55
"runner_repo": "psyflow-web",
66
"runner_url": "https://taskbeacon.github.io/psyflow-web/",
@@ -461,52 +461,52 @@
461461
"slug": "loss-aversion-framing",
462462
"title": "Loss Aversion / Framing Task",
463463
"acquisition": "behavior",
464-
"maturity": "prototype",
464+
"maturity": "smoke_tested",
465465
"release_tag": "0.1.0",
466-
"short_description": "HTML/browser preview of Loss Aversion / Framing Task built with psyflow-web. Trial structure, three-condition offer sampling, timeout handling, and framing-s...",
466+
"short_description": "HTML/browser preview aligned to local T000031-loss-aversion-framing. The web task mirrors the Python block schedule, config-defined offer banks, timing, and ...",
467467
"repo_url": "https://github.com/TaskBeacon/H000031-loss-aversion-framing",
468468
"default_branch": "main",
469469
"download_url": "https://github.com/TaskBeacon/H000031-loss-aversion-framing/archive/refs/heads/main.zip",
470470
"run_url": "https://taskbeacon.github.io/psyflow-web/?task=H000031-loss-aversion-framing",
471-
"last_updated": "2026-03-18T10:58:33+08:00"
471+
"last_updated": "2026-03-19T00:01:25+08:00"
472472
},
473473
{
474474
"directory": "H000032-antisaccade",
475475
"id": "H000032",
476476
"slug": "antisaccade",
477477
"title": "Antisaccade Task",
478478
"acquisition": "behavior",
479-
"maturity": "prototype",
479+
"maturity": "smoke_tested",
480480
"release_tag": "0.1.0",
481-
"short_description": "HTML/browser preview of Antisaccade Task built with psyflow-web. Rule cue, gap, target-side sampling, response-key mapping, and accuracy/RT summary logic are...",
481+
"short_description": "HTML/browser preview of the canonical T000032-antisaccade task built with psyflow-web. The web build keeps the same condition semantics, stage order, timing ...",
482482
"repo_url": "https://github.com/TaskBeacon/H000032-antisaccade",
483483
"default_branch": "main",
484484
"download_url": "https://github.com/TaskBeacon/H000032-antisaccade/archive/refs/heads/main.zip",
485485
"run_url": "https://taskbeacon.github.io/psyflow-web/?task=H000032-antisaccade",
486-
"last_updated": "2026-03-18T11:07:17+08:00"
486+
"last_updated": "2026-03-18T23:23:04+08:00"
487487
},
488488
{
489489
"directory": "H000033-visual-search",
490490
"id": "H000033",
491491
"slug": "visual-search",
492492
"title": "Visual Search Task",
493493
"acquisition": "behavior",
494-
"maturity": "prototype",
494+
"maturity": "smoke_tested",
495495
"release_tag": "0.1.0",
496496
"short_description": "HTML/browser preview of Visual Search Task built with psyflow-web. Feature vs conjunction display generation, present/absent key mapping, and block/session s...",
497497
"repo_url": "https://github.com/TaskBeacon/H000033-visual-search",
498498
"default_branch": "main",
499499
"download_url": "https://github.com/TaskBeacon/H000033-visual-search/archive/refs/heads/main.zip",
500500
"run_url": "https://taskbeacon.github.io/psyflow-web/?task=H000033-visual-search",
501-
"last_updated": "2026-03-18T11:18:21+08:00"
501+
"last_updated": "2026-03-18T22:18:12+08:00"
502502
},
503503
{
504504
"directory": "H000034-cyberball",
505505
"id": "H000034",
506506
"slug": "cyberball",
507507
"title": "Cyberball Task",
508508
"acquisition": "behavior",
509-
"maturity": "prototype",
509+
"maturity": "smoke_tested",
510510
"release_tag": "0.1.0",
511511
"short_description": "HTML/browser preview of Cyberball Task built with psyflow-web. Three-player toss flow, inclusion/exclusion block policy, shared ball-holder state, and block/...",
512512
"repo_url": "https://github.com/TaskBeacon/H000034-cyberball",
@@ -528,7 +528,7 @@
528528
"default_branch": "main",
529529
"download_url": "https://github.com/TaskBeacon/H000035-sternberg-working-memory/archive/refs/heads/main.zip",
530530
"run_url": "https://taskbeacon.github.io/psyflow-web/?task=H000035-sternberg-working-memory",
531-
"last_updated": "2026-03-18T11:39:15+08:00"
531+
"last_updated": "2026-03-18T19:48:46+08:00"
532532
}
533533
]
534534
}

src/core/StimBank.ts

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
import type { Resolvable, RuntimeView, StimRef, StimSpec, TrialSnapshot } from "./types";
22

3-
function formatNumber(value: unknown, precision: string | undefined): string {
4-
if (precision && typeof value === "number") {
5-
const digits = Number(precision.replace(".",""));
6-
if (Number.isFinite(digits)) {
7-
return value.toFixed(digits);
8-
}
3+
function formatNumber(
4+
value: unknown,
5+
precision: string | undefined,
6+
kind: "f" | "%" | undefined
7+
): string {
8+
if (typeof value !== "number") {
9+
return String(value ?? "");
10+
}
11+
const digits = precision ? Number(precision.replace(".", "")) : 0;
12+
const safeDigits = Number.isFinite(digits) ? digits : 0;
13+
if (kind === "%") {
14+
return `${(value * 100).toFixed(safeDigits)}%`;
915
}
10-
return String(value ?? "");
16+
return value.toFixed(safeDigits);
1117
}
1218

1319
function formatTemplate(template: string, vars: Record<string, unknown>): string {
14-
return template.replace(/\{([a-zA-Z0-9_]+)(?::(\.\d+f))?\}/g, (_, key: string, precision?: string) => {
15-
return formatNumber(vars[key], precision);
16-
});
20+
return template.replace(
21+
/\{([a-zA-Z0-9_]+)(?::(\.\d+)?([f%]))?\}/g,
22+
(_, key: string, precision?: string, kind?: "f" | "%") => {
23+
return formatNumber(vars[key], precision, kind);
24+
}
25+
);
1726
}
1827

1928
export class StimBank {

src/generated/taskManifest.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -504,14 +504,14 @@ export const taskManifest: Record<string, RunnerTaskManifestEntry> = {
504504
slug: "loss-aversion-framing",
505505
title: "Loss Aversion / Framing Task",
506506
acquisition: "behavior",
507-
maturity: "prototype",
507+
maturity: "smoke_tested",
508508
release_tag: "0.1.0",
509-
short_description: "HTML/browser preview of Loss Aversion / Framing Task built with psyflow-web. Trial structure, three-condition offer sampling, timeout handling, and framing-s...",
509+
short_description: "HTML/browser preview aligned to local T000031-loss-aversion-framing. The web task mirrors the Python block schedule, config-defined offer banks, timing, and ...",
510510
repo_url: "https://github.com/TaskBeacon/H000031-loss-aversion-framing",
511511
default_branch: "main",
512512
download_url: "https://github.com/TaskBeacon/H000031-loss-aversion-framing/archive/refs/heads/main.zip",
513513
run_url: "https://taskbeacon.github.io/psyflow-web/?task=H000031-loss-aversion-framing",
514-
last_updated: "2026-03-18T10:58:33+08:00",
514+
last_updated: "2026-03-19T00:01:25+08:00",
515515
importTask: () => import("../../../H000031-loss-aversion-framing/main")
516516
},
517517
"H000032-antisaccade": {
@@ -520,14 +520,14 @@ export const taskManifest: Record<string, RunnerTaskManifestEntry> = {
520520
slug: "antisaccade",
521521
title: "Antisaccade Task",
522522
acquisition: "behavior",
523-
maturity: "prototype",
523+
maturity: "smoke_tested",
524524
release_tag: "0.1.0",
525-
short_description: "HTML/browser preview of Antisaccade Task built with psyflow-web. Rule cue, gap, target-side sampling, response-key mapping, and accuracy/RT summary logic are...",
525+
short_description: "HTML/browser preview of the canonical T000032-antisaccade task built with psyflow-web. The web build keeps the same condition semantics, stage order, timing ...",
526526
repo_url: "https://github.com/TaskBeacon/H000032-antisaccade",
527527
default_branch: "main",
528528
download_url: "https://github.com/TaskBeacon/H000032-antisaccade/archive/refs/heads/main.zip",
529529
run_url: "https://taskbeacon.github.io/psyflow-web/?task=H000032-antisaccade",
530-
last_updated: "2026-03-18T11:07:17+08:00",
530+
last_updated: "2026-03-18T23:23:04+08:00",
531531
importTask: () => import("../../../H000032-antisaccade/main")
532532
},
533533
"H000033-visual-search": {
@@ -536,14 +536,14 @@ export const taskManifest: Record<string, RunnerTaskManifestEntry> = {
536536
slug: "visual-search",
537537
title: "Visual Search Task",
538538
acquisition: "behavior",
539-
maturity: "prototype",
539+
maturity: "smoke_tested",
540540
release_tag: "0.1.0",
541541
short_description: "HTML/browser preview of Visual Search Task built with psyflow-web. Feature vs conjunction display generation, present/absent key mapping, and block/session s...",
542542
repo_url: "https://github.com/TaskBeacon/H000033-visual-search",
543543
default_branch: "main",
544544
download_url: "https://github.com/TaskBeacon/H000033-visual-search/archive/refs/heads/main.zip",
545545
run_url: "https://taskbeacon.github.io/psyflow-web/?task=H000033-visual-search",
546-
last_updated: "2026-03-18T11:18:21+08:00",
546+
last_updated: "2026-03-18T22:18:12+08:00",
547547
importTask: () => import("../../../H000033-visual-search/main")
548548
},
549549
"H000034-cyberball": {
@@ -552,7 +552,7 @@ export const taskManifest: Record<string, RunnerTaskManifestEntry> = {
552552
slug: "cyberball",
553553
title: "Cyberball Task",
554554
acquisition: "behavior",
555-
maturity: "prototype",
555+
maturity: "smoke_tested",
556556
release_tag: "0.1.0",
557557
short_description: "HTML/browser preview of Cyberball Task built with psyflow-web. Three-player toss flow, inclusion/exclusion block policy, shared ball-holder state, and block/...",
558558
repo_url: "https://github.com/TaskBeacon/H000034-cyberball",
@@ -575,7 +575,7 @@ export const taskManifest: Record<string, RunnerTaskManifestEntry> = {
575575
default_branch: "main",
576576
download_url: "https://github.com/TaskBeacon/H000035-sternberg-working-memory/archive/refs/heads/main.zip",
577577
run_url: "https://taskbeacon.github.io/psyflow-web/?task=H000035-sternberg-working-memory",
578-
last_updated: "2026-03-18T11:39:15+08:00",
578+
last_updated: "2026-03-18T19:48:46+08:00",
579579
importTask: () => import("../../../H000035-sternberg-working-memory/main")
580580
},
581581
};

0 commit comments

Comments
 (0)