Add active and active-plus-critical floatbar modes - #296
Conversation
Pinned providers stay the default. Active shows the provider for the focused supported app or terminal agent. Active plus critical also keeps providers at the warning threshold. An unrelated window keeps the last active provider. Detection is local and can be turned off.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ceiling | 4cd18ff | Commit Preview URL Branch Preview URL |
Aug 15 2026, 06:12 AM |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (30)
📝 WalkthroughWalkthroughThe floating bar now supports pinned, active, and active-plus-critical provider modes. Local foreground detection matches supported applications and terminals, tracks the last active provider, and updates visible providers through persisted settings. ChangesFloating-bar foreground selection
Estimated code review effort: 4 (Complex) | ~60 minutes Merge Risk: ⚪ Minimal · up to This change is merge-ready after normal checks and review; no actionable merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant FloatBar
participant TauriBridge
participant ForegroundWatcher
participant WindowsAPI
FloatBar->>TauriBridge: getForegroundProvider()
TauriBridge->>ForegroundWatcher: get_foreground_provider
ForegroundWatcher->>WindowsAPI: read foreground window
WindowsAPI-->>ForegroundWatcher: executable and title
ForegroundWatcher-->>TauriBridge: provider snapshot
TauriBridge-->>FloatBar: current and last-active provider
ForegroundWatcher-->>FloatBar: foreground-provider-changed
FloatBar->>FloatBar: select visible providers
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8f7f214. Configure here.
A cwd named cursor or codex was treated as the focused agent. Only the title prefix before a path separator is used, and the leftmost agent name wins.
Automated reviewNew in this pass: 2 issues.
Resolved since the previous pass: 10. For coding agents: fix BLOCK and FIX IF QUICK findings now; everything else is tracked or informational; never exceed one CodeRev fix round per PR. Advisory. Findings generated by |
Keep the pinned list until a match exists. Prefer an agent title inside Warp. Recognize Windows Terminal Preview. Use the catalog id for OpenCode Go. Strip mixed-case .exe names. Do not put window titles on the event, and read the focused window off the async runtime.

Summary
SBS-176.
Test plan
cargo test --manifest-path rust/Cargo.toml settings::testscargo test --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml foregroundpnpm --dir apps/desktop-tauri exec vitest run src/floatbar/selection.test.ts src/floatbar/SettingsSection.test.tsx src/floatbar/FloatBar.test.tsxpnpm --dir apps/desktop-tauri run check-localeclaudeterminal, then Chrome, and confirm the last provider stays.Note
Medium Risk
Changes float bar visibility logic and adds periodic foreground process inspection on Windows; non-Windows builds cannot detect focus, so active modes may not behave as users expect outside Windows.
Overview
Adds Pinned, Active, and Active + critical modes for which providers the floating bar shows. Pinned stays the default and unchanged behavior.
Active shows only the last matched provider for the focused supported desktop app or a terminal whose title hints at an agent. Active + critical keeps that provider and also any pinned providers at or above the high-usage warning threshold. If focus is unrelated or unknown, the bar keeps the last active provider instead of clearing.
On Windows, the Tauri backend polls the foreground window (~750ms), maps process path and title to a provider id (Ceiling itself and VS Code are not auto-mapped to Copilot), caches last active, and emits
foreground-provider-changed. The float bar listens and callsget_foreground_provideron mount. Detection is local only—no provider API calls—and can be turned off while staying in an active mode.New persisted settings
floatBarSelectionModeandfloatBarForegroundDetectionflow through the bridge, float bar settings UI (with locale strings), andselectVisibleFloatBarProvidersin the React float bar. Foreground watching is not implemented off Windows (read_foregroundis a stub), so active modes there rely on cached last-active state until/unless detection is added.Reviewed by Cursor Bugbot for commit 4cd18ff. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add active and active-plus-critical selection modes to the FloatBar
active,activePlusCritical) alongside the existingpinneddefault, controlled by a newfloatBarSelectionModesetting.foreground-provider-changedevents to the frontend.selectVisibleFloatBarProvidersto show only the active provider (active) or the active provider plus any pinned providers above the high-usage threshold (activePlusCritical).floatBarForegroundDetectionboolean setting (defaulttrue) lets users disable OS-level foreground detection; when disabled or inpinnedmode, the bar falls back to the pinned list.SettingsSection.tsxexposes a mode selector and a WatchFocusedApp toggle (disabled inpinnedmode).nullon other platforms; the 750ms polling task is cancelled via a generation counter when settings change.Macroscope summarized 4cd18ff.
Summary by CodeRabbit
New Features
Documentation