Skip to content

fix(ui): add missing ui.tool.skill i18n key; guard TextShimmer against undefined text#1

Draft
Copilot wants to merge 3 commits intodevfrom
copilot/fix-opencode-web-session-error
Draft

fix(ui): add missing ui.tool.skill i18n key; guard TextShimmer against undefined text#1
Copilot wants to merge 3 commits intodevfrom
copilot/fix-opencode-web-session-error

Conversation

Copy link

Copilot AI commented Mar 7, 2026

The "STUPID SEXY TIMELINE" refactor (bbd0f3a25, Mar 7) changed the skill tool renderer from a hardcoded input.name || "skill" fallback to i18n.t("ui.tool.skill"), but never added the key to any locale dictionary. @solid-primitives/i18n returns undefined for missing keys; that undefined reached TextShimmer, which calls props.text.length in a reactive style computation — instant crash for every session that ran a skill tool call.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

  • packages/ui/src/i18n/en.ts + all 16 locale files — adds "ui.tool.skill" with appropriate translations (e.g. "Skill", "技能", "Compétence", etc.)
  • packages/ui/src/components/text-shimmer.tsx — guards props.text with ?? "" in both shimmerSize and shimmerDuration memos so any future missing i18n key degrades gracefully instead of crashing
-  const len = Math.max(props.text.length, 1)
+  const len = Math.max((props.text ?? "").length, 1)

How did you verify your code works?

Traced the call path: bbd0f3a25 introduced i18n.t("ui.tool.skill") in the skill ToolRegistry renderer without defining the key → translator() returns undefined → passed as text to TextShimmerprops.text.length throws. Confirmed the key was absent from en.ts (and all locales) prior to this fix.

Screenshots / recordings

UI-only crash fix; no visual change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits March 7, 2026 14:14
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… undefined text

Co-authored-by: jon23d <1146473+jon23d@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix universal session error in opencode web Fix web session crash: add missing ui.tool.skill i18n key and harden TextShimmer Mar 7, 2026
Copilot AI changed the title Fix web session crash: add missing ui.tool.skill i18n key and harden TextShimmer fix(ui): add missing ui.tool.skill i18n key; guard TextShimmer against undefined text Mar 7, 2026
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.

2 participants