fix(settings): scale AI app generator suggestion strip height with text size (#19239)

Merged
DR
2d ago
+118-1

Summary

Fixes #19239.

Scales the height of the suggestion strip in AiAppGeneratorPage (app/lib/pages/settings/ai_app_generator_page.dart) dynamically with MediaQuery.textScalerOf(context).

Root Cause

Previously, the horizontal suggestion cards strip ("Try something like") was wrapped in a fixed SizedBox(height: 160). Each _buildSuggestionCard holds up to 3 lines of OmiType.callout text (height: 1.4) plus a compact "Try it" button inside 20 pt padding. At larger text sizes (1.15x, 1.3x, 1.5x), the column inside the card exceeded the 160 pt height and overflowed at the bottom by 6 pt to 30 pt.

Fix Details

  • Scaled the SizedBox height with the active text scale factor while preserving the 160 pt baseline:
    height: 160 * math.max(1.0, MediaQuery.textScalerOf(context).scale(16) / 16),
    

Verification

  • Added hermetic regression widget test in app/test/widgets/settings/ai_app_generator_large_text_test.dart pumping AiAppGeneratorPage across 1.0x, 1.15x, 1.3x, and 1.5x text scales on a 390 pt viewport and asserting zero overflow exceptions.
  • Added unreleased changelog fragment app/changelog/unreleased/20261012-ai-app-generator-suggestion-text-scaling.json.