Skip to content

fix(settings): prevent developer section headers overflow on narrow viewports (#19240) - #21321

Closed
Dragonire9 wants to merge 6 commits into
BasedHardware:mainfrom
Dragonire9:fix/developer-settings-overflow-19240
Closed

Dragonire9 wants to merge 6 commits into
BasedHardware:mainfrom
Dragonire9:fix/developer-settings-overflow-19240

Conversation

@Dragonire9

@Dragonire9 Dragonire9 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

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 Row passed to OmiSectionHeader.trailing. On narrow viewports (320–375 pt) or in languages with longer strings (German Entwickler-API, French) or at larger text sizes (1.3×+ text scaling), the header buttons overflow the right edge of the screen.

Solution

  1. Adaptive Header Layout: In OmiSectionHeader, wrap the title and trailing widget using a responsive Wrap with WrapAlignment.spaceBetween, allowing the trailing buttons to cleanly drop below the title rather than overflowing horizontally when horizontal space is constrained.
  2. Wrap Actions: In DeveloperApiKeysSection and DeveloperMcpSection, use Wrap with consistent spacing (spacing: OmiSpacing.xs, runSpacing: OmiSpacing.xs) for the trailing action buttons.
  3. Hermetic Regression Test: Added developer_section_overflow_test.dart asserting 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.

View guided diff

@Git-on-my-level Git-on-my-level left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 used Row + Expanded(title): a Row with MainAxisSize.max always fills the available width, so trailing controls were flush right. The new Wrap behaves differently in an important way: under the loose cross-axis constraints passed down by the surrounding Column (crossAxisAlignment: CrossAxisAlignment.start), Wrap shrink-wraps to its content width. WrapAlignment.spaceBetween only distributes leftover slack, so whenever the title and trailing fit on a single run, spaceBetween is a no-op and the trailing sits immediately after the title instead of at the right edge. That silently changes the appearance of every OmiSectionHeader with 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. Since spaceBetween suggests 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 to Wrap with spacing/runSpacing is the right idea and drops the manual SizedBox spacer 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, takeException null, plus a constrained OmiSectionHeader test). 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.

@Git-on-my-level Git-on-my-level added the flutter flutter work label Oct 12, 2026
@Dragonire9

Copy link
Copy Markdown
Contributor Author

@Git-on-my-level Thank you for the sharp catch on OmiSectionHeader's width constraints!

Addressed both points:

  1. app/lib/ui/components/omi_settings.dart (commit 8c07ca8):
    • Wrapped Wrap in SizedBox(width: double.infinity, child: Wrap(...)) so it expands across the available horizontal space under the surrounding Column's start cross-axis constraints.
    • Now WrapAlignment.spaceBetween properly pushes trailing controls (like the "Beta" tag) flush right when title and trailing fit on a single run, while wrapping under title on constrained viewports.
  2. app/test/widgets/settings/developer_section_overflow_test.dart (commit 18c16f4):
    • Added OmiSectionHeader aligns trailing widget to the right edge on wide screens asserting (headerTopRight.dx - trailingTopRight.dx).abs() <= 5.0 on wide viewports.

Ready for merge sign-off!

@Git-on-my-level
Git-on-my-level dismissed their stale review October 13, 2026 19:17

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.

@Git-on-my-level

Copy link
Copy Markdown
Member

Follow-up to my earlier review: both blocking items are resolved on this head — nicely done, and thanks for the precise fix.

  • app/lib/ui/components/omi_settings.dart — OmiSectionHeader now wraps its Wrap in SizedBox(width: double.infinity, ...), so under the surrounding Column's start cross-axis constraints the header fills the available width and WrapAlignment.spaceBetween pushes the trailing flush right when title and trailing share a single run, while still dropping the trailing under the title when space is constrained. I checked the callers you didn't touch (settings_groups.dart "Beta" tag, device_diagnostics.dart, auto_sync_page.dart, chat_apps_page.dart) — they pass compact trailing widgets, so their wide-screen appearance is preserved.
  • app/test/widgets/settings/developer_section_overflow_test.dart — the new wide-viewport test pins exactly the regression the earlier review worried about: it asserts the trailing text's right edge lands within ~5px of the header's right edge at 500pt, and the narrow-viewport tests (320pt, 1.3x text scale, en/de/fr) remain in place.
  • app/lib/pages/settings/widgets/developer_api_keys_section.dart and app/lib/pages/settings/developer_mcp_section.dart — unchanged since the earlier review; the trailing Row→Wrap swap with OmiSpacing.xs spacing/runSpacing in place of the manual SizedBox spacers is correct, with button handlers untouched.

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 need human response.

@Git-on-my-level Git-on-my-level added the positive-signal Automation verified a genuine fix/quality contribution label Oct 13, 2026

@Git-on-my-level Git-on-my-level left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Dragonire9 — the code side of this is in good shape. Reviewing each changed file:

  • app/lib/ui/components/omi_settings.dart: OmiSectionHeader now uses a full-width Wrap with WrapAlignment.spaceBetween and centered runs instead of Row + Expanded. That's the right fix — Expanded inside the old Row forced the trailing control into whatever space was left, which is exactly what overflowed; Wrap sizes 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.dart and app/lib/pages/settings/widgets/developer_api_keys_section.dart: clean mechanical Row(mainAxisSize: min) → Wrap(spacing/runSpacing: OmiSpacing.xs) swaps, with the now-redundant SizedBox spacers correctly removed since Wrap.spacing provides 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 proper addTearDown view 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:

  1. 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: new
    • Failure-Class: none
  2. UI evidence (ui-evidence): UI source changed but the PR body has no tracked screenshot reference or an explicit UI-Evidence: none line. 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 line UI-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.

@Dragonire9

Copy link
Copy Markdown
Contributor Author

@Git-on-my-level Thank you for the guidance! I have updated the PR description to include both required preflight declarations:

  • Failure-Class: none
  • UI-Evidence: none

All preflight checks and metadata validations should now pass smoothly. Ready for final maintainer sign-off!

@Git-on-my-level

Copy link
Copy Markdown
Member

Follow-up on my earlier review: both metadata blockers are now resolved. The PR body declares Failure-Class: none and UI-Evidence: none, and PR Metadata Preflight passes on the current head — no code changes were needed.

For the record, the code side stands as previously reviewed:

  • app/lib/ui/components/omi_settings.dart: OmiSectionHeader replaces the old Row + Expanded with a full-width Wrap (WrapAlignment.spaceBetween, centered runs, OmiSpacing.sm/OmiSpacing.xs), so the trailing controls flow under the title instead of overflowing; Semantics(header: true) and wide-screen flush-right alignment are retained.
  • app/lib/pages/settings/developer_mcp_section.dart and app/lib/pages/settings/widgets/developer_api_keys_section.dart: clean swaps of the trailing Row(mainAxisSize: min) for Wrap(spacing/runSpacing: OmiSpacing.xs), with the now-redundant SizedBox spacers correctly removed.
  • app/test/widgets/settings/developer_section_overflow_test.dart: solid hermetic coverage — no layout exception at 320x600 with 1.3x text scale across en/de/fr, wrap-under-title at 200x300, and flush-right trailing alignment at 500x300.

From my side this looks ready for merge; leaving formal approval and the merge decision to a human maintainer. The flutter and positive-signal labels stay.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@Dragonire9

Copy link
Copy Markdown
Contributor Author

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.

@Dragonire9 Dragonire9 closed this Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our product principles and locked invariants

Before your next PR, please skim:

  • PRODUCT.md — product north star
  • Product invariants — locked rules (shared chat, memory tiers, agent control plane, integrations, brand)

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flutter flutter work positive-signal Automation verified a genuine fix/quality contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Developer settings: API and MCP section buttons overflow in German and French and at larger text

2 participants