CodexBar icon indicating copy to clipboard operation
CodexBar copied to clipboard

Fix: Keep cost history chart steady while hovering

Open iam-brain opened this issue 4 months ago • 2 comments

Fixes #2015

Keeps the cost history chart in place while hovering days with different model counts.

  • sizes the model viewport to the busiest day in the displayed history, capped at four rows
  • keeps histories without model breakdowns compact
  • uses consistent row slots and keeps longer lists scrollable
  • shows a subtle “Scroll to see more models” hint on overflowing days
  • removes hover-driven AppKit host resizing

Validation:

  • repository SwiftFormat and Swift parser checks pass locally
  • app locale checks pass
  • focused review gate passed
  • full local SwiftLint/tests require a usable full Xcode installation; CI provides the complete run

iam-brain avatar Jul 09 '26 23:07 iam-brain

Checked the failing CI run on this head.

The cost-history change itself is reproducible locally:

  • swift test --filter CostHistoryChartMenuViewTests on 034fce43df1ad9e46acd1397c88df85710f02135: 14 tests passed.

The actionable blocker for this PR is the localization shard:

  • LocalizationLanguageCatalogTests expects full key parity for the strict catalogs.
  • This PR adds "Scroll to see more models" to ar, ca, en, fa, and th, but the strict catalogs still missing it are gl, tr, it, id, and pl. That matches the 5 localization issues in shard 1.
  • Adding the key to every catalog would also clear the lint-macos missing-localization warnings. The catalogs currently missing it are de, es, fr, gl, id, it, ja, ko, nl, pl, pt-BR, ru, sv, tr, uk, vi, zh-Hans, and zh-Hant.

The other failed shard looks unrelated to this diff:

  • KiroStatusProbeTests.fetch returns promptly when usage helper spawns a detached child took 8.83s against an 8.0s ceiling in macOS shard 0.
  • #2016 does not touch Kiro/TTY runner code, and Linux, lint, and macOS shards 2/3 passed.

kiranmagic7 avatar Jul 10 '26 00:07 kiranmagic7

  • LocalizationLanguageCatalogTests expects full key parity for the strict catalogs.
  • This PR adds "Scroll to see more models" to ar, ca, en, fa, and th, but the strict catalogs still missing it are gl, tr, it, id, and pl. That matches the 5 localization issues in shard 1.
  • Adding the key to every catalog would also clear the lint-macos missing-localization warnings. The catalogs currently missing it are de, es, fr, gl, id, it, ja, ko, nl, pl, pt-BR, ru, sv, tr, uk, vi, zh-Hans, and zh-Hant.

Should now be fixed entirely by 3fe0ff0!

iam-brain avatar Jul 10 '26 00:07 iam-brain

Maintainer proof for exact head 096521bd1586534e83aefb41b60f26a985763d7a:

  • Focused cost-history, hosted-submenu, and localization suites: 53 tests passed.
  • make check: passed, including formatting, lint, locale parity, parser hash, and packaging checks.
  • make test: all 50 local shards passed.
  • Autoreview: clean; no accepted/actionable findings.
  • Signed artifact: debug bundle uses Developer ID team Y5PE65HELJ; strict codesign and Gatekeeper passed; bundled helper reports CodexBar 0.41.1.
  • Source-blind live UI: isolated synthetic CODEX_HOME, packaged CLI row counts [1,4,6], no real credentials/Keychain/browser/provider access. The same cost submenu window remained 423×533 at (817,155) for 1-, 4-, and 6-row hover states. Overflow showed the scroll hint; dragging the real scrollbar revealed rows 5–6 without changing bounds.
  • Public Model Identifier Gate: PASS. The final diff introduces no public model identifier; test labels are clearly fictitious.
  • Dependency freshness: N/A; no dependency changes.

The contributor’s direction was retained, then tightened to preserve compact 36-point histories and use expanded rows only when the displayed range contains mode detail.

steipete avatar Jul 10 '26 05:07 steipete

ClawSweeper status: review started.

I am starting a fresh review of this pull request: Fix: Keep cost history chart steady while hovering This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

clawsweeper[bot] avatar Jul 10 '26 07:07 clawsweeper[bot]