Skip to content

fix(app): separate model capabilities in localized summaries - #61622

Open
chaoworks wants to merge 3 commits into
anomalyco:devfrom
chaoworks:model-modality-list
Open

chaoworks wants to merge 3 commits into
anomalyco:devfrom
chaoworks:model-modality-list

Conversation

@chaoworks

@chaoworks chaoworks commented Nov 4, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #61594

Type of change

  • Bug fix

What does this PR do?

Use narrow conjunction list formatting for the model capability summary. The unit formatter omits separators in Simplified Chinese, turning the English fallback labels into TextImageTools. Narrow conjunction displays Text、Image、Tools while preserving the existing comma-only English summary.

How did you verify your code works?

Current head 9d6e4510606a905e1072aab27b26119785df7978 merges upstream 83960f8a. The tooltip test conflict is resolved by preserving upstream's clock-controlled tests and resuming live timers for the localized model regression. Its locator now targets the current story's Claude Sonnet 5 option.

  • Tooltip component tests: 90 passed, two workers and ten repetitions, no retries.
  • The Chinese regression also passed 10 repetitions with 4× CPU throttling. With the formatter reverted to the upstream implementation, the same regression fails on the expected missing separator; the fixed formatter is restored in this head.
  • Built-app mobile-model-pickers.spec.ts: 18 passed, five workers, no retries, including the exact English summary checks.
  • bun run check (lint and all 35 typecheck tasks), Prettier, and diff checks passed.
  • Earlier full-app evidence (952 unit tests and 303 browser tests) belongs to f74ddbc; those full suites were not rerun for this merge.

Visual

<svg xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72">
  <style>@media(prefers-reduced-motion:no-preference){.list{animation:show 3s ease-in-out infinite}}@keyframes show{50%{opacity:.5}}</style>
  <rect x="5" y="5" width="230" height="62" rx="7" fill="none" stroke="currentColor" opacity=".3"/>
  <g fill="currentColor" font-family="sans-serif" font-size="12"><text x="17" y="27" opacity=".5">TextImageTools</text><text class="list" x="17" y="51">Text、Image、Tools</text></g>
</svg>

Screenshots / recordings

Before:
Unseparated capability names

After:
Localized separators between capability names

Checklist

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

Added by the opencode bot (AI-generated).

Related: #58200

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the Simplified Chinese summary. I ran the #61594 repro on the base and on this branch: zh changes from TextImagePDFAudioVideoTools to Text、Image、PDF、Audio、Video和Tools.

It also changes English, though. With style: "short", the conjunction format gives Text, Image, PDF, Audio, Video, & Tools. The existing e2e test at packages/app/e2e/regression/mobile-model-pickers.spec.ts:152 expects exactly Text, Image, PDF, Tools, so it will fail (see inline comment). Type checking (tsc -b) and the src/providers/models unit tests pass. I couldn't run the Playwright component or e2e tests here.

The public API is unchanged.

Related: #58200


const summary = () =>
new Intl.ListFormat(language.intl(), { style: "short", type: "unit" }).format([
new Intl.ListFormat(language.intl(), { style: "short", type: "conjunction" }).format([

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With style: "short", conjunction also changes English, from Text, Image, PDF, Tools to Text, Image, PDF, & Tools. That breaks the exact-match assertion in e2e/regression/mobile-model-pickers.spec.ts:152. { style: "narrow", type: "conjunction" } keeps English as it is and still adds separators in every locale I checked: zh-Hans/ja Text、Image、PDF、Tools, de Text, Image, PDF und Tools, ko Text, Image, PDF 및 Tools. If you switch, the new story's expected string becomes Text、Image、Tools.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed in f74ddbc: narrow conjunction keeps English unchanged and adds separators for Chinese. Thanks for rechecking.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I checked f74ddbc and the #61594 repro now passes in both locales: English stays Text, Image, PDF, Audio, Video, Tools, and Simplified Chinese reads Text、Image、PDF、Audio、Video、Tools. Nothing further from me on this thread.

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The earlier point about English output is addressed. With narrow conjunction, English stays Text, Image, PDF, Audio, Video, Tools, matching the existing e2e assertion, and Simplified Chinese now reads Text、Image、PDF、Audio、Video、Tools. I checked this by re-running the #61594 repro on this commit (base: TextImagePDFAudioVideoTools). tsc -b passes. I couldn't run the Playwright component or e2e tests here.

The public API is unchanged. Nothing new to raise.

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The merge with upstream keeps the fix as it was. I re-ran the #61594 repro on this head: English stays Text, Image, PDF, Audio, Video, Tools and Simplified Chinese reads Text、Image、PDF、Audio、Video、Tools. tsc -b passes. The updated story test (resumes the clock paused by the new upstream beforeEach, hovers "Claude Sonnet 5") looks fine. I couldn't run Playwright here.

The public API is unchanged. Nothing new to raise.

This branch has not been deployed

No deployments
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.

Model picker tooltip glues modality names together and cuts off

1 participant