-
Notifications
You must be signed in to change notification settings - Fork 34
[macOS] - Design feedback fixes for aichat omnibar #2701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements design feedback fixes for the AI Chat omnibar feature on macOS, focusing on visual refinements and bug fixes to improve the user experience.
- Hides the bookmark button when the address bar is focused with AI Chat omnibar enabled
- Adjusts padding and spacing constants to increase input field size
- Fixes placeholder text to only show on the new tab page
- Implements Shift+Enter functionality to insert newlines in duck.ai mode
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| AddressBarStyleProviding.swift | Reduced top and bottom padding from 4pt to 3pt for AI Chat focused state to increase input field size |
| SuggestionContainerViewModel.swift | Added early return guards in selectRow and clearRowSelection to prevent unnecessary updates |
| SuggestionViewController.swift | Implemented re-entrancy protection for table selection synchronization to prevent infinite loops |
| AddressBarViewController.swift | Updated placeholder logic to only show AI hint on new tab page; added mode switching interaction tracking |
| AddressBarButtonsViewController.swift | Hidden bookmark button when text field is focused with AI Chat omnibar enabled |
| AddressBarSharedTextState.swift | Added tracking for user interaction after mode switching to preserve newlines correctly |
| MainViewController.swift | Implemented Shift+Enter to insert newline when switching to AI Chat mode |
| MainView.swift | Reduced AI Chat omnibar container minimum height from 100pt to 60pt |
| AIChatOmnibarTextContainerViewController.swift | Adjusted spacing constants and fixed height calculation by removing duplicate inset addition |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
macOS/DuckDuckGo/NavigationBar/View/AddressBarViewController.swift
Outdated
Show resolved
Hide resolved
macOS/DuckDuckGo/NavigationBar/View/AddressBarViewController.swift
Outdated
Show resolved
Hide resolved
macOS/DuckDuckGo/NavigationBar/View/AddressBarViewController.swift
Outdated
Show resolved
Hide resolved
aataraxiaa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested all scenarios and they work as expected. Left one comment re: reducing some some duplication.
| if case .editing(.aiChat) = controllerMode { | ||
| bookmarkButton.isShown = false | ||
| updateAIChatDividerVisibility() | ||
| return | ||
| } | ||
|
|
||
| if isTextFieldEditorFirstResponder && featureFlagger.isFeatureOn(.aiChatOmnibarToggle) { | ||
| bookmarkButton.isShown = false | ||
| updateAIChatDividerVisibility() | ||
| return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we combine these into one conditional OR statement?
Task/Issue URL: https://app.asana.com/1/137249556945/project/1204167627774280/task/1212223846179381?focus=true
Description
Fixes:
Testing Steps
Do not show bookmark button when URL is focused
Only display the "Press tab then enter" placeholder on the new tab page
Shift + Enter injects new line on duck.ai
Going back to duck.ai does not removes the new lines
Impact and Risks
Low: Minor visual changes, small bug fixes, improvement to existing features
What could go wrong?
Regressions
Note
Refines AI Chat omnibar UX (layout, keyboard, state sharing) and improves suggestion selection syncing and address bar behavior.
AIChatOmnibarTextContainerViewControllerandMainView(min height now60; bottom padding34; divider top offset-10).insertNewline()to programmatically add newline inAIChatOmnibarTextContainerViewController.MainViewController,Shift/Option+Entertoggles to Duck AI; if switching to AI chat, inject a newline automatically.AddressBarSharedTextState: trackhasUserInteractedWithTextAfterSwitchingModeswith setters/resets; set on text updates.AddressBarViewController: placeholder/hint only on new tab; on mode toggle, restore/share text only if user interacted after switching; force layout after refocus; reset the new interaction flag.AddressBarButtonsViewController: hide bookmark button when the text field is focused and AI Chat toggle is enabled; related visibility updates.SuggestionViewController: replace direct index subscription with sync method; prevent re-entrancy; sync table selection with view model (including default row); guardtableViewSelectionDidChange.SuggestionContainerViewModel: make row-selection APIs robust (bounds checks, no-ops on same selection, coordinatedselectedRowIndex/selectionIndex, optimized clears).CurrentAddressBarStyleProvider(from4to3).Written by Cursor Bugbot for commit cdd44f6. This will update automatically on new commits. Configure here.