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
+11
View File
@@ -76,6 +76,17 @@ function VisualBlock({
w.document.open()
w.document.write(html)
w.document.close()
// Give the iframe time to initialize, then send the render message
setTimeout(() => {
w.postMessage(
{
jsonrpc: '2.0',
method: 'render',
params: { code: payload.code, data: payload.data ?? {} },
},
'*'
)
}, 500)
})
.catch(() => {
w.close()