Developer settings: API and MCP section buttons overflow in German and French and at larger text
Product impact
- Primary loop layer: UX-Polish
- [ ] Involves data loss, failed capture, or broken sync/trust
Describe the bug
The "Developer API" and "MCP" section headers put two compact buttons ("Docs" and "+ Create Key") in a
non-wrapping Row as OmiSectionHeader.trailing. In longer languages or at larger text sizes the row is wider
than the screen.
To reproduce
- Set the app language to German or French (or a larger text size) on a 320–375 pt wide iPhone.
- Settings → Developer.
Current behavior
A widget test of the header on main (bundled SF Pro Display for the button labels, 16 pt page padding) found
these right-edge overflows:
| width | 1.0× de | 1.0× fr | 1.3× en | 1.3× de | 1.3× fr |
|---|---|---|---|---|---|
| 320 pt | 50 | 14 | — | 120 | 73 |
| 360 pt | 10 | — | — | 80 | 33 |
| 375 pt | — | — | — | 65 | 18 |
Expected behavior
The buttons wrap below the title (or onto a second line) instead of overflowing.
Evidence
lib/pages/settings/widgets/developer_api_keys_section.dart:37lib/pages/settings/developer_mcp_section.dart:52
Suggested fix
Use a Wrap for the trailing buttons, and let OmiSectionHeader drop its trailing widget under the title when
both don't fit.
Fix available
Fixed with a regression test on the fork branch design/v2-step0-tokens (0d67abff3c). It will be linked from the draft PR.
Found while testing the Omi v2 Flutter restyle on an iPhone, then confirmed against main at 32c2ed22cf.
Fixed in #21321.
Overview of Fix
- Adaptive Header Wrapping: Updated
OmiSectionHeaderto use a responsiveWraplayout for title and trailing widgets, allowing action controls to drop below the title rather than overflowing horizontally on narrow viewports or under larger text scales. - Section Action Wrapping: Converted the trailing action rows in
DeveloperApiKeysSectionandDeveloperMcpSectiontoWrapwith unified spacing (OmiSpacing.xs). - Hermetic Tests: Added
developer_section_overflow_test.dartasserting that the Developer API and MCP sections render without layout overflow on 320 pt viewports across English, German, and French at 1.3× text scale, and verifyingOmiSectionHeaderwrapping under constrained widths.