Repository navigation
fix(settings): prevent developer section headers overflow on narrow viewports (#19240) - #21321
Dragonire9 wants to merge 6 commits into
Conversation
…arrow screens or scaled text
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks for the well-scoped fix and the hermetic multi-locale tests — the problem description matches what the code was doing.
What I verified, file by file:
app/lib/ui/components/omi_settings.dart— the core change, and the one issue blocking this. The old header usedRow+Expanded(title): a Row withMainAxisSize.maxalways fills the available width, so trailing controls were flush right. The newWrapbehaves differently in an important way: under the loose cross-axis constraints passed down by the surroundingColumn(crossAxisAlignment: CrossAxisAlignment.start),Wrapshrink-wraps to its content width.WrapAlignment.spaceBetweenonly distributes leftover slack, so whenever the title and trailing fit on a single run,spaceBetweenis a no-op and the trailing sits immediately after the title instead of at the right edge. That silently changes the appearance of everyOmiSectionHeaderwith a trailing widget — including the caller you didn't touch,app/lib/pages/settings/settings_groups.dart:231(the "Beta" tag on the Recording section) — on regular-width phones, not just tablets. SincespaceBetweensuggests right-alignment is intended, force the wrap to full width, e.g.SizedBox(width: double.infinity, child: Wrap(...)).app/lib/pages/settings/developer_mcp_section.dart— switching the trailing Row toWrapwithspacing/runSpacingis the right idea and drops the manualSizedBoxspacer cleanly; correct once the header width issue above is addressed.app/lib/pages/settings/widgets/developer_api_keys_section.dart— same pattern, same verdict; both buttons keep their compact size and handlers unchanged.app/test/widgets/settings/developer_section_overflow_test.dart— good hermetic coverage (320pt viewport, 1.3x text scale, en/de/fr,takeExceptionnull, plus a constrainedOmiSectionHeadertest). One gap: nothing asserts the wide-screen layout, which is why the alignment regression above slips through. Consider a wide-viewport test asserting the trailing control's right edge (e.g.tester.getTopRight) lands near the header's right edge.
Requesting changes just for the OmiSectionHeader width behavior; the overall approach is sound.
This is automated maintainer feedback on behalf of the Omi maintainers.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
…ligns trailing flush right
…iling right alignment
|
@Git-on-my-level Thank you for the sharp catch on Addressed both points:
Ready for merge sign-off! |
Dismissing this earlier change request: its specific concern (OmiSectionHeader Wrap shrink-wrapping so spaceBetween stopped right-aligning trailing widgets on wide screens) is fixed on this head via SizedBox(width: double.infinity, ...) in 8c07ca8, and the new wide-viewport test pins the alignment.
|
Follow-up to my earlier review: both blocking items are resolved on this head — nicely done, and thanks for the precise fix.
I'm dismissing my earlier change request since its specific concern (header width/alignment) is fixed and now covered by a test. One note: no CI checks have run on this head (the PR's check list is empty), so the widget tests aren't CI-verified yet — they should run green before merge. Leaving this as a positive signal; a maintainer can formally approve and merge once CI is green. This is automated maintainer feedback on behalf of the Omi maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks @Dragonire9 — the code side of this is in good shape. Reviewing each changed file:
app/lib/ui/components/omi_settings.dart:OmiSectionHeadernow uses a full-widthWrapwithWrapAlignment.spaceBetweenand centered runs instead ofRow+Expanded. That's the right fix —Expandedinside the oldRowforced the trailing control into whatever space was left, which is exactly what overflowed;Wrapsizes children intrinsically and flows the trailing control below the title when space runs out.Semantics(header: true)is preserved, and wide-screen flush-right alignment is retained (covered by your 500×300 test).app/lib/pages/settings/developer_mcp_section.dartandapp/lib/pages/settings/widgets/developer_api_keys_section.dart: clean mechanicalRow(mainAxisSize: min)→Wrap(spacing/runSpacing: OmiSpacing.xs)swaps, with the now-redundantSizedBoxspacers correctly removed sinceWrap.spacingprovides them.app/test/widgets/settings/developer_section_overflow_test.dart: solid hermetic coverage — 320×600 at 1.3× text scale across en/de/fr asserting no layout exception, wrap-under-title at 200×300, and wide-screen alignment at 500×300, with properaddTearDownview resets.
Requesting changes only for the PR Metadata Preflight failure (verified in the run logs), which is contributor-fixable metadata rather than a code problem:
- Failure-Class declaration (failure-class-protocol): a commit subject starting with
fix:requires exactly one of these lines in the PR body:Failure-Class: FC-<lower-kebab-slug>Failure-Class: newFailure-Class: none
- UI evidence (ui-evidence): UI source changed but the PR body has no tracked screenshot reference or an explicit
UI-Evidence: noneline. Either add a screenshot of the fixed headers on a narrow viewport (stored under.agent-artifacts/ui-evidence/<pr-number-or-branch-slug>/and referenced via a commit-pinned raw URL) — which would be genuinely useful for a layout fix — or add the exact lineUI-Evidence: none.
Once those two metadata items are added, this should be in good shape for merge. The existing flutter and positive-signal labels stay.
This review was authored by an AI maintainer assistant on behalf of the Omi maintainers.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
|
@Git-on-my-level Thank you for the guidance! I have updated the PR description to include both required preflight declarations:
All preflight checks and metadata validations should now pass smoothly. Ready for final maintainer sign-off! |
|
Follow-up on my earlier review: both metadata blockers are now resolved. The PR body declares For the record, the code side stands as previously reviewed:
From my side this looks ready for merge; leaving formal approval and the merge decision to a human maintainer. The by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Withdrawing this pull request and closing it. For the record: I committed and engineered these fixes under the expectation of the repository's paid bug bounty program, not as unpaid open-source charity. All unmerged contributions are permanently withdrawn. |
|
Hey @Dragonire9 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
Failure-Class: none
UI-Evidence: none
Resolves #19240
Problem
In Developer Settings, the "Developer API" and "MCP" section headers place action buttons ("Docs" and "+ Create Key") inside a rigid, non-wrapping
Rowpassed toOmiSectionHeader.trailing. On narrow viewports (320–375 pt) or in languages with longer strings (GermanEntwickler-API, French) or at larger text sizes (1.3×+ text scaling), the header buttons overflow the right edge of the screen.Solution
OmiSectionHeader, wrap the title and trailing widget using a responsiveWrapwithWrapAlignment.spaceBetween, allowing the trailing buttons to cleanly drop below the title rather than overflowing horizontally when horizontal space is constrained.DeveloperApiKeysSectionandDeveloperMcpSection, useWrapwith consistent spacing (spacing: OmiSpacing.xs, runSpacing: OmiSpacing.xs) for the trailing action buttons.developer_section_overflow_test.dartasserting that the Developer API and MCP sections render without any layout overflow on narrow (320 pt) viewports across English, German, and French at 1.3× text scale.