diff --git a/text11.txt b/text11.txt index aed7867..926f91a 100644 --- a/text11.txt +++ b/text11.txt @@ -1633,3 +1633,128 @@ host_wasm_opfs_browser_smokes=ok 继续推进实质 UI/API surface。下一批建议把 `ui-shell.js` 中用于 launcher 的入口列表再封装成 `getVisibleIniPanelEntries()`,让页面不需要知道 manifest 复制语义;仍保持只读,不新增控制 按钮,不解析 G-code。 + +二十一、2026-06-14 继续执行记录:INI panel visible entries helper + +本轮按“加快实质性推进”在 `ui-shell.js` 增加 launcher-facing 的可见入口 helper,让页面和 +文档使用 `getVisibleIniPanelEntries()`,不再直接依赖 manifest 复制语义。 + +完成内容: + +- `wasm-port/runtime/ui/ini-panel/ui-shell.js` 新增 `getVisibleIniPanelEntries()`; +- `getVisibleIniPanelEntries()` 返回 launcher 可见入口列表; +- `wasm-port/runtime/ui/ini-panel/launch.html` 改为调用 `getVisibleIniPanelEntries()`; +- `wasm-port/tests/browser/ini_panel_launch_smoke.html` 改为验证 visible entries; +- `wasm-port/tests/ui/node/verify_ini_panel_ui_shell.mjs` 覆盖 visible entries 与复制语义; +- `wasm-port/docs/panel-entry.md` 改为以 `getVisibleIniPanelEntries()` 作为入口列表 API; +- `wasm-port/tests/ui/node/verify_ini_panel_entry_docs.mjs` 同步验证文档和 visible entries; +- 未新增控制按钮; +- 未解析 G-code; +- 未解释 canonical events; +- 未改变 OPFS/session persistence、LinuxCNC interpreter、tool、parameter、planner 或 + LinuxCNC-owned runtime semantics。 + +验证已通过: + +```bash +git diff --check +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 +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_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 +``` + +下一步建议: + +继续推进 UI/API surface,但避免纯文档循环。下一批建议把 `getVisibleIniPanelEntries()` 用到 +更多外层 shell 消费示例,或新增一个小型 Node helper 生成 launcher link view-model;仍保持 +只读,不新增控制按钮,不解析 G-code。 + +二十二、2026-06-15 继续执行记录:INI panel launcher link view-model helper + +本轮按“加快实质性推进”继续推进 UI/API surface,在 shell 层新增 launcher link +view-model helper,让 launcher 页面不直接读取 manifest 字段名。 + +完成内容: + +- `wasm-port/runtime/ui/ini-panel/ui-shell.js` 新增 + `createIniPanelLauncherLinkViewModel()`; +- launcher link view-model 输出 `entryId`、`href`、`label`,作为外层 shell 可直接渲染的 + 链接模型; +- `wasm-port/runtime/ui/ini-panel/launch.html` 改为调用 + `createIniPanelLauncherLinkViewModel()` 渲染链接; +- `wasm-port/tests/browser/ini_panel_launch_smoke.html` 覆盖 launcher link view-model; +- `wasm-port/tests/ui/node/verify_ini_panel_ui_shell.mjs` 覆盖 view-model 内容与复制语义; +- `wasm-port/tests/ui/node/verify_ini_panel_entry_docs.mjs` 同步校验文档和 shell helper; +- `wasm-port/docs/panel-entry.md` 记录 launcher link view-model API; +- 未新增控制按钮; +- 未解析 G-code; +- 未解释 canonical events; +- 未改变 OPFS/session persistence、LinuxCNC interpreter、tool、parameter、planner 或 + LinuxCNC-owned runtime semantics。 + +验证已通过: + +```bash +git diff --check +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/browser/verify_ini_panel_browser.sh +wasm-port/tests/ui/node/verify_ui_node_smokes.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 +SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh +wasm-port/tests/host/verify_host_smokes.sh +``` + +关键输出: + +```text +ini_panel_ui_shell_node_smoke=ok +ini_panel_entry_docs_node_smoke=ok +browser_ini_opfs_smoke=ok +browser_ini_control_page_smoke=ok +browser_ini_launch_smoke=ok +ui_node_smokes=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 +browser_interp_smoke=ok +host_wasm_opfs_browser_smokes=ok +``` + +下一步建议: + +继续推进 UI/API surface 的可复用边界。下一批建议新增一个 +`createIniPanelShellViewModel()`,把 launcher links、可用页面和 control-page helper 暴露为 +单一 shell model,供外层应用一次性挂载;仍保持只读,不新增控制按钮,不解析 G-code。 diff --git a/wasm-port/docs/panel-entry.md b/wasm-port/docs/panel-entry.md index de02f89..f42453c 100644 --- a/wasm-port/docs/panel-entry.md +++ b/wasm-port/docs/panel-entry.md @@ -10,8 +10,9 @@ control view: ```js import { INI_PANEL_ENTRIES, + createIniPanelLauncherLinkViewModel, getIniPanelEntryByHref, - getIniPanelEntryManifest, + getVisibleIniPanelEntries, createMachineSessionControlPageController, renderMachineSessionControlView, } from "../runtime/ui/ini-panel/ui-shell.js"; @@ -28,15 +29,19 @@ controller, and the control-view renderer. It does not implement CNC behavior. | Edit and run | `runtime/ui/ini-panel/index.html` | Editable INI panel and existing run workflow surface. | | Read-only control view | `runtime/ui/ini-panel/control-page.html` | Read-only control view backed by the panel API. | -## Entry Manifest +## Visible Entries -The visible launch entries come from `getIniPanelEntryManifest()`: +The visible launch entries come from `getVisibleIniPanelEntries()`: | Entry id | Href | Title | | --- | --- | --- | | `edit-run` | `./index.html` | Open edit and run panel | | `control-view` | `./control-page.html` | Open read-only control view | +Launcher pages can render links from `createIniPanelLauncherLinkViewModel()` +without reading manifest field names directly. Each item has `entryId`, `href`, +and `label`. + ## Boundary The entry shell only links pages and renders already-observed panel state. It diff --git a/wasm-port/runtime/ui/ini-panel/launch.html b/wasm-port/runtime/ui/ini-panel/launch.html index 8a7c9c0..8c5f2f1 100644 --- a/wasm-port/runtime/ui/ini-panel/launch.html +++ b/wasm-port/runtime/ui/ini-panel/launch.html @@ -73,16 +73,16 @@ diff --git a/wasm-port/runtime/ui/ini-panel/ui-shell.js b/wasm-port/runtime/ui/ini-panel/ui-shell.js index 3e9e950..88967bd 100644 --- a/wasm-port/runtime/ui/ini-panel/ui-shell.js +++ b/wasm-port/runtime/ui/ini-panel/ui-shell.js @@ -1,3 +1,8 @@ +import { + INI_PANEL_ENTRIES, + getIniPanelEntryByHref, + getIniPanelEntryManifest, +} from "./entry-manifest.js"; export { INI_PANEL_ENTRIES, getIniPanelEntryByHref, @@ -9,3 +14,15 @@ export { export { renderMachineSessionControlView, } from "./control-view-renderer.js"; + +export function getVisibleIniPanelEntries() { + return getIniPanelEntryManifest(); +} + +export function createIniPanelLauncherLinkViewModel(entries = getVisibleIniPanelEntries()) { + return entries.map(({ id, href, title }) => ({ + entryId: id, + href, + label: title, + })); +} diff --git a/wasm-port/tests/browser/ini_panel_launch_smoke.html b/wasm-port/tests/browser/ini_panel_launch_smoke.html index 2dd8812..1ce7b37 100644 --- a/wasm-port/tests/browser/ini_panel_launch_smoke.html +++ b/wasm-port/tests/browser/ini_panel_launch_smoke.html @@ -8,8 +8,9 @@
running