Skip to content

Add enhanced floating dashboard with horizontal compact layout#452

Closed
liuyixin-louis wants to merge 1 commit intosteipete:mainfrom
liuyixin-louis:feature/floating-dashboard-enhanced
Closed

Add enhanced floating dashboard with horizontal compact layout#452
liuyixin-louis wants to merge 1 commit intosteipete:mainfrom
liuyixin-louis:feature/floating-dashboard-enhanced

Conversation

@liuyixin-louis
Copy link

Summary

  • Extend the floating dashboard panel with a horizontal compact strip layout alongside the existing vertical mode
  • Add per-provider branded progress bars showing session/weekly metrics with compact countdown timers
  • Add light/dark mode aware styling with Solarized Light palette for improved readability
  • Add hover-reveal controls for layout toggle (vertical ↔ horizontal) and close
  • Handle panel recreation on layout switch to avoid constraint issues

Motivation

This addresses the same use case as #424 (detachable overview dashboard) and the feature request in #391 (pop out / detach window). The key differentiator is the horizontal compact strip mode, which provides a minimal, always-on-top usage overview occupying very little screen real estate — ideal for users who monitor multiple providers simultaneously on multi-monitor setups.

Comparison with PR #424

Feature This PR #424
Vertical panel Yes Yes
Horizontal compact strip Yes No
Layout toggle (V ↔ H) Yes No
Branded progress bars Yes Reuses menu cards
Compact reset timers Yes (e.g. 3h, 2d5h) No
Light/dark theming Solarized Light Default material
Hover-reveal controls Yes Close only
Preferences toggle Yes Pop Out menu action

Screenshots

(Available upon request — horizontal strip shows all enabled providers in a single compact row with session/weekly bars and countdown timers)

Validation

  • swift build — compiles cleanly on latest main
  • pnpm check (if CI available)
  • Manual testing with multiple providers enabled

Test plan

  • Enable floating dashboard from Preferences > Display
  • Verify vertical layout shows all enabled providers with branded progress bars
  • Toggle to horizontal layout via hover button — verify compact strip renders
  • Verify light mode uses Solarized Light background, dark mode uses ultra-thin material
  • Verify countdown timers update in real-time
  • Move panel, quit app, relaunch — verify position is preserved
  • Switch layout orientation — verify panel recreates without constraint crashes

🤖 Generated with Claude Code

Extends the existing floating dashboard panel with:
- Dual layout modes: vertical (original) and horizontal compact strip
- Per-provider branded progress bars with session/weekly metrics
- Compact reset countdown timers (e.g. "3h", "2d5h")
- Hover-reveal controls for layout toggle and close
- Light/dark mode aware styling with Solarized Light palette
- Panel recreation on layout switch to avoid constraint issues
- Persistent horizontal preference via UserDefaults

The horizontal strip mode provides a minimal, always-on-top usage
overview that occupies minimal screen real estate while showing
all enabled providers at a glance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

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

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +38 to +39
.onAppear { self.startTimer() }
.id(self.tick)

Choose a reason for hiding this comment

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

P1 Badge Prevent unbounded timer task creation in dashboard view

This view starts startTimer() in onAppear while also forcing a new identity with .id(self.tick), and startTimer() launches an unstructured infinite Task without cancellation; when the panel stays open, every tick causes another appearance and another long-lived timer task, so refreshes begin stacking and CPU/background work grows over time.

Useful? React with 👍 / 👎.

}
}

self.observeStoreChanges()

Choose a reason for hiding this comment

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

P2 Badge Avoid double-subscribing store observation on panel recreate

The onChange path in observeStoreChanges() already re-registers observation after each change, but recreatePanel() registers again here; when users toggle layout (which calls recreatePanel()), each toggle leaves an extra active tracker, so later store updates invoke duplicate resize/recreate work and create avoidable UI churn.

Useful? React with 👍 / 👎.

@liuyixin-louis liuyixin-louis deleted the feature/floating-dashboard-enhanced branch February 28, 2026 22:02
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.

2 participants