fix(app): restore green Flutter suite on main
What changed and why
The Flutter suite on main (Mobile App Checks › Dart Analyze & Tests) is red, so any PR that touches app/ fails. This restores a green suite.
-
test/widgets/settings/ai_app_generator_large_text_test.dart— looks forTry something like, but English l10n isTry something like…. Breaking PR: #21341 (8c2909e5faf). The assertion was wrong when that test landed; the ellipsis has been inapp_en.arbsince #18436. Fix: expect the ellipsis the page already paints. -
test/widgets/settings/settings_search_header_stability_test.dart—SettingsDrawerwatchesUsageProviderand the harness does not provide it, so the first frame throwsProviderNotFoundException. Breaking PR: #21343 (2d77690f5b1). The watch has been in the drawer since #18723; the new header test omitted the provider. Fix: provideUsageProviderin the harness. -
test/widgets/apps_category_section_large_text_test.dart— two failures, both from #21340 (ac1b866d569).find.text('Productivity')matches the section title and each card's category label. And the card column overflows by 13px at text scale 1.3: row height was measured withTextPainteron the rawOmiTypestyle, while painted text inherits Material's line height (~1.43), and the header was measured astitle2instead of thetitle3it paints. Fix: measure the effective style (theme line height included) and the real title, chip, artwork, and action extents so the row grows with the text. Point the test at thetitle3title so the card labels are not ambiguous. -
test/services/device_service_connection_failure_test.dart— "launch timeout preserves the connection and transport for native background reconnection" staysdisconnectedimmediately afteremitConnected(). Breaking PR: #21302 (ce3826d2fd1). No later commit changedDeviceConnection's transport listener or this test. The product is right: a launch timeout keeps the connection and transport, and a later connected event updates status. Production transports and the test fake both use an asynchronous broadcast stream, so the listener runs on a later microtask. The failed expect was followed by the debug logdevice connection state changed … connected. Fix: the test waits for that event. Product reconnect behavior is unchanged.
Product invariants affected
none
How it was verified
cd app && flutter teston each of the four files: all passed.cd app && flutter test(full suite): 5493 passed, 21 skipped, 0 failed.app/scripts/analyze_ratchet.sh: passed.scripts/pr-preflight --lane local: passed (23 checks).
Tests
The four failing files are the regression coverage. The category-section test still fails on a real overflow; the row-height fix is what makes text scale 1.3 and 1.5 lay out.
UI evidence
UI-Evidence: none -- text-scale overflow is asserted by the category-section widget test; no new screen
Failure class (fixes)
Failure-Class: none
🤖 Generated with Claude Code