Skip to content

[codex] Unify floating chat surface across notch and pill modes#8886

Merged
Git-on-my-level merged 7 commits into
BasedHardware:mainfrom
Git-on-my-level:unified-floating-chat-surface
Jul 2, 2026
Merged

[codex] Unify floating chat surface across notch and pill modes#8886
Git-on-my-level merged 7 commits into
BasedHardware:mainfrom
Git-on-my-level:unified-floating-chat-surface

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • unify the floating chat surface so non-notch displays keep the compact pill when collapsed but open into the same chat experience as notched displays
  • remove the old separate floating agent window/view path and route pill-mode agent rows through the unified surface
  • add guard coverage so non-notch expanded chat cannot drift back into the old bar chrome path

Validation

  • xcrun swift test --package-path desktop/macos/Desktop --filter 'FloatingBarGeometryTests|AgentPillLifecycleTests'
  • git diff --check
  • launched forced non-notch bundle: /Applications/omi-force-no-notch.app with OMI_FORCE_NO_NOTCH=1, bridge 47931
  • launched notched bundle: /Applications/omi-notch-chat.app, bridge 47932, verified floatingBarUsesNotchIsland: true

Review in cubic

Git-on-my-level and others added 7 commits July 2, 2026 16:47
Route non-notch AI conversations through the same unified floating
surface as notch mode: one expanded width, one input-height budget,
one header treatment. Idle state keeps the compact pill on displays
without a notch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Same state graph on both display modes (collapsed -> agent list -> chat),
with per-mode entry gestures:

- Aggregate agent-status gem on the idle pill (failed > running > queued
  > done > stopped), breathing while agents run
- Agents row with per-agent status dots in the hover-expanded bar;
  click opens the same agent list surface the notch shows on hover
- Agent list un-gated from notch mode: click-pinned on non-notch,
  closed by esc, click-away, selecting an agent, or last agent ending
- Back from a subagent chat returns to the agent rows on both modes
- Rounded top corners on the floating surface when not flush with a
  physical notch; phantom notch center gap collapsed to a small
  deliberate one on displays without a camera housing
- OMI_FORCE_NO_NOTCH=1 testing hook to exercise the pill surface on
  notched hardware

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
In-process PNG capture of the floating control bar window so agents can
collect visual evidence without Screen Recording permission.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Feedback round on the first-class pill work:

- Delete the legacy subagent UI entirely (AgentPillsWindow, AgentPillsView
  pill squares + hover popover) — the unified floating surface is the only
  chat/subagent UI on macOS. AgentProviderLogoMark extracted to its own
  file since the unified rows still use it.
- Hovering the pill now unfurls the agent rows (same surface as the notch
  hover menu) instead of the fat hover bar; moving the pointer away
  collapses back to the pill via a delayed global-mouse recheck.
- Drop the notch chrome band from pill-mode expanded surfaces — no more
  floating logo ring in a weird spot; rows and chat start under a slim
  top inset with rounded corners.
- Replace the status gem with an aggregate status glow on the pill itself
  (PTT-style, breathing while agents run).
- Fix drift: chat opened from the taller agent list now records the true
  pill center, and dead barChrome conversation code (a competing legacy
  chat surface) is removed along with the identical-branch Ask Omi resize.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… pill

- Voice-response glow wraps the full rounded perimeter on non-notch
  displays (drawn slightly inset so it never clips); notch mode keeps the
  lower-edge glow that blends into the bezel.
- The collapsed pill's fill is now the aggregate subagent status color
  (amber running, green done, red failed) with the breathing halo on top,
  so agent activity is visible without hovering. Finished agents the user
  has viewed go quiet. The collapsed window grows by the same glow outset
  the voice glow uses, and barChrome no longer clips the halo.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Root cause of both: resizeForHover could be guarded into a no-op while
the view still flipped isHovering, so the 210pt expanded bar rendered
inside the small collapsed window. The hosting view then force-grew the
window with the origin pinned — extending it rightward — and every later
center-preserving resize kept the shifted midX.

- resizeForHover now reports whether it actually resized, and the view
  only shows the expanded bar when it did.
- Every collapse-to-idle (hover exit, agent-list close, glow observers)
  snaps to the canonical pill frame — the user's saved dragged position,
  else the default top-center — so transient drift can never persist.
- The voice-glow observer no longer collapses the window out from under
  a rendered hover bar (isHoveringBar / open-list guards).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

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

1 issue found across 12 files

Confidence score: 4/5

  • In desktop/macos/Desktop/Sources/FloatingControlBar/FloatingControlBarView.swift, the early-return pill-mode agent-list path can skip clearing isHovering, which may leave legacy expanded hover chrome visibly stuck after mode switches; this is a user-facing polish regression rather than a core flow break—reset isHovering in that branch before merging to keep hover state transitions consistent.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="desktop/macos/Desktop/Sources/FloatingControlBar/FloatingControlBarView.swift">

<violation number="1" location="desktop/macos/Desktop/Sources/FloatingControlBar/FloatingControlBarView.swift:750">
P2: Pill-mode hover can leave the legacy expanded hover chrome stuck on because the new early-return agent-list path never clears `isHovering`. Resetting `isHovering` in this branch keeps the UI consistent when switching between hover-expanded bar and pill agent rows.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment on lines +750 to +758
if !agentPills.pills.isEmpty, !state.showingAIConversation {
let barWindow = window as? FloatingControlBarWindow
if effectiveHover {
barWindow?.setPillAgentListVisible(true)
} else {
barWindow?.schedulePillAgentListCollapse()
}
return
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: Pill-mode hover can leave the legacy expanded hover chrome stuck on because the new early-return agent-list path never clears isHovering. Resetting isHovering in this branch keeps the UI consistent when switching between hover-expanded bar and pill agent rows.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/macos/Desktop/Sources/FloatingControlBar/FloatingControlBarView.swift, line 750:

<comment>Pill-mode hover can leave the legacy expanded hover chrome stuck on because the new early-return agent-list path never clears `isHovering`. Resetting `isHovering` in this branch keeps the UI consistent when switching between hover-expanded bar and pill agent rows.</comment>

<file context>
@@ -753,13 +743,31 @@ struct FloatingControlBarView: View {
+        // With subagents present, hovering the pill unfurls the agent rows —
+        // the same surface the notch shows on hover — instead of the legacy
+        // expanded bar. Moving the pointer away collapses back to the pill.
+        if !agentPills.pills.isEmpty, !state.showingAIConversation {
+            let barWindow = window as? FloatingControlBarWindow
+            if effectiveHover {
</file context>
Suggested change
if !agentPills.pills.isEmpty, !state.showingAIConversation {
let barWindow = window as? FloatingControlBarWindow
if effectiveHover {
barWindow?.setPillAgentListVisible(true)
} else {
barWindow?.schedulePillAgentListCollapse()
}
return
}
if !agentPills.pills.isEmpty, !state.showingAIConversation {
withAnimation(.easeInOut(duration: 0.12)) {
isHovering = false
}
let barWindow = window as? FloatingControlBarWindow
if effectiveHover {
barWindow?.setPillAgentListVisible(true)
} else {
barWindow?.schedulePillAgentListCollapse()
}
return
}

@Git-on-my-level Git-on-my-level merged commit baa0d4d into BasedHardware:main Jul 2, 2026
2 checks passed

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1bd366bc75

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +981 to +982
Button {
openAgentInChat(pill)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve pill position before opening subagent chat

On non-notched displays with the draggable floating bar enabled, selecting one of these new in-window pill rows expands the same window via openAgentInChat without first recording the collapsed pill position. That leaves preChatCenter nil, so closeAIConversation() falls back to the expanded chat window's center and the compact pill reappears shifted down/centered under the 382px chat surface; the old separate AgentPillsWindow path did not resize the bar itself. Capture the pill's top-center before presenting the agent chat.

Useful? React with 👍 / 👎.

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