Skip to content

Fix search-only omnibar margin leaking onto the Duck.ai input - #9409

Merged
YoussefKeyrouz merged 1 commit into
developfrom
fix/youssef/margin_duckai_UTI_fix
Aug 6, 2026
Merged

Fix search-only omnibar margin leaking onto the Duck.ai input#9409
YoussefKeyrouz merged 1 commit into
developfrom
fix/youssef/margin_duckai_UTI_fix

Conversation

@YoussefKeyrouz

@YoussefKeyrouz YoussefKeyrouz commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Task/Issue URL: https://app.asana.com/1/137249556945/project/1212810093780571/task/1217145379104435?focus=true
Tech Design URL (if applicable):
API Proposals URL(s) (if applicable):

Description

In search-only address-bar mode, the Duck.ai input field showed an extra ~16dp gap on its leading (start) side. The native input's shared card was picking up the browser omnibar's start margin and keeping it when the same widget re-rendered as the Duck.ai input.applyOmnibarShape() sets the browser omnibar's margin on the shared input card, but had no reset path when shared with other places.

Fix:
In applyOmnibarShape():

  • The else branch now resets marginStart to its resting value (0) for any non-omnibar state, so the margin can't leak onto the shared Duck.ai card.

Test the omnibar in each location (top, bottom, split) in Search only mode:

  • Browser omnibar: on the NTP or a loaded page, focus the omnibar. The native input opens with the correct omnibar shape
  • Duck.ai input (the fix): open/load Duck.ai. The input field's leading margin is correct (no extra ~16dp gap between the leading edge and the field)
  • Unfocus the Native field in duck.ai, no gaps between the field and the fire button

Regression spot-checks

  • Contextual Duck.ai sheet : No impact on look.
  • Search _ Duck.ai mode: No impact on look.

UI changes

Before After
Screenshot_20260805_120605 Screenshot_20260805_120408
Screenshot_20260805_120609 Screenshot_20260805_120411

Note

Low Risk
Localized UI layout logic in NativeInputModeWidget with no auth, data, or API changes; risk is limited to omnibar/Duck.ai card positioning regressions.

Overview
Fixes search-only omnibar horizontal margin leaking onto the shared Duck.ai input card when both widgets observe the same per-tab state.

applyOmnibarShape() no longer exits early for non-browser, bottom, or toggle-visible states. It now applies the wide top search-only browser shape (radius + margins) only when BROWSER, toggle hidden, and not bottom; every other state clears marginStart on the parent MaterialCardView so omnibar margins don’t stick on Duck.ai layouts. Layout params are always updated after that branch.

Reviewed by Cursor Bugbot for commit d8e7328. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@malmstein
malmstein self-requested a review August 5, 2026 19:58
@malmstein malmstein self-assigned this Aug 6, 2026

@malmstein malmstein left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice work, thanks @YoussefKeyrouz !

@YoussefKeyrouz
YoussefKeyrouz merged commit 09f9f1c into develop Aug 6, 2026
25 of 26 checks passed
@YoussefKeyrouz
YoussefKeyrouz deleted the fix/youssef/margin_duckai_UTI_fix branch August 6, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants