[OPIK-7435] [FE] Fix Google Translate removeChild crash on onboarding email step#7562
Merged
Merged
Conversation
… email step The mobile ConnectStep submit button renders a state-dependent label (Email setup instructions -> Sending... -> Instructions sent!) as a bare text sibling of the button icon. Under browser translation Google Translate wraps that text node in a <font> element; submitting the email reconciles the button (icon + label swap) against a re-parented node and throws "NotFoundError: Failed to execute 'removeChild' on 'Node'". Wrap the label in a <span> so React swaps a stable wrapper element instead of the bare text node; the label stays fully translatable. See react/react#11538. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
⏱️ pre-commit per-hook timing
⏭️ 39 skipped (no matching files changed)
|
awkoy
force-pushed
the
awkoy/OPIK-7435-onboarding-email-translate-crash
branch
from
July 22, 2026 09:46
137b8b6 to
696f0e1
Compare
…text Document the Google Translate removeChild crash class in the opik-frontend skill (Critical Gotchas) so new dynamic/animated text wraps interpolated strings in an element instead of rendering bare text nodes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
awkoy
force-pushed
the
awkoy/OPIK-7435-onboarding-email-translate-crash
branch
from
July 22, 2026 09:50
696f0e1 to
f293e03
Compare
andriidudar
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
Same class of crash as OPIK-7428, on the final onboarding step. Submitting the setup email on the mobile get-started onboarding throws:
Reproduces when the browser auto-translates the page (Chrome, non-English locale, mobile viewport).
MobileOnboarding/ConnectStep.tsxrenders the submit button label as a bare, state-dependent interpolated string (Email setup instructions→Sending...→Instructions sent!) sitting as a text sibling of the button icon. Chrome Translate wraps that text node in a<font>element; when the send handler flips state, React reconciles the button (icon swap + label change) against a node Translate re-parented and throwsremoveChild/insertBeforeNotFoundError. Same mechanism as theWelcomeSteptypewriter fix (see facebook/react#11538).Fix: wrap the dynamic label in its own
<span>— the canonical React + Google Translate fix. React now swaps a stable wrapper element (a direct child of the button) instead of a bare text node Translate re-parented. The label stays fully translatable (notranslate="no"opt-out).Also documents this crash class as a rule in
.agents/skills/opik-frontend/SKILL.md(Critical Gotchas) so new dynamic/animated text wraps interpolated strings in an element — browser translation is common among our users.Change checklist
Issues
OPIK-7435
AI-WATERMARK
AI-WATERMARK: yes
<span>wrap fixTesting
--max-warnings=0); TypeScript typecheck passes.Documentation
Added a rule to
.agents/skills/opik-frontend/SKILL.md(Critical Gotchas → "Browser Translation Safety") describing the crash class and the wrap-in-element pattern.