-
Notifications
You must be signed in to change notification settings - Fork 0
Add Exact and Calm information modes to the floating bar (SOU-178) #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1d36104
804748e
aa30319
cf77517
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -287,6 +287,51 @@ body.floatbar-window #root { | |||||
| .floatbar__reset--emphasis .floatbar__reset-time { | ||||||
| font-weight: 650; | ||||||
| } | ||||||
| /* ── Calm information mode ───────────────────────────────────────────── | ||||||
| The pill leads with a trustworthy pace state + next reset and becomes an | ||||||
| expandable button. No new motion, so reduced-motion is unaffected. */ | ||||||
| .floatbar__pill--calm { | ||||||
| cursor: pointer; | ||||||
| } | ||||||
| .floatbar__pill--calm:focus-visible { | ||||||
| outline: 2px solid color-mix(in srgb, var(--ceiling-accent, #26b5ce) 70%, white); | ||||||
| outline-offset: 1px; | ||||||
| } | ||||||
| .floatbar__pace { | ||||||
| font-size: 0.86em; | ||||||
| font-weight: 650; | ||||||
| line-height: 1; | ||||||
| white-space: nowrap; | ||||||
| } | ||||||
| .floatbar__pace--steady { | ||||||
| color: color-mix(in srgb, #34d399 62%, white); | ||||||
| } | ||||||
| .floatbar__pace--watch { | ||||||
| color: color-mix(in srgb, #f59e0b 68%, white); | ||||||
| } | ||||||
| .floatbar__calm-reset { | ||||||
| display: inline-flex; | ||||||
| align-items: center; | ||||||
| gap: calc(3px * var(--floatbar-scale, 1)); | ||||||
| opacity: 0.66; | ||||||
| line-height: 1; | ||||||
| } | ||||||
| .floatbar__calm-sep { | ||||||
| opacity: 0.5; | ||||||
| } | ||||||
| .floatbar__pct--calm { | ||||||
| padding-left: calc(6px * var(--floatbar-scale, 1)); | ||||||
| margin-left: calc(2px * var(--floatbar-scale, 1)); | ||||||
| border-left: 1px solid color-mix(in srgb, currentColor 18%, transparent); | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Use the Stylelint-compliant keyword casing. - border-left: 1px solid color-mix(in srgb, currentColor 18%, transparent);
+ border-left: 1px solid color-mix(in srgb, currentcolor 18%, transparent);📝 Committable suggestion
Suggested change
🧰 Tools🪛 Stylelint (17.14.0)[error] 325-325: Expected "currentColor" to be "currentcolor" (value-keyword-case) (value-keyword-case) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||||||
| font-size: 0.98em; | ||||||
| } | ||||||
| .floatbar--light-bg .floatbar__pace--steady { | ||||||
| color: color-mix(in srgb, #059669 78%, black); | ||||||
| } | ||||||
| .floatbar--light-bg .floatbar__pace--watch { | ||||||
| color: color-mix(in srgb, #b45309 82%, black); | ||||||
| } | ||||||
|
|
||||||
| .floatbar--vertical .floatbar__text { | ||||||
| flex-direction: column; | ||||||
| align-items: center; | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Notify the detached FloatBar when information mode changes.
notifies_float_bar()does not checkfloat_bar_information_mode. Therefore, changing only Exact/Calm can persist to Rust without emitting the configuration event that makesFloatBar.tsxre-fetch its snapshot, leaving the visible bar in the previous mode until another setting change or restart. Include this field in the predicate and add a mode-only update regression test.Suggested fix
fn notifies_float_bar(&self) -> bool { self.enabled_providers.is_some() || self.refresh_interval_secs.is_some() || self.codex_custom_sessions_dirs.is_some() || self.high_usage_threshold.is_some() || self.critical_usage_threshold.is_some() || self.provider_usage_thresholds.is_some() || self.show_as_used.is_some() || self.reset_time_relative.is_some() || self.show_reset_when_exhausted.is_some() + || self.float_bar_information_mode.is_some() }🤖 Prompt for AI Agents