Skip to content

fix(mobile): reuse the locale when formatting thread labels - #93

Merged
gabynevada merged 1 commit into
atlifrom
t3/verify-mobile-lag
Nov 22, 2026
Merged

gabynevada merged 1 commit into
atlifrom
t3/verify-mobile-lag

Conversation

@gabynevada

Copy link
Copy Markdown

On a Samsung running Skald Code 2.3.0 (Android build 1008019), 9.8% of app CPU samples during thread navigation and scrolling passed through Intl.NumberFormat.supportedLocalesOf on the JavaScript thread. The ICU formatter repeated the same language lookup for each label.

Cache the last ordered locale list and its resolved locale in both entry points of @generaltranslation/icu. A language change triggers a fresh lookup. The regression test exercises the mobile translation API and checks that switching between US English and French still changes the displayed hour format.

On-device verification

Formatting the same 300 labels on the same phone took 154.8 and 162.3 ms before the patch, and 1.6 and 3.6 ms after it. Both versions produced the same output checksum. Scrolling, opening a thread, and returning to the list were also verified in a separate Android client. The occasional half-second pause did not recur during tracing and its cause remains open.

All 71 focused tests and vp run check:changed origin/atli passed.

GPT-6.2-astra via the Codex harness in T3 Code.

@gabynevada
gabynevada merged commit 53dd3d2 into atli Nov 22, 2026
9 checks passed
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