Repository navigation
fix(ios): child-count strings follow the formatter's locale; unrace two chip tests - #14554
Merged
Merged
Conversation
TerminalArtifactChildCountFormatter passed its locale only as the formatting locale, so String(localized:) and AttributedString(localized:) still read the string table of the process language. An injected Japanese locale rendered "1 item" in an English host. Resolve the matching .lproj of the package bundle first, as DiagnosticLocalization in CMUXMobileCore already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
failedScanDropsHeldZero modeled the failed refresh as a completion with no totals but left scanSucceeded at its default of true. Since #12007 added per-count scan dedupe, only a completion with scanSucceeded false releases the visible count, so the follow-up trigger at the same count became a provisional report instead of a report plus retry. Production passes scanSucceeded: response != nil, so pass false here as the other failed-scan tests do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TerminalFolderTapPolicy runs the stat on the main actor and races it against a 50 ms ContinuousClock deadline. In the hosted iOS suite, other tests keep the main actor busy long enough for the deadline to win, so the fast classification test saw .focusTerminal. Inject a clock whose sleep only ends on cancellation, so the classification is the only possible answer and the test no longer depends on scheduling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
|
Merge receipt for
|
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.
Three CmuxMobileShellUI failures in the files-chip and folder-tap code. One is a real bug, two are stale or racy tests.
TerminalArtifactChildCountFormatterpassed its locale only as the formatting locale, soString(localized:)read the string table of the process language. An injected Japanese locale rendered "1 item" in an English host. It now resolves the matching.lprojin the package bundle first, asDiagnosticLocalizationin CMUXMobileCore already does. Formatter from iOS: complete chip files gallery — dedup, folders, streaming viewer, previews, gallery UX, QoL #8287.failedScanDropsHeldZeromodeled a failed refresh but leftscanSucceededat its default of true. Since Fix iOS terminal typing latency #12007's per-count scan dedupe, onlyscanSucceeded: falsereleases the visible count. Production passesscanSucceeded: response != nil, so the test now passes false like the other failed-scan tests.ContinuousClockdeadline against a busy main actor in the hosted suite (iOS: make terminal folder-path taps a setting (Open Folders on Tap) #8524). It now injects a clock that never fires, so classification is the only possible answer.Credit: @azooz2003-bit (#8287, #8524, #12007).
Part of getting the cmux-ios full suite green on main (see #14464 to #14470).
🤖 Generated with Claude Code
Summary by cubic
Fixes child-count strings to follow the formatter's locale and stabilizes two flaky tests in
CmuxMobileShellUI.TerminalArtifactChildCountFormatternow resolves the matching.lprojin the package bundle so an injected locale selects its translation instead of falling back to the process language.failedScanDropsHeldZerotest now passesscanSucceeded: falseto model a failed refresh, aligning with production behavior after per-count scan dedupe.Written for commit c083b73. Summary will update on new commits.
Summary by CodeRabbit