fix(ui): reopen closed web terminals with a fresh screen#100665
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 101fef674e
ℹ️ 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".
| ### Fixes | ||
|
|
||
| - **Small-context compaction:** cap the effective reserve against the known model context window so small local models do not enter compaction from the first token. (#100621) Thanks @vincentkoc. | ||
| - **Control UI terminal reset:** isolate each web terminal's Ghostty WASM runtime so closing a tab and reopening starts with an empty screen instead of reusing freed terminal cells. |
There was a problem hiding this comment.
Remove the manual changelog entry
Root AGENTS.md says CHANGELOG.md is release-only and must not be edited for normal PRs or direct main fixes; release-note context should live in the PR body, squash message, or direct commit. This is a normal Control UI fix and the commit message already carries that context, so keeping this manual entry creates release-generation drift/conflicts before the next generated release. Please remove it from the patch.
Useful? React with 👍 / 👎.
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(ui): reopen closed web terminals with a fresh screen 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. |
|
Land-ready proof for
|
|
Merged via squash.
|
* origin/main: (1287 commits) fix(android): block loopback canvas navigation (openclaw#99874) fix(hooks): suppress unhandled stdout/stderr stream errors in gmail watcher (openclaw#100519) fix(memory-core): guard qmd mcporter JSON.parse against non-JSON stdout (openclaw#98381) fix(build): fall back to tsx for build TypeScript scripts (openclaw#91262) feat(skills): suggest saving detected reusable workflows by default (openclaw#95477) (openclaw#100692) docs(changelog): remove generated release-note entries feat(telegram): offer BotFather web app flow in setup help and docs (openclaw#100540) fix(ios): unify Talk and Settings row typography on one branded detail row (openclaw#100515) feat(gateway): add persisted crash-loop breaker and fatal-config exit contract refactor(macos): lock and unify PortGuardian tunnel record persistence so concurrent app instances cannot lose orphan records (openclaw#100601) fix: stop reconnecting on protocol mismatch (openclaw#98414) fix(maint): reuse recent hosted gates after rebase (openclaw#100663) fix(ui): reopen web terminals without stale content (openclaw#100665) fix(browser): diagnose empty WSL2 Chrome replies (openclaw#100590) fix(ios): chat snaps back to bottom when scrolling to top via status-bar tap (openclaw#100502) Treat already-compacted CLI compaction as no-op (openclaw#99136) docs(changelog): remove direct main fix entry fix(feishu): strip internal tool-trace banners from outbound text (openclaw#98705) fix(message): thread --limit through to CLI formatter and surface provider pagination hints (openclaw#99089) fix(voyage): close response body stream when batch output JSONL parsing throws (openclaw#98840) ... # Conflicts: # extensions/memory-wiki/package.json
Related upstream defect: coder/ghostty-web#141
Upstream fix: coder/ghostty-web#142
What Problem This Solves
Fixes an issue where users who closed the final Control UI terminal tab with its X button could see the disposed terminal's old content when opening the terminal again.
Why This Change Was Made
The pinned
ghostty-webruntime can reuse unzeroed WASM pages after a terminal is disposed. The Control UI now gives each terminal tab an isolated Ghostty runtime, preserving the existing Gateway session close/open lifecycle while preventing freed renderer memory from reaching the next tab.User Impact
Closing the final web terminal tab now fully resets its browser terminal state. Reopening starts with a new shell and blank terminal instead of old screen content.
Evidence
ui/src/components/terminal/terminal-panel.test.ts: 3 focused lifecycle tests pass, including close RPC, controller disposal, cleared persisted tabs, a newterminal.open, and no stale reattach.ui/src/e2e/terminal-runtime.e2e.test.ts: real Chromium/WASM regression passes; a second isolated runtime starts blank after the first runtime writes content and is disposed.pnpm check:changed -- CHANGELOG.md pnpm-lock.yaml ui/package.json ui/src/components/terminal/terminal-panel.test.ts ui/src/components/terminal/terminal-panel.ts ui/src/components/terminal/terminal-runtime.ts ui/src/e2e/terminal-runtime.e2e.test.ts: passed on Blacksmith Testbox.pnpm build: passed on Blacksmith Testbox, including the production Control UI Vite bundle andghostty-webchunk.coder/ghostty-web#142independently documents the same freed-page stale-cell and later-write corruption defect.AI-assisted; implementation understood and reviewed. No agent transcript attached.