推进 INI 面板 shell integration readiness helper

This commit is contained in:
2026-06-15 07:48:47 +08:00
parent 7b17603601
commit 1f9a8c33b0
9 changed files with 283 additions and 2 deletions

View File

@@ -1668,3 +1668,98 @@ host_wasm_opfs_browser_smokes=ok
(例如 `createIniPanelShellIntegrationReadiness()`),用 integration manifest、launch manifest 和
control-page manifest 生成外部 shell 可直接展示/拦截的 readiness 状态;仍保持只读,不新增控制
按钮,不解析 G-code。
二十一、2026-06-15 继续执行记录INI panel shell integration readiness helper
本轮按“第一原则:加快实质性推进”继续推进 OPFS/session persistence 相关外部 shell 接入能力,
新增只读 shell integration readiness helper让外部 shell 能在挂载 embedded control page 前判断
integration、launch 与 control-page manifest 是否都可消费。
完成内容:
- `wasm-port/runtime/ui/ini-panel/ui-shell.js` 新增
`createIniPanelShellIntegrationReadiness()`
- readiness helper 从 shell integration manifest 派生:
- `phase: "ready" | "blocked"`
- `ready`
- `checks.integrationManifestSupported`
- `checks.launchApiManifestSupported`
- `checks.controlPageApiManifestSupported`
- `checks.launchCompatibility`
- `checks.controlPageCompatibility`
- `missing`
- `counts.pages`
- `counts.launcherLinks`
- `counts.launchMethods`
- `counts.controlPageMethods`
- `counts.persistenceCapabilities`
- `apiNames.integration/launch/controlPage`
- `createIniPanelShellViewModel()` 新增:
- `shellIntegrationReadiness`
- `createShellIntegrationReadiness`
- `createIniPanelLaunchApiManifest().methods` 新增 `getShellIntegrationReadiness`
- `launch.html` 的 `window.linuxCncIniPanelLaunchApi` 新增真实 browser 入口
`getShellIntegrationReadiness()`
- `verify_ini_panel_shell_integration_manifest.mjs` 覆盖:
- ready 正常状态;
- compatibility blocked 状态;
- malformed manifest 的 blocked 状态;
- counts 与 API names
- browser/doc 暴露点;
- `ini_panel_launch_smoke.html` 在真实 launch iframe 中校验:
- `getShellIntegrationReadiness()` 存在;
- readiness `ready === true`
- persistence capability count
- missing checks 为空;
- `verify_ini_panel_launch_api_manifest.mjs`、`verify_ini_panel_ui_shell.mjs`、
`verify_ini_panel_entry_docs.mjs` 与 `docs/panel-entry.md` 同步记录和校验;
- 未新增控制按钮;
- 未解析 G-code
- 未解释 canonical events
- 未访问 OPFS 或启动额外 iframe
- 未改变 OPFS/session persistence、LinuxCNC interpreter、tool、parameter、planner 或
LinuxCNC-owned runtime semantics。
验证已通过:
```bash
git diff --check
wasm-port/tests/ui/node/verify_ini_panel_shell_integration_manifest.sh
wasm-port/tests/ui/node/verify_ini_panel_launch_api_manifest.sh
wasm-port/tests/ui/node/verify_ini_panel_ui_shell.sh
wasm-port/tests/ui/node/verify_ini_panel_entry_docs.sh
wasm-port/tests/ui/node/verify_ui_node_smokes.sh
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh
wasm-port/tools/verify_vendor_sync.sh
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
wasm-port/tests/host/verify_host_smokes.sh
```
关键输出:
```text
ini_panel_shell_integration_manifest_node_smoke=ok
ini_panel_launch_api_manifest_node_smoke=ok
ini_panel_ui_shell_node_smoke=ok
ini_panel_entry_docs_node_smoke=ok
ui_node_smokes=ok
browser_ini_opfs_smoke=ok
browser_ini_control_page_smoke=ok
browser_ini_launch_smoke=ok
vendor sync up to date
standalone CNC semantics guard complete
interp_wasm_node_smoke=ok
sim_configs_wasm_node_inventory_executed=28
sim_configs_wasm_node_inventory_passed=28
sim_configs_wasm_node_inventory_skipped=131
sim_configs_wasm_node_inventory_unexpected_fail=0
host_wasm_opfs_browser_smokes=ok
```
下一步建议:
继续推进 browser/UI workflow。下一批建议把 shell integration readiness 接到 control-page 或 launch
的外部 shell smoke 中,形成“读取 integration manifest -> readiness gate -> 打开 control page ->
读取 readonly status”的端到端只读接入 workflow仍保持只读不新增控制按钮不解析 G-code。