Skip to content

fix(desktop): mute Floating Bar notification previews independently - #10956

Merged
undivisible merged 3 commits into
BasedHardware:mainfrom
jnnabugwu:fix/6765-mute-floating-bar-notification-previews
Aug 3, 2026
Merged

undivisible merged 3 commits into
BasedHardware:mainfrom
jnnabugwu:fix/6765-mute-floating-bar-notification-previews

Conversation

@jnnabugwu

@jnnabugwu jnnabugwu commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

What changed and why

Floating Bar in-app notification previews had no independent off switch and
weren't affected by macOS Focus/DND, so proactive notifications showed
twice (in-bar preview + native banner) and the bar would temporarily
reappear just to render a preview users couldn't silence. Adds a
"Notification Previews" toggle (default on) so users can mute in-bar
previews while keeping native macOS notifications. Closes #6765.

Out of scope

Real macOS Focus/DND auto-muting (the other optional item from #6765) is
deferred to a follow-up issue/PR, not included here. It requires
INFocusStatusCenter, which needs the com.apple.developer.focus-status
entitlement — an Apple-gated capability requiring a manual approval request
filed with Apple, not a self-service Xcode checkbox. This repo has no
existing usage of it and doesn't hold the entitlement today (Omi.entitlements
/ Omi-Release.entitlements only grant applesignin, audio-input,
screen-capture, and automation). Since that approval can't be obtained as
part of this PR, code built against it couldn't be exercised or verified, so
it's scoped out rather than shipped as unverifiable. The other optional item
from the issue — "only show in-bar previews when Floating Bar is enabled" —
is not deferred; the policy's floatingBarEnabled check already prevents
the in-bar preview (and the earlier forced bar reveal) whenever the bar is
off, with no separate toggle needed. That case intentionally stays silent
rather than falling back to a system banner, matching pre-existing behavior
and avoiding the contentless-banner confusion noted in NotificationService.

Product invariants affected

  • INV-CHAT-1 (path-matched via desktop/macos/Desktop/Sources/FloatingControlBar/ShortcutSettings.swift; the toggle only mutes in-bar preview rendering and does not fork the shared transcript)

How it was verified

  • xcrun swift build -c debug --package-path Desktop
  • ./scripts/dev-feedback.py --once swift 'FloatingBarNotificationPreviewPolicyTests'
  • Manual QA on a named dev bundle (OMI_APP_NAME=omi-fix-6765 ./run.sh --yolo):
    • Previews ON → proactive notification still shows under the Floating Bar (unchanged default behavior)
    • Previews OFF (bar enabled) → no in-bar card; native macOS banner still appears instead
    • Floating Bar disabled → no in-bar card and no temporary bar reveal for notifications; no forced system banner either (matches pre-existing silent behavior for this case, since a contentless banner was previously reported as confusing)
    • Snooze still suppresses both paths
    • Master Notifications toggle OFF still suppresses proactive notifications
  • Screen recording of the above QA checklist attached

Tests

Added FloatingBarNotificationPreviewPolicyTests covering the policy matrix:
previews+bar enabled (preview shown, no forced banner), bar disabled with
previews on (no preview, no forced banner), previews muted with bar enabled
(no preview, banner fallback), bar disabled with previews also muted (still
no forced banner), and explicit deliverSystemBanner: true (always delivers
regardless of preview state).

Failure class (fixes)

Failure-Class: none

Scoped cleanups (optional)

None.

##Video proof

Screen.Recording.2026-07-31.at.6.11.22.PM.mov

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 7 files

Tip: cubic used a learning from your PR history. Let your coding agent read cubic learnings directly with the cubic MCP.

Re-trigger cubic

…g Bar

FloatingBarNotificationPreviewPolicy.shouldDeliverSystemBanner fell back to
a native banner whenever the in-bar preview was suppressed for either of two
reasons: the user muted previews, or the Floating Bar itself was disabled.

NotificationService.sendNotification already documented why that second
case shouldn't happen: a bare system banner carries no conversation context,
and showing one specifically because the Floating Bar was disabled was
previously reported as confusing. The fallback added for BasedHardware#6765 silently
reversed that decision while the doc comment still claimed it hadn't
changed.

Narrow the fallback to fire only when the user explicitly muted previews
while the Floating Bar stays enabled — the one case where the user asked to
be notified some other way. Disabling the Floating Bar remains silent for
floating-bar-only notifications, same as before this policy existed.

Failure-Class: none
Follow the existing typed-key pattern (DefaultsKey.authUserId, etc.)
instead of a raw "shortcut_floatingBarNotificationPreviewsEnabled" string
literal in ShortcutSettings.
@Git-on-my-level Git-on-my-level added needs-maintainer-review Needs a human maintainer to sign off before merge security-review Touches auth, provider routing, secrets, or security-sensitive surfaces macOS labels Aug 1, 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 for the focused fix here. The policy split is a nice direction: the new toggle is default-on, the notification delivery decision is isolated in FloatingBarNotificationPreviewPolicy, and the tests cover the important matrix including the “Floating Bar disabled should stay silent” case.

I’m not formally approving this one because it changes notification delivery/privacy behavior and there is no passing check summary visible on the PR. A maintainer should confirm the intended UX/privacy tradeoff before merge: when a user disables in-bar previews while the Floating Bar remains enabled, assistant notification content moves to a native macOS banner, which may be more visible at the system level than the in-app preview.

One small thing for maintainers to double-check: the settings copy says “When off, notifications use macOS banners instead.” That is accurate only while the Floating Bar itself is enabled; if the bar is disabled, floating-bar-only notifications still stay silent by design. If that nuance matters for user expectation, the copy could be narrowed before merge.

I could not run the macOS Swift build/tests in this Linux review environment (swift/xcrun are unavailable). Static review looks good, and the added policy tests are the right coverage once CI or a macOS maintainer runner confirms them.


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

@jnnabugwu

Copy link
Copy Markdown
Contributor Author

need human response

As a maintainer, do you mean me?

@undivisible undivisible left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maintainer sign-off (merge request from @undivisible): confirming the UX/privacy tradeoff the earlier review asked a maintainer to check. The notification-preview toggle is default-on, so existing users see no behavior change; it only mutes in-bar preview rendering, and the banner-fallback policy matrix is covered by FloatingBarNotificationPreviewPolicyTests. The in-bar preview remains a view over the shared kernel conversation and does not fork or store transcript state, so INV-CHAT-1 is unaffected.

@undivisible
undivisible merged commit 275a488 into BasedHardware:main Aug 3, 2026
36 of 41 checks passed
kodjima33 added a commit that referenced this pull request Aug 3, 2026
…11039)

#10956 extracted the in-bar-preview / system-banner decision out of
NotificationService into FloatingBarNotificationPreviewPolicy, but the new
file was never added to an e2e flow's covers: list. desktop-e2e-flow-coverage
runs --strict on main pushes, so Desktop Swift CI has been red on main since
that merge (275a488).

The policy is called from NotificationService.deliver, which
notifications-settings.yaml already covers, so it belongs on the same flow.

Verified: python3 desktop/macos/scripts/check-e2e-flow-coverage.py --strict
--base e28f753 (the base CI used) fails on
main with "UNCOVERED .../FloatingBarNotificationPreviewPolicy.swift" and
reports Covered: 6 / Uncovered: 0 with this commit.
Git-on-my-level pushed a commit that referenced this pull request Aug 3, 2026
…10956)

## What changed and why

Floating Bar in-app notification previews had no independent off switch
and
weren't affected by macOS Focus/DND, so proactive notifications showed
twice (in-bar preview + native banner) and the bar would temporarily
reappear just to render a preview users couldn't silence. Adds a
"Notification Previews" toggle (default on) so users can mute in-bar
previews while keeping native macOS notifications. Closes #6765.

## Out of scope

Real macOS Focus/DND auto-muting (the other optional item from #6765) is
deferred to a follow-up issue/PR, not included here. It requires
`INFocusStatusCenter`, which needs the
`com.apple.developer.focus-status`
entitlement — an Apple-gated capability requiring a manual approval
request
filed with Apple, not a self-service Xcode checkbox. This repo has no
existing usage of it and doesn't hold the entitlement today
(`Omi.entitlements`
/ `Omi-Release.entitlements` only grant `applesignin`, audio-input,
screen-capture, and automation). Since that approval can't be obtained
as
part of this PR, code built against it couldn't be exercised or
verified, so
it's scoped out rather than shipped as unverifiable. The other optional
item
from the issue — "only show in-bar previews when Floating Bar is
enabled" —
is *not* deferred; the policy's `floatingBarEnabled` check already
prevents
the in-bar preview (and the earlier forced bar reveal) whenever the bar
is
off, with no separate toggle needed. That case intentionally stays
silent
rather than falling back to a system banner, matching pre-existing
behavior
and avoiding the contentless-banner confusion noted in
`NotificationService`.

## Product invariants affected

- INV-CHAT-1 (path-matched via
`desktop/macos/Desktop/Sources/FloatingControlBar/ShortcutSettings.swift`;
the toggle only mutes in-bar preview rendering and does not fork the
shared transcript)

## How it was verified

- `xcrun swift build -c debug --package-path Desktop`
- `./scripts/dev-feedback.py --once swift
'FloatingBarNotificationPreviewPolicyTests'`
- Manual QA on a named dev bundle (`OMI_APP_NAME=omi-fix-6765 ./run.sh
--yolo`):
- Previews ON → proactive notification still shows under the Floating
Bar (unchanged default behavior)
- Previews OFF (bar enabled) → no in-bar card; native macOS banner still
appears instead
- Floating Bar disabled → no in-bar card and no temporary bar reveal for
notifications; no forced system banner either (matches pre-existing
silent behavior for this case, since a contentless banner was previously
reported as confusing)
  - Snooze still suppresses both paths
- Master Notifications toggle OFF still suppresses proactive
notifications
- Screen recording of the above QA checklist attached

## Tests

Added `FloatingBarNotificationPreviewPolicyTests` covering the policy
matrix:
previews+bar enabled (preview shown, no forced banner), bar disabled
with
previews on (no preview, no forced banner), previews muted with bar
enabled
(no preview, banner fallback), bar disabled with previews also muted
(still
no forced banner), and explicit `deliverSystemBanner: true` (always
delivers
regardless of preview state).

## Failure class (fixes)

Failure-Class: none

## Scoped cleanups (optional)

None.


##Video proof



https://github.com/user-attachments/assets/5d365549-0875-4c88-b1b9-ea901a1e0790
Git-on-my-level pushed a commit that referenced this pull request Aug 3, 2026
…11039)

#10956 extracted the in-bar-preview / system-banner decision out of
NotificationService into FloatingBarNotificationPreviewPolicy, but the new
file was never added to an e2e flow's covers: list. desktop-e2e-flow-coverage
runs --strict on main pushes, so Desktop Swift CI has been red on main since
that merge (275a488).

The policy is called from NotificationService.deliver, which
notifications-settings.yaml already covers, so it belongs on the same flow.

Verified: python3 desktop/macos/scripts/check-e2e-flow-coverage.py --strict
--base e28f753 (the base CI used) fails on
main with "UNCOVERED .../FloatingBarNotificationPreviewPolicy.swift" and
reports Covered: 6 / Uncovered: 0 with this commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macOS needs-maintainer-review Needs a human maintainer to sign off before merge security-review Touches auth, provider routing, secrets, or security-sensitive surfaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop: Add option to mute Floating Bar in-app notification previews (respect Focus/DND)

3 participants