codeburn/mac/Sources/CodeBurnMenubar/Views
Resham Joshi 8208cf8ff5
Quiet routine pricing warnings + menubar recovery from stuck-loading (#266)
* Quiet routine pricing warnings + menubar recovery from stuck-loading

CLI:

- Default `codeburn` invocation no longer prints "no pricing data for model"
  warnings on every run. Greeting a fresh user with three lines of stderr
  before the dashboard even draws looked like the tool was broken on first
  launch. The warning now requires --verbose, and the suppressed pricing
  miss still results in $0 cost (correct for unmapped models).
- Local-model heuristic skips the warning entirely for Ollama tags
  (`qwen3.6:35b-a3b-bf16`), GGUF/quantized fingerprints, and similar names
  that will never have public pricing. The "update codeburn" hint was
  actively misleading there.
- When the warning does fire (with --verbose), it points users at
  `codeburn model-alias <model> <known-model>` as the actual escape hatch
  alongside the package update suggestion.

Menubar:

- Replace perpetual "Loading…" spinner with a FetchErrorOverlay when the
  per-key fetch fails and the cache is empty. User sees the error and a
  Retry button instead of an infinite hang.
- Add diagnostic breadcrumbs (NSLog, invisible to normal users — Console.app
  / `log stream --process CodeBurnMenubar` only) for the four states that
  produce a stuck loading overlay:
    - subprocess timeout after 45s
    - fetch result dropped due to Task cancellation (rapid tab switch)
    - fetch result dropped due to mid-fetch calendar rollover
    - retry attempt where the last successful fetch is >2 min stale
- Track lastSuccessByKey separately from cache freshness so the staleness
  diagnostic survives day-rollover cache wipes.

* Stop flashing the compare-view loading screen on background refresh

When the 30s CLI tick updated `projects` while the user was reading the
model comparison results, the projects-watching effect always fired
setLoadTrigger, which flipped phase to 'loading' and re-ran the slow
scanSelfCorrections walk over every provider's session directory. The
user lost their scroll position and saw a loading flash mid-read.

Recompute the comparison rows in place when:
- the user is already on the results phase, AND
- both picked models still exist in the new aggregate.

Skip the corrections rescan on these in-place refreshes — corrections
drift slowly enough that holding the previous value until the user
re-enters compare is acceptable, and the rescan is the slow part of the
load. Initial selection and post-selection load still run the full
pipeline.
2026-05-08 20:33:48 -07:00
..
ActivitySection.swift feat(mac): native Swift menubar app + one-command install 2026-04-17 16:55:56 -07:00
AgentTabStrip.swift Fix menubar stuck loading after sleep, double-click on pill tabs, oversized disconnected tabs 2026-05-08 13:00:35 -07:00
FindingsSection.swift Fix timezone handling: menubar UTC bugs, --timezone flag, DST-safe dates 2026-04-30 17:33:02 -07:00
HeatmapSection.swift Live quota bar inside AgentTab + Claude OAuth refresh gate (#255) 2026-05-06 19:57:17 -07:00
HeroSection.swift Add new providers, fix menubar tabs, accent color picker (#167) 2026-04-27 19:46:30 -07:00
MenuBarContent.swift Quiet routine pricing warnings + menubar recovery from stuck-loading (#266) 2026-05-08 20:33:48 -07:00
ModelsSection.swift feat(mac): native Swift menubar app + one-command install 2026-04-17 16:55:56 -07:00
PeriodSegmentedControl.swift Harden menubar: fix refresh loop, concurrency, data sync, and edge cases 2026-05-01 08:01:25 -07:00
SectionCaption.swift feat(mac): native Swift menubar app + one-command install 2026-04-17 16:55:56 -07:00
SettingsView.swift Live quota bar inside AgentTab + Claude OAuth refresh gate (#255) 2026-05-06 19:57:17 -07:00
SparklineView.swift feat(mac): native Swift menubar app + one-command install 2026-04-17 16:55:56 -07:00