You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Single `<script type="module">` importing from `js/arena-configs.js`
444
-
- Custom YAML parser (`simpleYAMLParse`) — no external dependency required
445
-
- Data model: `experiment` object with `experiment_info`, `arena_info`, `experiment_structure`, phases, and `conditions[]`
446
-
447
-
### YAML Export
448
-
- Generates protocol v1 with `trialParams` command name
449
-
- Empty pattern fields export as `allOff` controller command
450
-
- Phase structure: one `trialParams` command + one `wait` command per phase
451
-
- Conditions wrapped in `block.conditions[].commands[]`
441
+
### Architecture (v0.6 — 2026-04-01)
442
+
- 3-zone layout: settings panel (280px left), editor with tab bar (flex right), timeline (bottom strip)
443
+
- Single `<script type="module">` importing from `js/arena-configs.js`, `js/protocol-yaml.js`, `js/plugin-registry.js`
444
+
- Data model: `experiment` object with `experiment_info`, `arena_info`, `rig_path`, `plugins[]`, `experiment_structure`, phases with `commands[]`, and `conditions[]` with `commands[]`
445
+
446
+
### Shared Modules
447
+
-**`js/protocol-yaml.js`** — YAML parser (`simpleYAMLParse` with inline comment stripping), v1/v2 generators, string helpers. Dual-export (window.ProtocolYAML + ES6 module). Used by HTML, both test files.
- Generates protocol v2 via `generateV2Protocol()` from `js/protocol-yaml.js`
475
+
-`rig:` field replaces inline `arena_info`
476
+
-`plugins:` section lists enabled plugins with class/config
477
+
- Conditions export full command arrays including plugin commands with params
478
+
- Phases export command arrays directly
479
+
480
+
### Editor Tabs
481
+
Three tabs in the right panel, all views of the same data model:
482
+
1.**Visual** — Command card editor with color-coded cards (green=controller, gray=wait, blue=plugin), inline field editing, "Add Command" dropdown from plugin registry
483
+
2.**Table** — Spreadsheet view with collapsible sections (pretrial, conditions with ITI, posttrial), type badges, param display
484
+
3.**Timeline** — SVG multi-lane visualization per condition: controller spans, plugin event markers, wait bars, time axis. Read-only with hover tooltips.
452
485
453
486
### Key Implementation Notes
454
-
-**Must use `<script type="module">`** to import `arena-configs.js` (bare `export` at end breaks regular `<script>` tags — this caused the initial "+ Add Condition" bug)
487
+
-**Must use `<script type="module">`** to import shared modules
0 commit comments