Skip to content

feat: Tray/Dock app position with draggable, centered Dock window#546

Draft
robinebers wants to merge 1 commit into
mainfrom
feat/hide-dock-icon
Draft

feat: Tray/Dock app position with draggable, centered Dock window#546
robinebers wants to merge 1 commit into
mainfrom
feat/hide-dock-icon

Conversation

@robinebers
Copy link
Copy Markdown
Owner

@robinebers robinebers commented Jun 3, 2026

Summary

This PR adds an app position setting to OpenUsage so that you can either show the app in the macOS tray or in the macOS dock. When docked, the sidebar becomes draggable And there is a conditional setting to always show the app on top of all other apps.

This is NOT finished. But I'm creating the draft now to see if there's any demand for this.

Floating Window Settings Screen
CleanShot 2026-06-03 at 09 24 07@2x CleanShot 2026-06-03 at 09 27 07@2x

Todo

  • Fix window positioning in dock mode
  • Add resizability in dock mode (?)
  • Remember window position in dock mode

Test plan

  • bunx tsc --noEmit
  • cargo check + cargo clippy (no new warnings)
  • bunx vitest run (affected suites) — settings, side-nav, app-content, bootstrap, system-actions
  • Manual on macOS: toggle Tray↔Dock; Dock window centers on launch, drag via sidebar, click away (stays open), Escape hides, Dock-icon click reopens; relaunch recenters; "Always keep on top" floats above other apps; tray and Dock are never both visible.

Summary by cubic

Adds an App Position setting to choose Tray or Dock so the app shows either the menu bar icon or the Dock icon, never both. Default is Tray; in Dock mode the window is centered, draggable, persists on blur, and can be kept on top.

  • New Features
    • App Position segmented control in Settings; choice persists and is applied at startup to avoid Dock flicker.
    • Dock mode: window centers on first show, stays open on blur (Escape still hides), draggable via the sidebar; clicking the Dock icon reopens it.
    • Dock-only “Always keep on top” toggle to float the window.
    • macOS: switches activation policy (Accessory vs Regular) and inverses tray visibility; added update_dock_icon_visibility, update_always_on_top, and core:window:allow-start-dragging.

Written for commit 5f1cd71. Summary will update on new commits.

Review in cubic

Adds an "App Position" setting (Tray vs Dock, default Tray) so the app shows
EITHER the menu bar (tray) icon OR the Dock icon, never both, to save tray
space. The choice persists across restarts and is applied natively at startup.

In Dock mode the panel behaves like a normal window: centered on launch,
draggable via the sidebar (deep drag region, interactive icons excluded), and
it stays open on blur (Escape still hides). A "Always keep on top" toggle
(Dock-only, default off) floats the window above other windows.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 3, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ab8fa931-0502-469d-a501-9894f71c0628

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/hide-dock-icon

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added rust Pull requests that update rust code core labels Jun 3, 2026
@abd3lraouf
Copy link
Copy Markdown

woow thank you

@robinebers robinebers mentioned this pull request Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants