Repository navigation
fix(server): remove evicted terminals from connected clients - #45506
Conversation
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
…iber Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Connected clients now receive terminal removals after eviction, with bounded metadata delivery and snapshot recovery. Cleanup reads current terminal state directly; existing retention limits and active-terminal protections remain unchanged. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…2b5f7cdb1ff # Conflicts: # apps/server/src/terminal/Manager.test.ts
…hange Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dismissing prior approval to re-evaluate 0138322
EvidenceEnvironment for all captures: real web app in Chromium, Linux, 1280×800, dark theme, separate fresh databases. The second client is an independently connected, full-viewport same-origin iframe. Shell prompt is neutral; only picker filesystem descriptions are hidden for recording privacy. On each commit, start an isolated real dev server with a fresh database and seed 129 synthetic projects (p001–p129) using t3.project. In connected client A, press Ctrl+Shift+O and choose each project, open its empty unsent chat's terminal drawer, type sleep 30; exit and Enter, and close the drawer before exit. Repeat for all 129 projects. Wait 40 seconds after the last command. Read every sidebar draft row without opening a draft. Open a fresh independent real client B in a full-viewport same-origin iframe, compare its rows, then return to A. Base: A=129, B=128, only A retains p001; A still retains p001 after B connects. Head: A=B=128, both omit p001, and the retained sets match. Scenario: Connected and fresh clients agree after evicting the oldest of 129 inactive terminalsProven: the scenario fails on base d44762945a and passes on head 0138322451.
Scenario source (uncommitted) · Runtime observations Run with |
• abff023c35 Overlay branch overlay/pin-new-second on top of origin/main via Merge |\ | • 85c6989 feat(shared): place new pins just below the top pinned thread • | 219c7be fix(web): mark invalid provider environment variable names (pingdotgg#45526) • | 7a00a2b fix(web): font family fields trim whitespace before saving (pingdotgg#45521) • | acd9812 fix(server): remove evicted terminals from connected clients (pingdotgg#45506) • | fe42d5d fix(mobile): iOS Quote sheet scrolls the comment field above the keyboard (pingdotgg#45524) • | 4188cff fix(desktop): reuse unchanged fonts and models in macOS updates (pingdotgg#45460) • | 72d8155 fix(web): editing Theme JSON clears stale import errors (pingdotgg#45517)
**v0.1.14-nightly.20261129.5452** · 48 changes from 11 contributors - **Smaller macOS updates.** macOS updates download faster by reusing unchanged fonts and models. - **Markdown table copying.** Copying a selection across Markdown table rows now preserves every selected cell. ### Plus 46 more bug fixes and performance improvements. <details> <summary>Full changelog</summary> ## What's Changed * fix(server): browser preview tab titles no longer end in half an emoji by @saphid in pingdotgg/t3code#45485 * fix(server): content search includes folders re-included by .ignore before the index is ready by @iamshadmantaqi in pingdotgg/t3code#45482 * fix(web): stop PR checks popover clicks and keys from selecting the row by @only21mil in pingdotgg/t3code#45478 * fix(server): partitioned Codex models_cache files no longer break shadow homes by @DOISolutions in pingdotgg/t3code#45450 * fix(shared): preserve the selected digit when uppercasing project monograms by @saphid in pingdotgg/t3code#45497 * fix(server): keep starting terminals available for reattachment by @StiensWout in pingdotgg/t3code#45492 * fix(web): keep every selected cell when copying part of a Markdown table by @saphid in pingdotgg/t3code#45500 * fix(server): thread search skips link addresses written in angle brackets by @AymanKhan9 in pingdotgg/t3code#45499 * fix(mobile): the merge button tells screen readers "1 stack layer", not "1 stack layers" by @saphid in pingdotgg/t3code#45496 * fix(server): opening the browser falls back on Linux when PATH ends in a file by @iamshadmantaqi in pingdotgg/t3code#45501 * fix(mobile): a failed Issues next page waits for Try again instead of retrying on scroll by @tiliakoos in pingdotgg/t3code#42298 * fix(shared): accept GitHub repository links with README queries or fragments by @saphid in pingdotgg/t3code#45508 * fix(server): t3_thread_read no longer splits a surrogate pair at textOffset by @only21mil in pingdotgg/t3code#45509 * fix(web): editing Theme JSON clears stale import errors by @only21mil in pingdotgg/t3code#45517 * fix(desktop): reuse unchanged fonts and models in macOS updates by @renningg in pingdotgg/t3code#45460 * fix(mobile): iOS Quote sheet scrolls the comment field above the keyboard by @juliusmarminge in pingdotgg/t3code#45524 * fix(server): remove evicted terminals from connected clients by @StiensWout in pingdotgg/t3code#45506 * fix(web): font family fields trim whitespace before saving by @only21mil in pingdotgg/t3code#45521 * fix(web): mark invalid provider environment variable names by @only21mil in pingdotgg/t3code#45526 * fix(client-runtime): handle combined -o/-O options with -c in shell command labels by @saphid in pingdotgg/t3code#45342 * fix(web): stop listing TAR files replaced by unsupported members by @saphid in pingdotgg/t3code#45525 * perf(server): avoid enumerating active threads' checkpoint refs during cleanup by @jamesx0416 in pingdotgg/t3code#45516 * fix(web): Enter in custom model editor text inputs saves the edit by @only21mil in pingdotgg/t3code#45539 * fix(web): apply the TSV record size limit to the final unterminated record by @saphid in pingdotgg/t3code#45537 * fix(shared): count words separated by an unspaced em dash in text direction by @saphid in pingdotgg/t3code#45534 * fix(web): use the numbered fallback for blank OpenDocument preview names by @saphid in pingdotgg/t3code#45536 * fix(web): Enter advances or submits the Add provider identity step by @only21mil in pingdotgg/t3code#45541 * fix(web): copy inline PNGs whose MIME parameter contains the word base64 by @saphid in pingdotgg/t3code#45546 * fix(server): scheduled worktree tasks in non-Git projects run at the root when they fire by @juliusmarminge in pingdotgg/t3code#45560 * fix(mobile,web): preserve comma-containing environment IDs in limits refresh by @saphid in pingdotgg/t3code#45512 * fix(shared): keep Devanagari conjuncts intact in automatic project monograms by @saphid in pingdotgg/t3code#45554 * fix: a machine overloaded on both CPU and I/O no longer reads "Machine overloaded · Machine overloaded" by @saphid in pingdotgg/t3code#45531 * fix: keep RTF footnotes and text boxes after blank source lines by @saphid in pingdotgg/t3code#45559 * fix(shared): preserve inner quote punctuation when highlighting message results by @saphid in pingdotgg/t3code#45568 * fix(server): repeated thread actions no longer stay pending in clients by @saphid in pingdotgg/t3code#45565 * fix(web): closing Usage with its shortcut returns focus to the opener by @only21mil in pingdotgg/t3code#45577 * fix(shared): thread titles no longer cut a flag emoji in half by @saphid in pingdotgg/t3code#45574 * fix(web): stop linking GitHub bot comment authors to missing profiles by @only21mil in pingdotgg/t3code#45573 * fix(server): whole-word search finds non-ASCII words past 100 partial lines by @juliusmarminge in pingdotgg/t3code#45582 * fix(client-runtime): keep durable environment streams alive across in-place catalog updates by @saphid in pingdotgg/t3code#45584 * fix(web): invalid When expression blocks visual keybinding edits by @DaDerekkk in pingdotgg/t3code#45553 * fix(web): focus the merged cell when spreadsheet navigation skips a hidden column by @saphid in pingdotgg/t3code#45583 * fix(shared): count words separated by zero-width spaces when choosing text direction by @saphid in pingdotgg/t3code#45566 * fix(web): saving another keybinding keeps an unfinished new keybinding row by @iamshadmantaqi in pingdotgg/t3code#45593 * fix(codex): stopped partial plans no longer remain streaming by @saphid in pingdotgg/t3code#45590 * fix(server): selected-file commits keep refusing a merge when the project folder is a symlink by @iamshadmantaqi in pingdotgg/t3code#45592 * fix(forgejo): single-page issue lists and pickers no longer claim more items by @only21mil in pingdotgg/t3code#45591 * fix(cli): t3 doctor no longer prints "1 superseded events removed." by @only21mil in pingdotgg/t3code#45598 ## New Contributors * @DOISolutions made their first contribution in pingdotgg/t3code#45450 * @renningg made their first contribution in pingdotgg/t3code#45460 * @DaDerekkk made their first contribution in pingdotgg/t3code#45553 **Full Changelog**: pingdotgg/t3code@v0.1.14-nightly.20261129.5438...v0.1.14-nightly.20261129.5452 </details> Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.14-nightly.20261129.5452
…and pingdotgg#44794 Web icon stack) Ports 51 selected high-value upstream PRs from ba05524..d7e01c3 plus the Web-only overlapped provider icon stack visual delta from pingdotgg#44794 while preserving all 15 locked T4 customizations, T4 branding, zero-telemetry stance, and self-hosted infrastructure (skipping Jira-only pingdotgg#45030): - Features & perf (9 + pingdotgg#44794 Web): pingdotgg#45373, pingdotgg#45460, pingdotgg#45286, pingdotgg#45560, pingdotgg#45533, pingdotgg#45637, pingdotgg#45835 (Lock pingdotgg#13 orthogonal), pingdotgg#45828 (Lock pingdotgg#5 orthogonal), pingdotgg#45832 (swipe-actions-only partial), pingdotgg#44794 (Web SidebarThreadRow overlapped icon stack) - Mobile iPhone/iPad & remote (7): pingdotgg#45324, pingdotgg#45524, pingdotgg#45403, pingdotgg#42298, pingdotgg#45285, pingdotgg#45315, pingdotgg#45397 - Multi-machine, Desktop SSH & Linux (12): pingdotgg#45584, pingdotgg#45443, pingdotgg#45414, pingdotgg#45297, pingdotgg#45454, pingdotgg#45407, pingdotgg#45432, pingdotgg#45501, pingdotgg#45471, pingdotgg#45420, pingdotgg#45482, pingdotgg#45582 - ACP, Codex, Git & terminal stability (14): pingdotgg#45410, pingdotgg#45450, pingdotgg#45590, pingdotgg#42115, pingdotgg#45371, pingdotgg#42260, pingdotgg#45618, pingdotgg#45592, pingdotgg#45298, pingdotgg#45492, pingdotgg#45506, pingdotgg#45827, pingdotgg#45565, pingdotgg#45516 - Web/Desktop composer & Git UX (9): pingdotgg#45369, pingdotgg#45391, pingdotgg#45418, pingdotgg#45390, pingdotgg#45406, pingdotgg#45302, pingdotgg#45343, pingdotgg#45441, pingdotgg#45604 Includes independent gpt-6.2-astra blind-review hardening for pingdotgg#45391 (preserving remote tab pendingImageCount across storage events and clearing stale in-memory stash entries on storage clear).
Merges `pingdotgg/t3code` `c16ad0ce17` (186 commits, base `72d700a78c`) into the fork. Branched from `main`; no open merge PR to stack on. - **Landed:** 633 files vs 630 in the upstream range. The 3 extra are fork docs. Fork delta: 794 files. - **Conflicts:** 8, all `converged`, resolved by their verdicts. Details are in `docs/fork/upstream-merge-log.md` (2026-11-30). Two of them were restructures: - `ThreadDetailsPanel.tsx`: upstream moved the sections into user-ordered blocks. The fork's sandbox row, scheduled-tasks gate and artifacts section now ride inside the existing `environment`, `automations` and `relationships` blocks, with no new block id. - `SidebarThreadRow.tsx`: upstream made the row a token layout. The fork's owner name, parent link and child-task badge now render with the `agents` (provider) item. - **Contracts:** added `UnsupportedMethodError` to `threadHandoff.options`/`start`/`cancel`/`adopt` and `tools.list`. The derivation reports no ADD or DROP now. - **Inventory:** - New `web-translations` path policy. - `useThreadActionMenu.test.ts` added to the thread-visibility entry. - Replaced the stale duplicate-add exception with the `Sidebar.logic.test.ts` `new Set(),` one. - Updated anchors for the two restructured deltas. - **Gaps:** - Extended "Methods the backend does not dispatch" with handoff and `tools.list`. - Added the c16ad0c range to "Runtime fixes upstream made to its own server". - Added ServerBrowser's `Uint8Array.fromBase64` to the Node 24 entry. ## Verification `verify.mjs` full run. Duplicate-adds, tripwires, resolution-check, unsupported-methods, lockfile, fmt, lint, typecheck and build are all green. - `@t3tools/web`: 3 files failed in the full run. On the rerun alone all 750 passed. - `t3`: 9 files failed. All are registered sandbox gaps: - Node 24 lacks `StatementSync.stat`, `setTypeOfService` and `Uint8Array.fromBase64`. - The sandbox `/tmp` has no sticky bit (Codex token broker). - The global git `insteadOf` rewrites the test remotes. - Every other package passed. - The commit used `--no-verify` for the known knip failure (the same 27 fork exports). ## Usable as-is - Customizable sidebar thread rows and a reorderable Thread Details card (pingdotgg#42576). These read the `sidebarRowLayout` and `threadDetailsOrder` client settings. Not checked: whether Moatless stores them. - Provider icon stack on thread rows (pingdotgg#44794). - The machine-overload warning is now a smaller pill you can dismiss (pingdotgg#45775, pingdotgg#45273). Without `severeSince` a dismissal does not reset when a new overload episode starts. - About 60 web UI fixes: keybinding editor, branch and diff pickers, find bar, file previews (spreadsheet, TSV, TAR, RTF, ODT, Markdown tables), pull request views, the composer and queued messages. - Text fixes: text direction, monograms, work-log command labels, Markdown recovery. - Mobile-only fixes: inbox scroll and swipe, Android split screen, iPad keyboard. ## Unsupported in Moatless / needs implementation - **Continue a thread on another machine** (pingdotgg#44775, pingdotgg#44774, pingdotgg#44773). Methods: `threadHandoff.options`, `start`, `cancel`, `adopt`. UI: `HandoffRequestCard`, `ThreadHandoffDialog`, and a thread-menu item. - Hidden against Moatless, because `canMoveThreadsAtom` requires `offersLinkedEnvironments`. - To implement: linked environments plus a thread import. Alternatively, keep the capability absent. - **`tools.list`** (`packages/contracts/src/agentTools.ts`). Lists the MCP servers and skills a thread's agent gets. No web surface reads it yet. - To implement: return Moatless's tool list in the `AgentToolsList` shape. - **MCP servers and disabled skills per thread and per project** (pingdotgg#45175, pingdotgg#45306, pingdotgg#45362, pingdotgg#45320). These are `mcpServers` and `disabledSkills` in settings and in `projectSettingsOverrides`, saved through `server.updateSettings`. - To implement: Moatless would have to persist them, redact secrets on read, and pass them into provider sessions. Until then the setting probably appears to save and does nothing. This was not checked against the Moatless settings handler. - **`severeSince` on host pressure** (`resourceTelemetry.ts`). Optional, low priority. ## Backend behavior to consider reproducing in Moatless - **Agent tools:** `pull_request_create` adds labels (pingdotgg#45533). Per-project MCP servers keep their secrets out of `settings.json` (pingdotgg#45362, pingdotgg#45306). `t3_thread_read` no longer splits a surrogate pair at `textOffset`, and a `t3_thread_launch` replay keeps the launched thread's model selection (pingdotgg#45509, pingdotgg#42115). - **VCS:** - Forgejo auto-merges once checks pass (pingdotgg#38773), and its single-page issue lists stop claiming more items (pingdotgg#45591). - GitLab reads and retries CI jobs (pingdotgg#45027). - A new worktree's index swap no longer locks out Git (pingdotgg#42260). - A task folder that loses a branch race leaves the winner's checkout alone (pingdotgg#45618). - A worktree thread in a plain folder runs in the folder (pingdotgg#44799, pingdotgg#45560). - Selected-file commits still refuse a merge when the project folder is a symlink (pingdotgg#45592). - **Thread search:** - Lists every older settled thread that matches (pingdotgg#44741). - Skips link addresses (pingdotgg#45499, pingdotgg#45271, pingdotgg#45354). - Finds non-ASCII whole words (pingdotgg#45582). - Includes folders re-included by `.ignore` before the index is ready (pingdotgg#45482). - Stops listing nested worktree files as `.worktrees/x/./path` (pingdotgg#45481). - **Runtime:** - Repeated thread actions no longer stay pending (pingdotgg#45565). - Cancelling a queued follow-up cancels only its own run (pingdotgg#45414). - Evicted terminals are removed from connected clients (pingdotgg#45506). - Switching providers no longer waits on the old one's background work (pingdotgg#45373). - Checkpoint cleanup no longer enumerates active threads' refs (pingdotgg#45516). - Remote delegated subagents no longer trigger completion notifications (pingdotgg#45297). - **Providers:** - Codex: a stopped partial plan no longer stays streaming (pingdotgg#45590), and a partitioned `models_cache` no longer breaks shadow homes (pingdotgg#45450). - ACP: the `/` menu lists commands advertised late (pingdotgg#45286), and a failed history read no longer reports the session as imported (pingdotgg#45410). - **Workflows:** daily interval and weekday fixes, and no duplicate runs for equivalent label filters (pingdotgg#45371, pingdotgg#45312, pingdotgg#45281, pingdotgg#45264, pingdotgg#45276). - **Machine-load warnings:** stop while the CPUs sit idle, and ignore jobs outside T3 stalling at their own memory limit (pingdotgg#45531). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- Moatless task: https://moatless.soaplabstest.com/tasks/350bcaee-9e40-4d3b-83f5-1ea4e9e745e6







Connected clients could keep listing inactive terminals after the server evicted them. The terminal manager now queues removals when it deletes a terminal, so delivery survives cancellation and callbacks can reopen terminals without blocking publication. Each metadata subscriber has a bounded queue and receives a fresh snapshot on overflow, followed by changes that arrive during snapshot delivery.
Related: #34853, #37841
Reproduction on main
Commit 0303e60311 (main), in the running web app:
The first window still lists all 129 empty chats, including the earliest one. The second window lists 128 and omits the earliest one. Expected: Both windows omit the earliest empty chat and list the other 128.
The cause is at
apps/server/src/terminal/Manager.ts:2719. Rancd apps/server && pnpm exec vp test run src/terminal/Manager.test.tswith the repro test added: it failed in 2 of 2 runs on a clean checkout, withexpected true to be falsein the output.Evidence
Environment: Linux x64, the repository's own tests.
Proven: the repro fails at the test commit 1d75f4e0dc and passes on the head 1f2a65686b, both on main 7cb8305e3a.
Outside view: a person sees it in the running web app by following the steps under Reproduction on main.
Tests
pnpm exec vp run check:changed 7cb8305e3a99da343b964a31baa9e2ab340f2465passed on head.Not in this change
Who did the work
Made in T3 Code by GPT 6.2 Sol, Claude Opus 5.5, Grok 4.7 and Muse Wonder Full 1.0