Skip to content

Add hover details to inline cost charts - #3413

Open
666ghj wants to merge 1 commit into
steipete:mainfrom
666ghj:codex/inline-cost-hover-details
Open

Add hover details to inline cost charts#3413
666ghj wants to merge 1 commit into
steipete:mainfrom
666ghj:codex/inline-cost-hover-details

Conversation

@666ghj

@666ghj 666ghj commented Sep 4, 2026

Copy link
Copy Markdown

Summary

Adds a hover preview to inline cost bars in menu cards, showing the date, localized cost, and token count while highlighting the selected bar. Settings charts and the existing Cost History submenu remain unchanged.

Demo

Inline cost chart hover preview

Testing

  • make check
  • make test (1,003 selections; 84/84 groups)
  • production SwiftUI hover screenshot test

@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-04T06:05:26.139707Z 867b80c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed September 4, 2026, 2:05 AM ET / 06:05 UTC.

ClawSweeper review

What this changes

The PR adds date, localized cost, and token details when hovering inline menu-card cost bars, including selection styling and coverage for calendar, layout, accessibility, and currency behavior.

Merge readiness

Ready for maintainer review

Keep open: current main does not yet provide hover details in inline cost bars, and this focused feature reuses the established native chart-hover pattern with no introduced correctness or security defect found.

Priority: P3
Reviewed head: 867b80c0bef69b34f5ee97d9ee4290669dd56b2c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A well-scoped UI enhancement with direct visual proof and thorough focused coverage; no blocking defect was identified.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The supplied PR attachment directly demonstrates the changed menu-card hover state; source inspection ties it to the production InlineUsageDashboardContent mouse-tracking path, and the added NSHostingView screenshot coverage drives a selected bar and verifies the changed visual and accessibility result.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The supplied PR attachment directly demonstrates the changed menu-card hover state; source inspection ties it to the production InlineUsageDashboardContent mouse-tracking path, and the added NSHostingView screenshot coverage drives a selected bar and verifies the changed visual and accessibility result.
Evidence reviewed 6 items Introduced hover data model: The introduced mapping preserves unknown values, adds per-day cost/token hover details, and continues to distinguish unscanned data from established zero-filled history.
Native interaction path: The new inline bars use the existing local-coordinate mouse tracker and reconcile selection on data, size, and layout-direction changes.
Established chart-hover precedent: The existing detailed cost-history chart already uses MouseLocationReader to select a bar and render date-specific detail, so the PR extends an established UI pattern rather than introducing a competing interaction model.
Findings None None.
Security None None.

How this fits together

CodexBar converts provider cost and token snapshots into compact inline charts in menu cards. The new interaction maps mouse position over those bars to one daily data point and displays its existing cost/token data in the card.

flowchart LR
    A[Provider daily cost and token history] --> B[Inline dashboard data]
    B --> C[Compact cost bars]
    C --> D[Mouse position tracking]
    D --> E[Selected daily point]
    E --> F[Menu-card detail label]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test delta production +200/-37, tests +259/-16 across 5 files The interaction adds substantial geometry and accessibility logic, with more changed test coverage than production code.

Technical review

Best possible solution:

Land the focused hover interaction if ordinary merge checks remain green, preserving the existing distinction between zero-filled established history and unknown daily data.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR adds a UI capability rather than reporting broken existing behavior; its supplied screenshot and production-view screenshot coverage document the proposed interaction.

Is this the best way to solve the issue?

Yes. The patch reuses the existing native chart-hover mechanism and daily snapshot model while leaving settings charts and the detailed Cost History submenu unchanged.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 392310c66548.

Labels

Label changes:

  • add P3: This is a bounded menu-card usability enhancement without evidence of a current user-facing regression or security impact.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The supplied PR attachment directly demonstrates the changed menu-card hover state; source inspection ties it to the production InlineUsageDashboardContent mouse-tracking path, and the added NSHostingView screenshot coverage drives a selected bar and verifies the changed visual and accessibility result.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The supplied PR attachment directly demonstrates the changed menu-card hover state; source inspection ties it to the production InlineUsageDashboardContent mouse-tracking path, and the added NSHostingView screenshot coverage drives a selected bar and verifies the changed visual and accessibility result.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The supplied PR attachment directly demonstrates the changed menu-card hover state; source inspection ties it to the production InlineUsageDashboardContent mouse-tracking path, and the added NSHostingView screenshot coverage drives a selected bar and verifies the changed visual and accessibility result.

Label justifications:

  • P3: This is a bounded menu-card usability enhancement without evidence of a current user-facing regression or security impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The supplied PR attachment directly demonstrates the changed menu-card hover state; source inspection ties it to the production InlineUsageDashboardContent mouse-tracking path, and the added NSHostingView screenshot coverage drives a selected bar and verifies the changed visual and accessibility result.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied PR attachment directly demonstrates the changed menu-card hover state; source inspection ties it to the production InlineUsageDashboardContent mouse-tracking path, and the added NSHostingView screenshot coverage drives a selected bar and verifies the changed visual and accessibility result.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The supplied PR attachment directly demonstrates the changed menu-card hover state; source inspection ties it to the production InlineUsageDashboardContent mouse-tracking path, and the added NSHostingView screenshot coverage drives a selected bar and verifies the changed visual and accessibility result.

Evidence

What I checked:

  • Introduced hover data model: The introduced mapping preserves unknown values, adds per-day cost/token hover details, and continues to distinguish unscanned data from established zero-filled history. (Sources/CodexBar/InlineUsageDashboardContent.swift:390, 867b80c0bef6)
  • Native interaction path: The new inline bars use the existing local-coordinate mouse tracker and reconcile selection on data, size, and layout-direction changes. (Sources/CodexBar/InlineUsageDashboardContent.swift:580, 867b80c0bef6)
  • Established chart-hover precedent: The existing detailed cost-history chart already uses MouseLocationReader to select a bar and render date-specific detail, so the PR extends an established UI pattern rather than introducing a competing interaction model. (Sources/CodexBar/CostHistoryChartMenuView.swift:788, 392310c66548)
  • Focused interaction and accessibility coverage: Added tests cover LTR/RTL geometry, gaps, unknown points, refreshed data, localized summaries, sparse histories, and an NSHostingView screenshot path that drives the production tracking view and verifies the hovered summary is not duplicated in accessibility output. (Tests/CodexBarTests/InlineCostHistoryCalendarTests.swift:104, 867b80c0bef6)
  • Direct behavior proof: The supplied PR body (source revision b7cec95b5803e392de9999dad924a6cb08d0cbdbe86ac4a12fedbf1cac6d45fe) includes a menu-card hover screenshot and reports the production SwiftUI hover screenshot test.
  • Feature-history routing: Recent relevant history includes the calendar-position preservation work by Abu Nazir and the provider presentation-policy refactor by Peter Steinberger; both precede this PR and cover the same inline dashboard surface. (Sources/CodexBar/InlineUsageDashboardContent.swift:354, 41c53c34dbeb)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Abu Nazir: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant