Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions SCENARIO_EDITOR_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,14 @@
- `apps/scenario-editor/` (from Stage 3)

### Requirements (Task Checklist)
- [ ] **4.1** Add objective editor for predicate DSL (`metric`, `all`, `any`, `not`).
- [ ] **4.2** Add event/action editor for declarative scripts (`atTick`, `everyTicks`, actions union).
- [ ] **4.3** Add behavior profile assignment UI with closed profile validation.
- [ ] **4.4** Add authoring-time semantic validation (unknown metric, invalid op/type combos, empty `all/any`, etc.).
- [ ] **4.5** Integrate edited scripts/objectives into export pipeline.
- [x] **4.1** Add objective editor for predicate DSL (`metric`, `all`, `any`, `not`).
- [x] **4.2** Add event/action editor for declarative scripts (`atTick`, `everyTicks`, actions union).
- [x] **4.3** Add behavior profile assignment UI with closed profile validation.
- [x] **4.4** Add authoring-time semantic validation (unknown metric, invalid op/type combos, empty `all/any`, etc.).
- [x] **4.5** Integrate edited scripts/objectives into export pipeline.

Stage 4.3 repair note: behavior profile assignment now uses closed-key selection UI with explicit invalid-key diagnostics tied to the runtime profile registry.
Stage 4.4 repair note: semantic validators now reject predicate/script kind-field mismatches (invalid type combos) in addition to unknown metrics/operators and empty composite nodes.

### Good Tests
- UI-driven serialization tests from form model -> valid script/objective JSON.
Expand Down
1 change: 1 addition & 0 deletions apps/scenario-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"dependencies": {
"@city/classicyui": "workspace:*",
"@city/scenario-core": "workspace:*",
"@city/scenario-runtime": "workspace:*",
"@tanstack/react-router": "1.157.16",
"react": "19.2.4",
"react-dom": "19.2.4"
Expand Down
11 changes: 10 additions & 1 deletion apps/scenario-editor/src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function RootRouteLayout() {
return (
<ScenarioEditorStateProvider>
<div className="editor-shell">
<header className="editor-header">Scenario Editor MVP</header>
<header className="editor-header">Scenario Editor</header>
<EditorTopNav />
<main className="editor-main">
<Outlet />
Expand Down Expand Up @@ -76,5 +76,14 @@ function getScenarioEditorWorkbenchViewLabel(view: ScenarioEditorWorkbenchView):
if (view === 'map') {
return 'Map';
}
if (view === 'objective') {
return 'Objective';
}
if (view === 'script') {
return 'Scripts';
}
if (view === 'behavior') {
return 'Behavior';
}
return 'Export';
}
Loading