From ef4769b4b434faebaafb5642f5100e207f4e42a0 Mon Sep 17 00:00:00 2001 From: wangdequan Date: Sun, 14 Jun 2026 23:36:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E8=BF=9B=20INI=20=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=20entry=20doc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- text11.txt | 61 +++++++++++++++++++ wasm-port/docs/panel-entry.md | 42 +++++++++++++ wasm-port/docs/ui-panel-state-summary.md | 1 + .../ui/node/verify_ini_panel_entry_docs.mjs | 24 ++++++++ .../ui/node/verify_ini_panel_entry_docs.sh | 6 ++ .../tests/ui/node/verify_ui_node_smokes.sh | 1 + 6 files changed, 135 insertions(+) create mode 100644 wasm-port/docs/panel-entry.md create mode 100644 wasm-port/tests/ui/node/verify_ini_panel_entry_docs.mjs create mode 100755 wasm-port/tests/ui/node/verify_ini_panel_entry_docs.sh diff --git a/text11.txt b/text11.txt index f5f13c4..9a6fca8 100644 --- a/text11.txt +++ b/text11.txt @@ -1509,3 +1509,64 @@ host_wasm_opfs_browser_smokes=ok `ui-shell.js`、`launch.html`、`control-page.html` 三者关系和最小调用方式,或者直接把 launcher 页面改成从 `ui-shell.js` 导出更稳定的可见入口列表;仍保持只读,不新增控制按钮, 不解析 G-code。 + +十九、2026-06-14 继续执行记录:INI panel entry doc + +本轮按“加快实质性推进”新增极短的入口文档,只保留 `ui-shell.js`、launcher、 +control-page 的关系和最小调用方式,并把文档内容纳入 Node smoke。 + +完成内容: + +- 新增 `wasm-port/docs/panel-entry.md`; +- 文档只保留: + - `ui-shell.js` 的 shell-facing import; + - `launch.html`、`index.html`、`control-page.html` 的最小关系表; + - entry manifest 表; + - boundary 说明; +- 新增 `wasm-port/tests/ui/node/verify_ini_panel_entry_docs.mjs`; +- 新增 `wasm-port/tests/ui/node/verify_ini_panel_entry_docs.sh`; +- `wasm-port/tests/ui/node/verify_ui_node_smokes.sh` 纳入 entry docs node smoke; +- `wasm-port/docs/ui-panel-state-summary.md` 补充入口文档指向; +- 未新增控制按钮; +- 未解析 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_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_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-shell.js` 直接成为 launcher 页面和 docs 的唯一入口 +来源,或者再补一个更短的 `ui-shell.md` 汇总 shell、launcher、control-page 三者关系;仍保持 +只读,不新增控制按钮,不解析 G-code。 diff --git a/wasm-port/docs/panel-entry.md b/wasm-port/docs/panel-entry.md new file mode 100644 index 0000000..d620b1e --- /dev/null +++ b/wasm-port/docs/panel-entry.md @@ -0,0 +1,42 @@ +# INI Panel Entry + +This page is the short entry map for the INI panel UI shell. + +## Shell Module + +Use the shell-facing module when an outer UI needs entry links or a read-only +control view: + +```js +import { + getIniPanelEntryManifest, + createMachineSessionControlPageController, + renderMachineSessionControlView, +} from "../runtime/ui/ini-panel/ui-shell.js"; +``` + +`ui-shell.js` re-exports the entry manifest, the read-only control-page +controller, and the control-view renderer. It does not implement CNC behavior. + +## Pages + +| Page | Path | Role | +| --- | --- | --- | +| Launch | `runtime/ui/ini-panel/launch.html` | Read-only entry page for available panel surfaces. | +| 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 + +The visible launch entries come from `getIniPanelEntryManifest()`: + +| Entry id | Href | Title | +| --- | --- | --- | +| `edit-run` | `./index.html` | Open edit and run panel | +| `control-view` | `./control-page.html` | Open read-only control view | + +## Boundary + +The entry shell only links pages and renders already-observed panel state. It +does not parse G-code, infer canonical events, or implement LinuxCNC-owned +tool, parameter, planner, or kinematics behavior. diff --git a/wasm-port/docs/ui-panel-state-summary.md b/wasm-port/docs/ui-panel-state-summary.md index 6b0e55d..c5ee1fa 100644 --- a/wasm-port/docs/ui-panel-state-summary.md +++ b/wasm-port/docs/ui-panel-state-summary.md @@ -36,6 +36,7 @@ For a light navigation entry, open `runtime/ui/ini-panel/launch.html`. Its entry list is defined in `runtime/ui/ini-panel/entry-manifest.js`. For a single shell-facing import, use `runtime/ui/ini-panel/ui-shell.js`, which re-exports the entry manifest, control page controller, and control view renderer. +For the short page/entry map, see `docs/panel-entry.md`. ## `createIniPanelStateSummary(input)` diff --git a/wasm-port/tests/ui/node/verify_ini_panel_entry_docs.mjs b/wasm-port/tests/ui/node/verify_ini_panel_entry_docs.mjs new file mode 100644 index 0000000..9652439 --- /dev/null +++ b/wasm-port/tests/ui/node/verify_ini_panel_entry_docs.mjs @@ -0,0 +1,24 @@ +import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; +import { fileURLToPath } from "node:url"; +import { dirname, resolve } from "node:path"; + +import { + getIniPanelEntryManifest, +} from "../../../runtime/ui/ini-panel/ui-shell.js"; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const root = resolve(__dirname, "../../.."); +const docText = readFileSync(resolve(root, "docs/panel-entry.md"), "utf8"); + +assert.match(docText, /runtime\/ui\/ini-panel\/ui-shell\.js/); +assert.match(docText, /createMachineSessionControlPageController/); +assert.match(docText, /renderMachineSessionControlView/); +assert.match(docText, /runtime\/ui\/ini-panel\/launch\.html/); +assert.match(docText, /runtime\/ui\/ini-panel\/control-page\.html/); + +for (const entry of getIniPanelEntryManifest()) { + assert.match(docText, new RegExp(`\\| \`${entry.id}\` \\| \`${entry.href.replace(".", "\\.")}\` \\| ${entry.title} \\|`)); +} + +console.log("ini_panel_entry_docs_node_smoke=ok"); diff --git a/wasm-port/tests/ui/node/verify_ini_panel_entry_docs.sh b/wasm-port/tests/ui/node/verify_ini_panel_entry_docs.sh new file mode 100755 index 0000000..1fc63db --- /dev/null +++ b/wasm-port/tests/ui/node/verify_ini_panel_entry_docs.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "$0")/../../.." && pwd)" + +node "$ROOT_DIR/tests/ui/node/verify_ini_panel_entry_docs.mjs" diff --git a/wasm-port/tests/ui/node/verify_ui_node_smokes.sh b/wasm-port/tests/ui/node/verify_ui_node_smokes.sh index 863ea9e..cbedd09 100755 --- a/wasm-port/tests/ui/node/verify_ui_node_smokes.sh +++ b/wasm-port/tests/ui/node/verify_ui_node_smokes.sh @@ -12,5 +12,6 @@ ROOT_DIR="$(cd "$(dirname "$0")/../../.." && pwd)" "$ROOT_DIR/tests/ui/node/verify_ini_panel_control_page_controller.sh" "$ROOT_DIR/tests/ui/node/verify_ini_panel_entry_manifest.sh" "$ROOT_DIR/tests/ui/node/verify_ini_panel_ui_shell.sh" +"$ROOT_DIR/tests/ui/node/verify_ini_panel_entry_docs.sh" echo "ui_node_smokes=ok"