Repository navigation
feat(ui): adopt shared libterminal runtime - #100128
Conversation
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Dependency graph changes notedThis PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin or a member of
Security review is still recommended before merge when the dependency graph change is intentional. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: feat(ui): adopt shared libterminal runtime This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f96f2df5ad
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const tabRef = { current: undefined as TerminalTabState | undefined }; | ||
| let controller: GhosttyTerminalController; | ||
| try { | ||
| controller = await createGhosttyTerminal({ |
There was a problem hiding this comment.
Register tabs before awaiting terminal creation
When the panel is detached or available flips false while this await createGhosttyTerminal(...) is still pending, disposeAllTabs() has no tab to mark cancelled because the tab is only added after the await. The continuation can then add a tab to a disconnected/unavailable panel and proceed to terminal.open, leaking a gateway session or stale listener during navigation/reconnect races; before this change the tab was registered before the async render/open window, so teardown could cancel it.
Useful? React with 👍 / 👎.
|
Land-ready at exact PR head Review: zero findings; direct Validation:
Known proof gap: no after screenshot because the required existing Chrome-profile bridge lacked its native-host manifest. The observed Mac has |
Closes #100126
AI-assisted: yes. The implementation was reviewed locally with Codex autoreview; no agent transcript is attached pending explicit approval.
What Problem This Solves
Fixes an issue where Control UI terminal users could see prompt glyphs as placeholder boxes when an installed Nerd Font was absent from the browser font stack. It also removes the Control UI's duplicate ownership of renderer initialization, fitting, input, resizing, and disposal.
Why This Change Was Made
The Control UI now uses
@openclaw/libterminal/browserfor browser-side terminal lifecycle while retaining the existing Gateway JSON-RPC terminal session, authorization, sandboxing, reattachment, and process-management backend. Common Nerd Font families are included in the monospace fallback stack, and an exact Vite alias keeps the package import outside the broad source-plugin alias.User Impact
Control UI terminal sessions use OpenClaw's shared terminal runtime. Users with a common Nerd Font installed get readable prompt symbols without changing terminal settings, while existing Gateway terminal behavior remains unchanged.
Evidence
node scripts/run-vitest.mjs ui/src/components/terminal/terminal-panel.test.ts ui/src/app/vite-config.node.test.ts— 2 files, 6 tests passed.node scripts/run-oxlint.mjs ui/src/components/terminal/terminal-panel.ts ui/src/components/terminal/terminal-panel.test.ts ui/src/components/terminal/terminal-theme.ts ui/src/app/vite-config.node.test.ts ui/vite.config.ts— passed.pnpm ui:build— passed; 983 modules transformed and the Ghostty renderer remained a lazy chunk.pnpm install --lockfile-only --frozen-lockfile --ignore-scripts— passed, including supply-chain policy.tbx_01kwqvkqsrjmgzyq26558zw3kt— full changed-surface typecheck, lint shards, dependency checks, package shrinkwraps, state guards, runtime sidecars, and import-cycle check passed: https://github.com/openclaw/openclaw/actions/runs/28724685256Visual after-proof was not captured because the existing Chrome-profile bridge lacked its native-host manifest. The reported macOS system had
MesloLGLDZ Nerd Font Monoinstalled; the configured and tested fallback now includes it.