|
| 1 | +# BUILD_PR_TOOL_HOST_SEAMLESS_IFRAME_PARITY |
| 2 | + |
| 3 | +## Purpose |
| 4 | +Refactor Tool Host so hosted tool presentation is nearly identical to direct-launch presentation, with host-only controls/help contained inside the collapsible imported section. |
| 5 | + |
| 6 | +## Scope |
| 7 | +- Keep Tool Host HTML minimal. |
| 8 | +- Move host-specific controls into the collapsible imported section. |
| 9 | +- Remove host chrome wrappers around hosted iframe workspace. |
| 10 | +- Keep hosted tool workspace full-width/full-height in normal page flow. |
| 11 | +- Preserve `Open In Host` and direct launch behavior. |
| 12 | +- Enforce no inline styles, no embedded style blocks, and no JS style-string injection. |
| 13 | + |
| 14 | +## Exact Targets |
| 15 | +- `tools/Tool Host/index.html` |
| 16 | +- `tools/Tool Host/main.js` |
| 17 | +- `tools/Tool Host/toolHost.css` (new) |
| 18 | +- `tools/shared/toolHostRuntime.js` |
| 19 | +- `docs/dev/codex_commands.md` |
| 20 | +- `docs/dev/commit_comment.txt` |
| 21 | +- `docs/dev/reports/validation_checklist.txt` |
| 22 | + |
| 23 | +## Implementation Status (Execution-Backed) |
| 24 | +- `[x]` Host controls moved into collapsible imported section in `tools/Tool Host/index.html`. |
| 25 | +- `[x]` Host workspace simplified to iframe mount surface with no panel wrapper chrome. |
| 26 | +- `[x]` Runtime iframe style injection removed from `tools/shared/toolHostRuntime.js`. |
| 27 | +- `[x]` Link disabled state moved from JS inline styles to CSS class in `tools/Tool Host/main.js` + `tools/Tool Host/toolHost.css`. |
| 28 | +- `[x]` No inline style attributes in Tool Host HTML target file. |
| 29 | + |
| 30 | +## Validation Executed |
| 31 | +1. `rg -n "style\." "tools/Tool Host/main.js" "tools/shared/toolHostRuntime.js"` |
| 32 | + - Result: no matches. |
| 33 | +2. `rg -n "<style|style=" "tools/Tool Host/index.html"` |
| 34 | + - Result: no matches. |
| 35 | +3. `rg -n "data-tool-host-(select|state-input|mount|prev|next|unmount|standalone|switch-meta|status|current-label|mount-container)" "tools/Tool Host/index.html"` |
| 36 | + - Result: expected host control and mount selectors present. |
| 37 | + |
| 38 | +## Notes |
| 39 | +- No color/token changes were introduced. |
| 40 | +- No per-tool hacks were introduced. |
| 41 | +- Tool Host-specific UI remains inside the collapsible section; collapsing it leaves a near-direct hosted surface. |
0 commit comments