推进 INI 面板 entry doc
This commit is contained in:
61
text11.txt
61
text11.txt
@@ -1509,3 +1509,64 @@ host_wasm_opfs_browser_smokes=ok
|
|||||||
`ui-shell.js`、`launch.html`、`control-page.html` 三者关系和最小调用方式,或者直接把
|
`ui-shell.js`、`launch.html`、`control-page.html` 三者关系和最小调用方式,或者直接把
|
||||||
launcher 页面改成从 `ui-shell.js` 导出更稳定的可见入口列表;仍保持只读,不新增控制按钮,
|
launcher 页面改成从 `ui-shell.js` 导出更稳定的可见入口列表;仍保持只读,不新增控制按钮,
|
||||||
不解析 G-code。
|
不解析 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。
|
||||||
|
|||||||
42
wasm-port/docs/panel-entry.md
Normal file
42
wasm-port/docs/panel-entry.md
Normal file
@@ -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.
|
||||||
@@ -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`.
|
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
|
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.
|
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)`
|
## `createIniPanelStateSummary(input)`
|
||||||
|
|
||||||
|
|||||||
24
wasm-port/tests/ui/node/verify_ini_panel_entry_docs.mjs
Normal file
24
wasm-port/tests/ui/node/verify_ini_panel_entry_docs.mjs
Normal file
@@ -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");
|
||||||
6
wasm-port/tests/ui/node/verify_ini_panel_entry_docs.sh
Executable file
6
wasm-port/tests/ui/node/verify_ini_panel_entry_docs.sh
Executable file
@@ -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"
|
||||||
@@ -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_control_page_controller.sh"
|
||||||
"$ROOT_DIR/tests/ui/node/verify_ini_panel_entry_manifest.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_ui_shell.sh"
|
||||||
|
"$ROOT_DIR/tests/ui/node/verify_ini_panel_entry_docs.sh"
|
||||||
|
|
||||||
echo "ui_node_smokes=ok"
|
echo "ui_node_smokes=ok"
|
||||||
|
|||||||
Reference in New Issue
Block a user