- Item:
R69from roadmap (UI framework migration feasibility + decision record) - Goal: determine whether migrating OpenClaw frontend from current modular vanilla JS architecture to a framework improves long-term maintainability enough to justify migration risk.
- Constraint from roadmap: no migration by default unless clear ROI; any POC must stay
DEV-only.
- Entry/shell/tabs architecture:
web/openclaw.jsweb/openclaw_ui.jsweb/openclaw_actions.jsweb/openclaw_queue_monitor.jsweb/openclaw_notification_center.jsweb/openclaw_banner_manager.jsweb/openclaw_tabs.jsweb/admin_console_app.jsweb/admin_console_api.js
- Runtime model:
- Loaded as a ComfyUI extension in the host page (no standalone SPA bootstrap).
- Uses direct ES module loading from
custom_nodespath. - Must preserve legacy compatibility paths (
openclaw+moltbotAPI/class aliases).
- Verification baseline:
- Frontend unit lane (
vitest,jsdom) - Frontend E2E lane (
playwright, harness-based)
- Frontend unit lane (
Scored 1-5 (higher is better), weighted by current risk profile:
Maintainability(weight 30%)ComfyUI host integration risk(weight 25%)Security/control-surface regression risk(weight 20%)Migration effort and delivery impact(weight 15%)Test/CI transition complexity(weight 10%)
- Maintainability: 3.5
- Integration risk: 5.0
- Security risk: 4.5
- Migration effort: 5.0
- Test transition complexity: 5.0
- Weighted result: 4.45
- Maintainability: 4.5
- Integration risk: 2.5
- Security risk: 3.0
- Migration effort: 2.0
- Test transition complexity: 2.5
- Weighted result: 3.25
- Maintainability: 4.0
- Integration risk: 2.5
- Security risk: 3.0
- Migration effort: 2.0
- Test transition complexity: 2.5
- Weighted result: 3.10
- OpenClaw frontend is host-coupled to ComfyUI extension lifecycle and remount behavior; framework migration introduces significant integration and lifecycle risk with limited near-term operator value.
- Current architecture already has critical stability controls (
ErrorBoundary, tab remount safety, capability-gated registration, compatibility aliases, Vitest + Playwright lanes). Recent decomposition work further reduced shell/admin/runtime hotspot size without introducing a framework dependency. - Most remaining roadmap priorities are functionality/security features (
F53/F54/F58/F59), not frontend rendering abstraction gaps; migration now would consume high-risk bandwidth with weak ROI.
- No framework migration now (
NO-GOfor immediate rewrite). - Keep current modular vanilla architecture and continue targeted quality hardening.
- Keep canonical class/API ownership and avoid new legacy alias sprawl.
- Continue expanding unit tests around shared UI helpers and tab state transitions before adding complexity.
- If future migration is reconsidered, require a
DEV-onlyPOC with explicit rollback plan and CI parity evidence before roadmap promotion.
Re-open migration decision only if one of the following becomes true:
-
30% of frontend PR churn is dominated by repetitive state/render boilerplate that cannot be reduced with current modular patterns.
- A required roadmap feature demonstrably cannot be implemented safely without virtual-DOM/state tooling.
- ComfyUI extension host contract changes in a way that materially favors framework runtime encapsulation.