Skip to content

Key the pieces of a translated message that holds markup - #2118

Merged
joepio merged 1 commit into
developfrom
claude/wuchale-jsx-runtime-keys
Oct 6, 2026
Merged

joepio merged 1 commit into
developfrom
claude/wuchale-jsx-runtime-keys

Conversation

@joepio

@joepio joepio commented Oct 6, 2026

Copy link
Copy Markdown
Member

Before: in a Vite dev build, every translated message that mixes text with an element (the icon beside "Add icon", a link inside a sentence) logs "Each child in a list should have a unique key". The atomic-saas portal e2e runs a dev server and fails on any console error, so invite-signup fails on every retry. It started with the batch of 6 October (#2085, 30 PRs combined): its wuchale patch now extracts the "Add icon" and "Add cover" labels in TitleDecorationAffordances, which used to stay untranslated plain text.

After: those messages render without the warning, so the saas portal e2e no longer trips on it (saas #196, the Firefox scrolling fix, is the PR that hit it). The same fix covers every other message that holds markup.

The wuchale JSX runtime returns the pieces of a message as an array whose elements have no key. A pnpm patch (@wuchale/jsx@0.12.5) wraps each piece in a Fragment keyed by its position, which cannot change for a given message. Children.toArray was tried first and does not help, because React still warns for elements it keys that way.

How: the patch is browser/patches/@wuchale__jsx@0.12.5.patch, registered in pnpm-workspace.yaml, with the lockfile entries added by hand in the repo's existing format and an entry in browser/patches/README.md. src/locales/wuchaleRuntime.test.tsx renders a message with an icon and fails without the patch. The AI settings e2e no longer requires the older Vite-only warning of the same kind.

This is the same commit as #2114 (closed), moved to a branch name that no atomic-saas branch shares. That one's main CI job was green on the exact head (e2e, lint, unit test); its Downstream check paired with a stale same-named saas branch and failed on a --locked error unrelated to this change.


Generated by Claude Code

Before: in a Vite dev build, every translated message that mixes text with an
element (an icon beside "Add icon", a link inside a sentence) logged "Each
child in a list should have a unique key". The atomic-saas portal e2e runs a
dev server and fails on any console error, so invite-signup failed on every
retry once the wuchale patch of the 6 October batch started extracting such
labels in TitleDecorationAffordances.

After: those messages render without the warning. The wuchale JSX runtime
returned the pieces as an unkeyed array; a pnpm patch wraps each piece in a
Fragment keyed by its position. A unit test renders such a message and fails
without the patch. The AI settings e2e no longer requires the warning that
this fixes.
@joepio
joepio merged commit b6953b6 into develop Oct 6, 2026
13 of 15 checks passed
@joepio
joepio deleted the claude/wuchale-jsx-runtime-keys branch October 6, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant