diff --git a/PROJECT_COMPLETION_TRACKER.md b/PROJECT_COMPLETION_TRACKER.md
index 91f6254..2527a37 100644
--- a/PROJECT_COMPLETION_TRACKER.md
+++ b/PROJECT_COMPLETION_TRACKER.md
@@ -40,7 +40,7 @@ The project is complete for the current scope when all of the following are true
| --- | --- | --- |
| LinuxCNC semantic boundary | Stable | JS/browser remains glue, staging, OPFS, WASM/browser boundary, docs, and tests only. |
| Real browser simulation priority | Active first priority | Future batches should prioritize the real UI/browser CNC simulation page, with visible machine/session loading, G-code program state, LinuxCNC-backed interpreter execution, machine readiness/status panels, toolpath/preview rendering from LinuxCNC-produced output or validated runtime events, and browser smoke coverage. First entry point: `wasm-port/runtime/ui/simulation/index.html`; gate: `wasm-port/tests/browser/verify_real_simulation_browser.sh`. See `wasm-port/docs/real-browser-simulation-priority.md`. |
-| Real browser simulation page | MVP active | `runtime/ui/simulation/index.html` loads in Chromium, exposes a selector for multiple LinuxCNC-backed test programs, runs them through interpreter WASM, and now includes reset/step/play/finish playback over LinuxCNC canonical motion events. It highlights active G-code and motion rows, updates live axis readout, moves the toolhead, and grows the executed SVG toolpath. Current program set covers square contour, Z pocket contour, incremental loop, G2/G3 arcs, and G81 drilling. |
+| Real browser simulation page | MVP active | `runtime/ui/simulation/index.html` loads in Chromium, exposes a selector for multiple LinuxCNC-backed test programs, runs operator-provided G-code text/files through interpreter WASM, and includes reset/step/play/finish playback over LinuxCNC canonical motion events. It highlights active G-code and motion rows, updates live axis readout, moves the toolhead, and grows the executed SVG toolpath. Current built-in program set covers square contour, Z pocket contour, incremental loop, G2/G3 arcs, and G81 drilling. |
| AXIS-style simulation shell | Phase 1 active | `runtime/ui/simulation/index.html` now uses an AXIS-inspired titlebar, menubar, toolbar, Manual/MDI tabs, Preview/DRO tabs, G-code pane, machine-state pane, and status bar while preserving current LinuxCNC-backed execution and playback APIs. Browser smoke verifies shell regions, tab switching, toolbar playback, and existing program execution. |
| Simulation test program library | Active | Built-in browser simulation programs live in `wasm-port/runtime/ui/simulation/programs/`, one module per program, exported through `programs/index.js`; `verify_real_simulation_programs.sh` checks directory-backed inventory, IDs, defaults, and playback contracts. |
| Vendor/source guard | Stable | `verify_vendor_sync.sh` and standalone semantic guard are required every batch. |
diff --git a/text15.txt b/text15.txt
index c3b0219..a4ca79f 100644
--- a/text15.txt
+++ b/text15.txt
@@ -1887,3 +1887,53 @@ real_simulation_programs_node_smoke=ok
- 程序目录只保存 G-code fixture text 和 expected LinuxCNC canonical motion type 断言;
- 执行仍通过 LinuxCNC-backed WASM SDK;
- JS 没有新增 G-code 解释、planner 或 machine semantics。
+
+八十四、2026-06-16 继续执行记录:真实 G-code 文本/文件执行
+
+用户要求程序实现跑真实的 G-code 程序。本批在保留内置测试程序库的基础上,新增 operator-provided
+G-code text 和 browser File 的执行入口。
+
+本批新增实质能力:
+
+- 页面工具栏新增 Open Program 文件入口:
+ - `data-open-program`;
+ - `data-open-program-file`;
+- `window.linuxCncRealSimulationApi` 新增:
+ - `runProgramText(programText, metadata)`;
+ - `loadProgramFile(file)`;
+- `runProgramText()` 会直接调用 `runRealBrowserSimulation({ programText })`,因此仍通过
+ LinuxCNC-backed WASM interpreter 执行;
+- `loadProgramFile(file)` 读取浏览器 File 文本,再走同一个 LinuxCNC WASM 执行路径;
+- simulation state 新增 program source metadata:
+ - `program.source`;
+ - `program.sourceLabel`;
+ - `program.filename`;
+ - `document.body.dataset.simulationProgramSource`;
+- UI 显示程序来源:
+ - G-code pane header;
+ - bottom status bar;
+- browser smoke 新增真实 G-code 验证:
+ - `runProgramText()` 执行非内置 G-code,验证 canonical output 中出现对应坐标;
+ - `loadProgramFile()` 使用 browser `File` 对象加载 `.ngc` 文本,验证修改后的 G-code 坐标
+ 通过 LinuxCNC WASM 输出;
+- Node smoke 新增 custom `programText` 直接执行验证。
+
+本批新增/更新可执行验证:
+
+```bash
+wasm-port/tests/ui/node/verify_real_simulation_programs.sh
+SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_real_simulation_browser.sh
+```
+
+关键通过输出:
+
+```text
+real_simulation_programs_node_smoke=ok
+browser_real_simulation_page_smoke=ok
+```
+
+本批仍保持 LinuxCNC 语义边界:
+
+- JS 只读取用户提供的 G-code 文本/文件;
+- G-code 执行仍交给 LinuxCNC-backed WASM;
+- JS 不解释 G-code、不规划刀路、不推导 CNC 语义。
diff --git a/wasm-port/README.md b/wasm-port/README.md
index f57c521..163d3f1 100644
--- a/wasm-port/README.md
+++ b/wasm-port/README.md
@@ -29,6 +29,10 @@ The current UI direction is the AXIS-style simulation shell in
Built-in simulation test programs live under
`runtime/ui/simulation/programs/` and are exported by
`runtime/ui/simulation/programs/index.js`.
+The page can also execute operator-provided G-code text or loaded browser files
+through the LinuxCNC-backed WASM interpreter via
+`linuxCncRealSimulationApi.runProgramText()` and
+`linuxCncRealSimulationApi.loadProgramFile()`.
The project release gate for the current scope is:
diff --git a/wasm-port/docs/axis-style-simulation-implementation.md b/wasm-port/docs/axis-style-simulation-implementation.md
index de5cc3b..c43082d 100644
--- a/wasm-port/docs/axis-style-simulation-implementation.md
+++ b/wasm-port/docs/axis-style-simulation-implementation.md
@@ -56,6 +56,7 @@ The current simulation page already has:
- LinuxCNC interpreter WASM execution through `createLinuxCncInterpSdk()`;
- selectable test programs under `runtime/ui/simulation/programs/`;
+- custom G-code text and browser File execution through LinuxCNC WASM;
- canonical output rendering;
- program-line rendering;
- motion table;
@@ -125,6 +126,8 @@ Current implemented regions:
### Phase 2: Program Execution Workflow
+Status: active; custom text/file execution is implemented.
+
Upgrade the G-code pane and execution controls:
- load a selected built-in test program;
@@ -133,6 +136,8 @@ Upgrade the G-code pane and execution controls:
buttons;
- highlight active G-code line and current motion row;
- show run status, source program, motion count, and current frame.
+- load operator-provided G-code text through `runProgramText()`;
+- load browser `File` objects through `loadProgramFile()`;
Built-in test programs must live in:
@@ -224,6 +229,8 @@ Required methods:
- `play()`;
- `pause()`;
- `finishPlayback()`;
+- `runProgramText(programText, metadata)`;
+- `loadProgramFile(file)`;
- future: `loadProgramText(text, metadata)`;
- future: `loadMachineSessionFromOpfs(options)`;
- future: `getMachineReadiness()`;
diff --git a/wasm-port/runtime/ui/simulation/index.html b/wasm-port/runtime/ui/simulation/index.html
index d959e95..331a2be 100644
--- a/wasm-port/runtime/ui/simulation/index.html
+++ b/wasm-port/runtime/ui/simulation/index.html
@@ -501,6 +501,14 @@
.axis-statusbar { grid-template-columns: 1fr; }
dl { grid-template-columns: 1fr; }
}
+ .hidden-file-input {
+ position: absolute;
+ inline-size: 1px;
+ block-size: 1px;
+ overflow: hidden;
+ opacity: 0;
+ pointer-events: none;
+ }
@@ -510,6 +518,7 @@
axis.ngc - AXIS 2.9.8 on LinuxCNC-BROWSER-SIM
⌃−□×
+
-
+
@@ -643,7 +652,7 @@
- Program: Executed through the LinuxCNC-backed WASM interpreter.
+ Program: Executed through the LinuxCNC-backed WASM interpreter. | Source: loadingActive line -