fix: resolve code review issues — schema mismatch, test fixes, pop-out render

- Fix a2ui-format.md schema to match renderer: rename 'options' → 'filters' in
  filters block, replace 'active: boolean' with 'value: string' in filter options,
  update form select options from string[] to {label, value}[] objects (Critical #1)
- Fix 3 failing tests in test_researcher_agent.sh to use @mention paths without .md
  extension (Important #2)
- Complete pop-out feature in VisualBlock.handlePopOut() by posting render message
  to popup window after 500ms initialization delay (Important #3)
- Update test_context_files.sh to match new a2ui-format.md schema (filters array
  key check, value field check)
This commit is contained in:
Ken
2026-05-26 20:54:58 +00:00
parent 92df88975c
commit 2c3cfdbedc
4 changed files with 30 additions and 15 deletions
+14 -10
View File
@@ -28,20 +28,20 @@ Renders a row of toggle chips. Use for quick category or attribute filtering.
```a2ui
{
"type": "filters",
"options": [
{ "label": "Toyota", "active": true },
{ "label": "Honda", "active": false },
{ "label": "Hyundai", "active": false },
{ "label": "Under $5K", "active": false }
"filters": [
{ "label": "Toyota", "value": "toyota" },
{ "label": "Honda", "value": "honda" },
{ "label": "Hyundai", "value": "hyundai" },
{ "label": "Under $5K", "value": "under_5k" }
]
}
```
| Field | Type | Description |
|-------|------|-------------|
| `options` | array | List of filter chips |
| `options[].label` | string | Display text for the chip |
| `options[].active` | boolean | Whether the chip is pre-selected |
| `filters` | array | List of filter chips |
| `filters[].label` | string | Display text for the chip |
| `filters[].value` | string | Machine-readable identifier for the chip |
---
@@ -113,7 +113,11 @@ configure a follow-up action.
"name": "fuel_type",
"type": "select",
"label": "Fuel Type",
"options": ["hybrid", "electric", "any"]
"options": [
{ "label": "Hybrid", "value": "hybrid" },
{ "label": "Electric", "value": "electric" },
{ "label": "Any", "value": "any" }
]
}
],
"submitLabel": "Search"
@@ -127,7 +131,7 @@ configure a follow-up action.
| `fields[].type` | string | `"number"`, `"text"`, `"select"` |
| `fields[].label` | string | Human-readable label |
| `fields[].value` | any | Default value (for `number`/`text` fields) |
| `fields[].options` | string[] | Choice list (for `select` fields) |
| `fields[].options` | `{label, value}[]` | Choice list (for `select` fields); each item has a display `label` and machine-readable `value` |
| `submitLabel` | string | Text on the submit button |
---