Skip to content

Floating bar: wider notifications, collapsed bar height fix, rename button#5953

Merged
kodjima33 merged 2 commits intomainfrom
floating-bar-notification-tweaks
Mar 23, 2026
Merged

Floating bar: wider notifications, collapsed bar height fix, rename button#5953
kodjima33 merged 2 commits intomainfrom
floating-bar-notification-tweaks

Conversation

@kodjima33
Copy link
Copy Markdown
Collaborator

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

  • 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

kodjima33 and others added 2 commits March 23, 2026 16:25
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>
@kodjima33 kodjima33 merged commit b138f41 into main Mar 23, 2026
3 checks passed
@kodjima33 kodjima33 deleted the floating-bar-notification-tweaks branch March 23, 2026 20:35
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 23, 2026

Greptile Summary

This PR makes three small, targeted UI fixes to the macOS floating control bar:

  • Notification width restored to 430px (matching expandedWidth) from an over-narrow 300px.
  • Collapsed-bar notification height fixedshowNotification now uses minBarSize.height (14px) when the bar is collapsed instead of always using expandedBarSize.height (50px), preventing the bar area from unexpectedly growing while the pill is in its compact state.
  • Button label clarified from "Ask omi" to "Ask omi / Collapse" on the expanded hover surface.

The core logic change in showNotification is correct: it reads the already-synchronously-set state.isHoveringBar flag, and resizeForHover already guards against running while a notification is active (!state.isShowingNotification), so the two resize paths cannot conflict. Two non-blocking P2 notes were flagged: notificationWidth and expandedWidth are now identical values that could drift apart, and the "/ Collapse" suffix in the button label is also visible during the AI conversation state where a dedicated close button already exists.

Confidence Score: 5/5

  • Safe to merge — all three changes are small, targeted, and correct with no logic regressions.
  • The height fix reads an already-synchronously-set state flag and cannot conflict with the existing hover-resize guard. The width restore and label rename are trivial. Both P2 comments are cosmetic/maintenance concerns that don't block shipping.
  • No files require special attention.

Important Files Changed

Filename Overview
desktop/Desktop/Sources/FloatingControlBar/FloatingControlBarWindow.swift Restores notificationWidth to 430px and fixes showNotification to use the actual bar height (14px collapsed vs 50px expanded) based on the current hover state. Logic is sound; resizeForHover already guards against running during notifications.
desktop/Desktop/Sources/FloatingControlBar/FloatingControlBarView.swift Simple label rename from "Ask omi" to "Ask omi / Collapse" for the expanded hover button — no logic changes.

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]
Loading

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
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.

P2 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:

Suggested change
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) {
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.

P2 "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:

Suggested change
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.

Glucksberg pushed a commit to Glucksberg/omi-local that referenced this pull request Apr 28, 2026
…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)
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.

1 participant