推进 INI 面板 control-page refresh workflow helper

This commit is contained in:
2026-06-15 04:39:08 +08:00
parent 213514f64c
commit ed5d03ea1b
13 changed files with 379 additions and 13 deletions

View File

@@ -15,6 +15,8 @@ import {
getIniPanelEntryByHref,
getVisibleIniPanelEntries,
createMachineSessionControlPageController,
refreshMachineSessionControlPage,
controlPageStatusText,
renderMachineSessionControlView,
} from "../runtime/ui/ini-panel/ui-shell.js";
```
@@ -45,7 +47,15 @@ and `label`.
Outer shells can call `createIniPanelShellViewModel()` when they need one
read-only model with `pages`, `launcherLinks`, and `controlPage` helpers for
mounting the existing control-page controller and renderer.
mounting the existing control-page controller, refresh workflow, and renderer.
The control-page refresh workflow lives in
`runtime/ui/ini-panel/control-page-refresh-workflow.js`. Use
`refreshMachineSessionControlPage()` when an outer shell needs a structured
refresh result with `phase`, `statusText`, `view`, `renderResult`, and `error`.
`controlPageStatusText()` formats the already-observed panel status fields for
the read-only status line, and `createControlPageRefreshState()` is the stable
state-shape helper used by the workflow.
## Boundary