Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
- Open the T3 Code Web UI (
http://127.0.0.1:3773) in a browser (Chrome/Edge) and enable built-in full-page translation (e.g. English -> Chinese). - Send a prompt in a thread so a turn enters the running/streaming state.
- Either click Stop while the turn is running, or wait for the turn to finish normally.
Expected behavior
Transitioning out of the running/streaming state (either via clicking Stop or when a turn finishes) should cleanly update the composer/status UI without crashing.
Actual behavior
The React error boundary triggers immediately with NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node. whenever the turn is stopped or finishes while browser translation has wrapped/replaced text nodes in the active controls/status elements.
Reloading the app recovers the session (and the turn's stop/completion already happened on the server).
Impact
Major degradation or frequent failure
Version or commit
T3 Code (Beta) 0.1.11
Environment
Windows, Web UI (http://127.0.0.1:3773) with browser full-page translation enabled (English -> Chinese)
Logs or stack traces
T3 Code (Beta) 0.1.11
Path: /<environmentId>/<threadId>
Time: 2026-11-22T12:45:47.921Z
NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
at Tu (http://127.0.0.1:3773/assets/dist-dAVDK5nE.js:34:107435)
at Au (http://127.0.0.1:3773/assets/dist-dAVDK5nE.js:34:109027)
at Mu (http://127.0.0.1:3773/assets/dist-dAVDK5nE.js:34:111653)
at Au (http://127.0.0.1:3773/assets/dist-dAVDK5nE.js:34:109152)
at Mu (http://127.0.0.1:3773/assets/dist-dAVDK5nE.js:34:111653)
at Au (http://127.0.0.1:3773/assets/dist-dAVDK5nE.js:34:109152)
at Mu (http://127.0.0.1:3773/assets/dist-dAVDK5nE.js:34:111653)
at Au (http://127.0.0.1:3773/assets/dist-dAVDK5nE.js:34:109152)
Workaround
Disable full-page browser translation for 127.0.0.1 / localhost (or use selection/popup translation instead of DOM-mutating page translation). On the app side, wrapping bare dynamic text nodes in <span> or adding translate="no" / class="notranslate" to transient/interactive controls (e.g., Stop/Send button and running status indicators) would prevent React's removeChild from failing when page translation is active.
Activity
FinalVar commentedon Nov 22, 2026
Additional reproduction detail observed in the same session:
removeChildcrash (presumably during thread route unmount / clearing Thread A's sidebar status/unread state under active translation), requiring another reload before Thread A stabilizes.This suggests the issue affects both the active thread composer/status controls and background thread status updates / route transitions in the sidebar when page translation is active.
FinalVar commentedon Nov 23, 2026
Tested on
v0.1.12-nightly.20261122.5098(with #40856 /620cf47) in Edge/Chrome with built-in page translation (English → Chinese) enabled.The
NotFoundErrorcrash is fixed, butpageTranslationGuardnow causes duplicated/leaked translated text nodes in the sidebar thread rows that eventually squeeze out the thread title completely.Observed behavior
In the sidebar under a project/folder (
No project/无项目), each turn transition leaks another translated label into the right-hand status/time slot:While a turn is running: the leaked previous labels stay inside the same
<span>and inherit the blue running status color right before the spinner icon (完成 1 分钟 [spinner] 运行中):After that turn finishes: the spinner unmounts, and another translated label is appended (
完成1 分钟完成刚刚):After a few more turns: the accumulated text (
完成刚刚完成刚刚完成刚刚完成1 分— i.e.Completed+Just nowrepeated 3 times +Completed+1m) overflows the row and crushes the thread title down to 0 width (completely hidden):Because the right-hand status slot has
shrink-0while the thread title on the left ismin-w-0 flex-1 truncate, the leaked text grows horizontally until the title disappears.Root cause
apps/web/src/lib/pageTranslationGuard.ts, when Chrome/Edge replaces a React-ownedTextnode with<font><font>…</font></font>,child.parentNode !== this, so the patchedremoveChildsilently returns without removing the translator-inserted<font>wrapper. On the next update,insertBeforefalls back to appending (reference = null), leaving all previous<font>wrappers orphaned in the DOM.pageTranslationGuard.browser.test.tsxifrunningis toggled multiple times while translating newly inserted text nodes: each toggle leaves another orphaned<font>inside the<div>.apps/web/src/components/sidebar/SidebarThreadRow.tsx(lines 1424–1444), theinFolder && topStatusbranch ({topStatus.label}) and the<RelativeTimeLabel />branch both render an unkeyed<span>containing bare text nodes. React reuses the exact same<span>DOM element acrossRunning↔Completed↔Just now↔1mtransitions (which is also why the leaked完成 1 分钟turns blue alongside the spinner when switching intoRunning), leaking a new<font>wrapper on every transition.Possible fix
keys to the mutually exclusive<span>branches inSidebarThreadRow.tsx(and wrap/key dynamic bare text nodes like{topStatus.label}and<RelativeTimeLabel />in their own elements so React unmounts the intact<span>wrapper instead of a detachedTextnode).<font>wrappers (ortranslate="no"on rapidly mutating status/time chrome) soguardDomAgainstPageTranslationdoesn't leak orphaned<font>nodes across repeated re-renders in other dynamic slots as well.