Floating bar: wider notifications, collapsed bar height fix, rename button#5953
Floating bar: wider notifications, collapsed bar height fix, rename button#5953
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Notification width back to 430px (matching AI chat width) for better readability. When showing a notification while the bar is collapsed, use minBarSize height instead of expandedBarSize height so the bar area stays compact. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR makes three small, targeted UI fixes to the macOS floating control bar:
The core logic change in Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[showNotification called] --> B{state.isHoveringBar?}
B -- Yes --> C[barHeight = expandedBarSize.height 50px]
B -- No --> D[barHeight = minBarSize.height 14px]
C --> E[targetSize = 430 × barHeight + 8 + 108]
D --> E
E --> F[resizeAnchored animated]
G[dismissNotification] --> H{state.isVoiceListening?}
H -- Yes --> I[resize to expandedWidth × expandedBarSize.height]
H -- No --> J{state.isHoveringBar?}
J -- Yes --> K[resize to expandedBarSize]
J -- No --> L[resize to minBarSize]
M[resizeForHover] --> N{!showingAIConversation\n!isVoiceListening\n!isShowingNotification}
N -- Guard fails --> O[return early — no resize]
N -- Guard passes --> P[resize to expanded or collapsed size]
Reviews (1): Last reviewed commit: "Restore notification width to 430px and ..." | Re-trigger Greptile |
| private static let maxBarSize = NSSize(width: 1200, height: 1000) | ||
| private static let expandedWidth: CGFloat = 430 | ||
| private static let notificationWidth: CGFloat = 300 | ||
| private static let notificationWidth: CGFloat = 430 |
There was a problem hiding this comment.
Redundant constant — same value as
expandedWidth
notificationWidth and expandedWidth are now both 430. Having two separate constants with identical values risks silent divergence if one is updated without the other in future. Consider aliasing them:
| private static let notificationWidth: CGFloat = 430 | |
| private static let notificationWidth: CGFloat = expandedWidth |
This makes the relationship explicit and ensures they stay in sync.
| } else if isHovering || state.showingAIConversation { | ||
| VStack(spacing: 1) { | ||
| compactButton(title: "Ask omi", keys: shortcutSettings.askOmiKey.hintKeys) { | ||
| compactButton(title: "Ask omi / Collapse", keys: shortcutSettings.askOmiKey.hintKeys) { |
There was a problem hiding this comment.
"Collapse" label visible during AI conversation state
The condition for this block is isHovering || state.showingAIConversation, so the "Ask omi / Collapse" button also renders while the AI conversation is open — where the dedicated xmark close button already handles dismissal. Calling onAskAI() in that state likely re-triggers or no-ops the AI flow rather than collapsing the bar, making the "/ Collapse" hint potentially misleading in that context. If the "Collapse" action is only meaningful when hovering (not yet in AI mode), you could restrict the label:
| compactButton(title: "Ask omi / Collapse", keys: shortcutSettings.askOmiKey.hintKeys) { | |
| compactButton(title: isHovering && !state.showingAIConversation ? "Ask omi / Collapse" : "Ask omi", keys: shortcutSettings.askOmiKey.hintKeys) { |
Or simply keep "Ask omi" as the AI-conversation variant since there's already a close button there.
…utton (BasedHardware#5953) ## Summary - Restore notification width to 430px (was reduced to 300px, too narrow for text) - Use collapsed bar height (14px) instead of expanded height (50px) when showing notifications while bar is collapsed — prevents the bar area from expanding unnecessarily - Rename expanded hover button from "Ask omi" to "Ask omi / Collapse" for clarity ## Test plan - [x] Build compiles - [ ] Notification card appears at full 430px width - [ ] Collapsed bar pill stays small when notification appears - [ ] Expanded hover shows "Ask omi / Collapse" label 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
Test plan
🤖 Generated with Claude Code