Skip to content

feat: add standalone token activity heatmap - #2548

Closed
Yuxin-Qiao wants to merge 9 commits into
steipete:mainfrom
Yuxin-Qiao:agent/activity-heatmap-ux
Closed

feat: add standalone token activity heatmap#2548
Yuxin-Qiao wants to merge 9 commits into
steipete:mainfrom
Yuxin-Qiao:agent/activity-heatmap-ux

Conversation

@Yuxin-Qiao

@Yuxin-Qiao Yuxin-Qiao commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Overview

Adds a standalone 365-day token activity heatmap to Usage & Spend. The view makes long-term token usage patterns inspectable without changing the existing 7/30-day spend chart range.

The UI and data path are intentionally kept in this independent, main-based PR so the heatmap can be reviewed separately from the larger Usage & Spend work in #2322.

What the UI does

  • Daily: renders exactly 365 visible days inside a Sunday-aligned 53-column calendar container; leading/trailing alignment cells are blank.
  • Weekly: aggregates each intersecting calendar-week column and makes the grouping explicit with “Each column = 1 week”.
  • Cumulative: shows the running total across the same exact date range.
  • Edge-aware hover: keeps the detail card beside the selected cell and clamps it only when it would leave the chart.
  • Shared grid geometry: weekday labels and activity cells use the same row pitch, keeping Mon, Wed, and Fri visually aligned.
  • Selected-language formatting: weekday symbols, dates, labels, and mode descriptions follow the CodexBar app language instead of the host system locale.
  • Honest partial coverage: unavailable provider history is rendered separately from confirmed zero activity, with coverage shown in the summary and tooltips.
  • Accessible inspection: the daily grid is keyboard-focusable, supports arrow-key movement, exposes chronological VoiceOver adjustable navigation, and publishes one semantic child per visible day; Weekly and Cumulative publish one child per visible week column.

Native macOS proof

Captured from the locally signed release build at commit 2af1b1cbf009b901c4b1b906c9745c4cad1675c7, with the CodexBar app language set to English. The screenshots contain only aggregated token activity; no account identifiers or credentials are shown. The later range, coverage, and accessibility follow-ups do not change the demonstrated alignment, hover placement, modes, or locale behavior.

Daily — aligned default state

The month headers, weekday labels, cells, and legend share one layout. Empty history remains visually quiet while recent activity stays easy to scan.

Daily token activity heatmap with aligned weekday labels

Daily — right-edge hover behavior

The tooltip stays adjacent to the hovered late-July cell, moves inward only enough to remain inside the chart, and formats the date in English.

Daily heatmap tooltip clamped beside a right-edge cell

Weekly — calendar-week aggregation

Each column represents one calendar week; the tooltip reports the selected week’s aggregate and anchor date.

Weekly token activity heatmap with one column per week

Cumulative — running total

The cumulative mode uses the same grid and date range while exposing progression toward the full-period token total.

Cumulative token activity heatmap showing the running total

Current-head accessibility proof

Built, signed, and launched commit 2f820c94c0688327e39362fc80789f1aac8017ea, then queried the running AppKit accessibility tree through macOS System Events. This is system-level output from the shipped view, not a source-code assertion or an isolated SwiftUI host:

$ # Read the first and last children of the daily Token activity AXGroup.
$ osascript ... 'return {count of UI elements, role of UI element 1, value of UI element 1, role of UI element 365, value of UI element 365}'
365, AXStaticText, Aug 2, 2025: Unavailable, AXStaticText, Aug 1, 2026: 283M

$ # Read the actions published by that same AXGroup.
$ osascript ... 'return name of every action'
AXIncrement, AXDecrement

$ # Switch to Weekly and read its first/last column children.
53, AXStaticText, Jul 27, 2025: Unavailable, AXStaticText, Jul 26, 2026: 1.1B

$ # Switch to Cumulative and read its first/last column children.
53, AXStaticText, Jul 27, 2025: Unavailable, AXStaticText, Jul 26, 2026: Unavailable

This verifies that all 365 visible days and all 53 visible week columns are individually traversable, each node publishes its English date plus token/availability value, and the daily grid exposes chronological VoiceOver adjustment actions on the current PR head. Cumulative stays unavailable when earlier source coverage is unknown instead of presenting a fabricated running total.

Data behavior

  • adds a dedicated tokenActivity series to SpendDashboardModel
  • aggregates validated, nonnegative token totals independently of spend/currency availability
  • requests a bounded 365-day direct Codex history for the annual view while keeping the existing spend chart at 7/30 days
  • intersects coverage across included provider snapshots, so mixed 365-day and 30-day sources do not fabricate older zero-usage cells
  • represents unestablished or malformed coverage as unavailable and propagates it through weekly and cumulative modes
  • distinguishes unavailable cells from confirmed zero activity in fill color, tooltip, legend/caption, summary, and accessibility text
  • uses overflow-safe daily, weekly, and cumulative arithmetic and always caps output at 365 points
  • renders and aggregates every one of those 365 points regardless of the ending weekday

Localization

The heatmap includes localized strings across all app catalogs for the title, view modes, empty state, legend, weekly grouping, and cumulative description. The coverage follow-up reuses the existing localized Coverage and Unavailable keys. Locale regression coverage verifies that an English app selection produces English weekday/date output even when the system locale differs.

Scope / relationship

Validation

  • make check
    • app locale checker: 22 catalogs against 1,316 English keys
    • SwiftFormat: 0 files require formatting
    • SwiftLint: 0 violations across 1,668 files
  • swift test --filter 'SpendActivityHeatmapTests|SpendDashboardModelTests|SpendDashboardControllerTests'
    • 64 tests in 5 suites passed on 2f820c94
  • annual boundary regression covers all seven possible ending weekdays
    • exactly 365 visible and covered days in each case
    • oldest-day-only activity remains part of the total and empty-state decision
  • bounded annual regression: 32 providers × 365 daily entries
    • output remains exactly 365 points
    • completed in 0.185 seconds on the final local run
  • make start
    • current-head Release build, signing, bundle validation, launch, and native macOS AX QA completed

Review follow-up

  • Attach inspectable native macOS proof for Daily, Weekly, Cumulative, right-edge tooltip placement, weekday alignment, and English date formatting.
  • Preserve mixed-provider coverage: non-Codex snapshots with less than 365 days no longer turn older absent data into confirmed zero activity.
  • Add mixed-provider, unavailable-propagation, confirmed-zero, malformed-history, and bounded 365-day regressions.
  • Render all 365 advertised days with regressions for every ending weekday.
  • Add keyboard/VoiceOver navigation plus one localized accessibility child for every visible day.
  • Publish one localized accessibility child for every visible Weekly/Cumulative column.
  • Ensure keyboard or VoiceOver input overrides stale pointer hover in the shared highlight, tooltip, and accessibility value.

The contributor-action findings are addressed through 2f820c94. The PR remains Ready for current-head CI and maintainer feature-direction review under VISION.md.

Split PRs

Part of the #2322 umbrella split, stacked on #2527:

  1. feat(core): local real-usage data layer — unified event engine + registerable scanners + pricing foundation #2527 — data layer (base)
  2. This PR (feat: add standalone token activity heatmap #2548) — token activity heatmap
  3. feat(spend): model-centric Models view with per-tool breakdown and billing attribution #2569 — Models view (rebases on feat(core): local real-usage data layer — unified event engine + registerable scanners + pricing foundation #2527 + feat: add standalone token activity heatmap #2548)

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 8:19 PM ET / August 3, 2026, 00:19 UTC.

ClawSweeper review

What this changes

Adds a 365-day token-activity heatmap to Usage & Spend with daily, weekly, and cumulative views, coverage-aware aggregation, an annual Codex-history cache, localization, and keyboard/VoiceOver inspection.

Merge readiness

Blocked until stronger real behavior proof is added - 6 items remain

Keep this PR open for maintainer feature-direction review rather than closing it: current main does not contain the heatmap, but the PR adds a substantial new Usage & Spend capability that VISION.md says needs sign-off. The submitted screenshots and current-head accessibility transcript demonstrate core UI behavior, yet the prepared local proof artifacts are unrelated umbrella-PR images and do not establish the latest annual-cache refresh and fallback behavior on the mergeable head.

Priority: P3
Reviewed head: 341fc5b0becbce519c9f7201087acf86b1c0a7ef
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation and focused validation are promising, but final-head runtime proof for the new annual load/cache behavior is incomplete and the feature still needs product sponsorship.
Proof confidence 🦐 gold shrimp (3/6) Needs stronger real behavior proof before merge: The PR body has earlier heatmap screenshots and a current-head signed-AppKit accessibility transcript, but the prepared local artifacts are unrelated umbrella-PR images and there is no inspectable final-head signed-app proof for annual-cache refresh, expiry, or annual-scan-failure fallback. Add redacted terminal output or logs for those paths; after updating the body, a fresh ClawSweeper review should run automatically, or a maintainer can request @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The PR body has earlier heatmap screenshots and a current-head signed-AppKit accessibility transcript, but the prepared local artifacts are unrelated umbrella-PR images and there is no inspectable final-head signed-app proof for annual-cache refresh, expiry, or annual-scan-failure fallback. Add redacted terminal output or logs for those paths; after updating the body, a fresh ClawSweeper review should run automatically, or a maintainer can request @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 6 items Current main does not implement the feature: Current main contains the existing Usage & Spend dashboard, but no token-activity heatmap source or annual activity-cache surface; the added heatmap file is present only in the PR commit.
Feature direction requires sign-off: VISION.md lists new features and meaningful maintenance complexity under “Needs Sign-Off”; this PR adds a new dashboard mode plus an annual local-history load/cache path.
Existing dashboard provenance: The current Usage & Spend dashboard appears to originate with the unified dashboard commit, which describes local account scans, incomplete-data handling, and cancellation-safe refreshes—the contracts this PR extends.
Findings None None.
Security None None.

How this fits together

Usage & Spend collects local provider snapshots and turns them into cost and token summaries in CodexBar’s preferences UI. This PR adds a separate annual token-history path for Codex accounts, aggregates it into activity points, and renders those points as an interactive heatmap beneath the existing dashboard.

flowchart LR
    A[Local provider snapshots] --> B[Usage and Spend loader]
    B --> C[30-day spend snapshot]
    B --> D[365-day Codex activity cache]
    C --> E[Coverage-aware activity aggregation]
    D --> E
    E --> F[Daily weekly and cumulative heatmap]
    F --> G[Preferences UI and accessibility tree]
Loading

Decision needed

Question Recommendation
Should CodexBar add and maintain a built-in 365-day token-activity heatmap that performs a separate annual local-history scan for Codex accounts? Sponsor after refresh and proof: Keep the feature direction, require a rebase onto current main and redacted signed-app evidence for the annual-cache and fallback paths before merge.

Why: VISION.md explicitly requires sign-off for new features and meaningful complexity; the repository evidence cannot determine whether the added dashboard surface and annual scan are desired product scope.

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The PR body has earlier heatmap screenshots and a current-head signed-AppKit accessibility transcript, but the prepared local artifacts are unrelated umbrella-PR images and there is no inspectable final-head signed-app proof for annual-cache refresh, expiry, or annual-scan-failure fallback. Add redacted terminal output or logs for those paths; after updating the body, a fresh ClawSweeper review should run automatically, or a maintainer can request @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - GitHub reports the PR as dirty against current main; the annual snapshot cache and dashboard-load changes need a rebase and refreshed review before merge.
  • Resolve merge risk (P2) - The new 365-day local-history scan can affect dashboard refresh latency and failure behavior; the prepared proof does not show final-head cache reuse, expiry, or annual-scan fallback in a signed app.
  • Resolve merge risk (P1) - This is a new persistent dashboard capability and an extra local-data access pattern, so it requires explicit product sign-off under VISION.md even if the implementation is otherwise sound.
  • Complete next step (P2) - The remaining blocker is maintainer feature sponsorship plus contributor-supplied final-head runtime proof, not a narrow mechanical repair that automation can safely make.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Patch surface 33 files affected; 1,908 added, 63 removed The feature spans UI, loading behavior, aggregation, accessibility, tests, and 22 localization catalogs rather than a small visual tweak.
Annual scan scope 365 days plus a 15-minute cache design This introduces a new bounded local-history workload alongside the existing 30-day spend snapshot.

Merge-risk options

Maintainer options:

  1. Rebase and prove bounded annual loading (recommended)
    Refresh the branch against current main and add redacted signed-app output showing first load, cache reuse or expiry, and annual-scan failure falling back to the 30-day snapshot.
  2. Accept the runtime tradeoff
    Sponsor the feature while accepting the additional annual local-history work after reviewing the rebased implementation and its expected refresh cost.
  3. Pause the feature
    Close or defer the PR if the product does not want this recurring dashboard scan and maintenance surface.

Technical review

Best possible solution:

If the product direction is sponsored, rebase the focused heatmap onto current main, retain the existing 30-day spend path, and provide redacted signed-app proof for initial annual loading, cached refresh, and annual-scan fallback before merging.

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

Not applicable as a bug report: this PR proposes a new dashboard capability. The supplied source and PR body clearly identify the intended load, aggregation, and rendering paths, but no current-main failure is being repaired.

Is this the best way to solve the issue?

Unclear: the heatmap implementation is coherent and preserves the existing 30-day spend path, but a built-in annual local-history scan is a product-scope choice that VISION.md reserves for maintainer sign-off; a rebased signed-app proof is needed before judging the final integration path.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • remove merge-risk: 🚨 compatibility: Current PR review merge-risk labels are merge-risk: 🚨 availability.

Label justifications:

  • P3: This is a discretionary new dashboard feature with no evidence of a current user-facing regression.
  • merge-risk: 🚨 availability: The PR adds an annual local-history scan and cache on the dashboard loading path, and final-head runtime fallback/cache behavior lacks inspectable proof.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR body has earlier heatmap screenshots and a current-head signed-AppKit accessibility transcript, but the prepared local artifacts are unrelated umbrella-PR images and there is no inspectable final-head signed-app proof for annual-cache refresh, expiry, or annual-scan-failure fallback. Add redacted terminal output or logs for those paths; after updating the body, a fresh ClawSweeper review should run automatically, or a maintainer can request @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body has earlier heatmap screenshots and a current-head signed-AppKit accessibility transcript, but the prepared local artifacts are unrelated umbrella-PR images and there is no inspectable final-head signed-app proof for annual-cache refresh, expiry, or annual-scan-failure fallback. Add redacted terminal output or logs for those paths; after updating the body, a fresh ClawSweeper review should run automatically, or a maintainer can request @clawsweeper re-review.

Evidence

What I checked:

  • Current main does not implement the feature: Current main contains the existing Usage & Spend dashboard, but no token-activity heatmap source or annual activity-cache surface; the added heatmap file is present only in the PR commit. (Sources/CodexBar/PreferencesSpendDashboardPane.swift:64, f13ef61c49bd)
  • Feature direction requires sign-off: VISION.md lists new features and meaningful maintenance complexity under “Needs Sign-Off”; this PR adds a new dashboard mode plus an annual local-history load/cache path. (VISION.md:7, f13ef61c49bd)
  • Existing dashboard provenance: The current Usage & Spend dashboard appears to originate with the unified dashboard commit, which describes local account scans, incomplete-data handling, and cancellation-safe refreshes—the contracts this PR extends. (Sources/CodexBar/SpendDashboardModel.swift:1, 0397529ae6e5)
  • Recent adjacent dashboard work: Current main recently changed bounded Codex cost catch-up and dashboard cache behavior, so this branch needs a refresh against that evolution before performance and failure behavior can be accepted. (Sources/CodexBar/SpendDashboardController.swift:100, 2920019bc16d)
  • Latest PR behavior evidence is incomplete: The supplied proof manifest contains four prepared images from the umbrella PR’s subscription/models views, not this PR’s heatmap or its latest annual-cache fallback path. The current PR body includes a signed-app accessibility transcript, but no inspectable final-head cache-refresh or annual-scan-failure output was prepared locally. (/home/runner/_work/clawsweeper/clawsweeper/artifacts/event/codex/proof-scratch/2548/media-proof-manifest.json:1)
  • PR-head provenance: The current reviewed head is the established-empty-history follow-up; it is not contained by current main or any local release tag. (Sources/CodexBar/SpendDashboardModel.swift:683, 341fc5b0becb)

Likely related people:

  • Chipagosfinest: Co-authored the commit that introduced the current unified Usage & Spend dashboard and its local-scan/incomplete-data contracts. (role: feature introducer; confidence: high; commits: 0397529ae6e5; files: Sources/CodexBar/SpendDashboardModel.swift, Sources/CodexBar/SpendDashboardController.swift, Sources/CodexBar/PreferencesSpendDashboardPane.swift)
  • Xu Xiang: Recently changed bounded Codex catch-up and dashboard cache behavior on current main, which is adjacent to this PR’s new annual snapshot cache. (role: recent area contributor; confidence: medium; commits: 2920019bc16d; files: Sources/CodexBar/SpendDashboardController.swift, Sources/CodexBar/SpendDashboardModel.swift)
  • steipete: Appears in the recent dashboard evolution as co-author of the current-main catch-up work and owns the repository’s product direction. (role: adjacent owner; confidence: medium; commits: 2920019bc16d, b1170d83963d; files: Sources/CodexBar/SpendDashboardController.swift, VISION.md)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Rebase onto current main and resolve the dirty merge state.
  • Add redacted signed-app terminal output or logs for annual load, cache reuse or expiry, and failure fallback.
  • Obtain explicit maintainer sponsorship for the new dashboard feature.

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.

History

Review history (21 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-02T03:00:36.224Z sha 341fc5b :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-02T03:59:12.390Z sha 341fc5b :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-02T10:22:47.631Z sha 341fc5b :: needs real behavior proof before merge. :: [P3] Document the added annual local-history scan
  • reviewed 2026-08-02T11:30:28.314Z sha 341fc5b :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-02T15:52:52.085Z sha 341fc5b :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-02T16:23:00.287Z sha 341fc5b :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-02T19:15:31.050Z sha 341fc5b :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-02T22:39:41.803Z sha 341fc5b :: needs real behavior proof before merge. :: none

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Native macOS proof for Daily, Weekly, Cumulative, right-edge tooltip placement, weekday alignment, and English date formatting is now attached and described in the PR body. The PR remains Draft; the mixed-provider annual coverage finding is explicitly tracked as an open follow-up.

@clawsweeper

clawsweeper Bot commented Aug 1, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 1, 2026
@Yuxin-Qiao
Yuxin-Qiao marked this pull request as ready for review August 1, 2026 12:40
@Yuxin-Qiao

Copy link
Copy Markdown
Contributor Author

Addressed the mixed-provider coverage blocker in 49904268.

  • coverage is now explicit per day; missing history is unavailable rather than a fabricated zero
  • mixed 365-day + 30-day providers expose only their common covered interval
  • unavailable coverage propagates through Weekly and Cumulative modes and is visible in the UI/accessibility text
  • added confirmed-zero, malformed/unestablished history, mixed-provider, propagation, and bounded 365-day regressions
  • final focused run: 38 tests passed; 32 providers × 365 days completed in 0.161s with exactly 365 output points
  • make check passed with 0 SwiftFormat changes and 0 SwiftLint violations

The PR body now includes the updated contract and evidence, and the PR is Ready so the required macOS CI can run.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 1, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

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

Copy link
Copy Markdown

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

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/CodexBar/SpendActivityHeatmap.swift Outdated
Comment thread Sources/CodexBar/SpendActivityHeatmap.swift Outdated
@Yuxin-Qiao

Copy link
Copy Markdown
Contributor Author

Addressed both current-head review findings in b2114dc0:

  • the calendar now uses a Sunday-aligned 53-column container but exposes exactly 365 visible days; blank alignment cells are excluded from totals and coverage
  • seven ending-weekday regressions verify that oldest-day-only activity is never dropped from totals or the empty-state decision
  • the daily grid is now focusable and supports arrow-key movement across days/weeks
  • VoiceOver can move chronologically through the grid via an adjustable action, with the selected localized date and token value exposed as the accessibility value
  • pointer, keyboard, and VoiceOver selection share the same highlight and tooltip presentation

Validation on the pushed head:

  • 64 focused heatmap/model/controller tests passed
  • 32 providers × 365 days remains bounded to exactly 365 output points (0.183s locally)
  • make check passed: locale catalogs, SwiftFormat, and SwiftLint (0 violations)
  • signed Release build was bundled, validated, and launched successfully

Contributor-action items are complete. Maintainer sponsorship of the feature direction under VISION.md remains an explicit owner decision.

@clawsweeper re-review
@codex review

@clawsweeper

clawsweeper Bot commented Aug 1, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

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

Copy link
Copy Markdown

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

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/CodexBar/SpendActivityHeatmap.swift
@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. and removed proof: sufficient Contributor real behavior proof is sufficient. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 1, 2026
@Yuxin-Qiao

Copy link
Copy Markdown
Contributor Author

Final accessibility follow-up is pushed in db44ad15:

  • 365 visible daily cells now have individual virtual accessibility children, each exposing the app-locale date and token count or localized unavailable state
  • keyboard and VoiceOver input clear stale pointer hover before selecting, so the shared highlight, tooltip, and accessibility value follow the most recently used input method
  • both new Codex threads were answered; all review threads are now resolved
  • 64 focused tests passed again; make check passed with 0 formatting/lint violations
  • the signed Release app for db44ad15 was bundled, validated, and launched successfully

The PR body has the final contract and validation evidence. Contributor-action items are complete; maintainer feature-direction sponsorship remains the only explicit owner decision.

@clawsweeper re-review
@codex review

@clawsweeper

clawsweeper Bot commented Aug 1, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Aug 1, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

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

Copy link
Copy Markdown

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: 554ef51df5

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +683 to +692
let hasCompleteHistory = Self.hasCompleteTokenHistory(input, displayCalendar: calendar)
let aggregateIsInconsistent = input.snapshot.last30DaysTokens != nil && !hasCompleteHistory
if hasUnplacedTokens || aggregateIsInconsistent {
invalidDays.formUnion(coveredDays)
}
return SpendTokenActivityInputSummary(
coveredDays: coveredDays,
totalsByDay: totalsByDay,
invalidDays: invalidDays,
zeroKnownDays: hasCompleteHistory ? coveredDays : [])

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Treat successful empty scans as zero activity

When a Codex account has no sessions in the requested window, CostUsageFetcher.tokenSnapshot returns an empty daily array and last30DaysTokens == nil while leaving historyCoverageIsEstablished true. This makes hasCompleteHistory false and leaves zeroKnownDays empty, so every day from a successful 365-day scan is rendered as unavailable rather than showing “No activity in the last 12 months.” Treat an established, empty history as confirmed zero coverage while continuing to reject nonempty histories with missing or inconsistent totals.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient Contributor real behavior proof is sufficient. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Aug 1, 2026
@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 2, 2026
Yuxin-Qiao added a commit to Yuxin-Qiao/CodexBar that referenced this pull request Aug 2, 2026
The stacked integration unified the spend and activity scans on a 365-day
budget; the steipete#2548-authored scan budget tests still expected a 30-day spend
scan. Update expectations and distinguish the activity failure case by call
order instead of historyDays.
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. and removed proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Aug 2, 2026
@steipete

steipete commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Maintainer decision on the Usage & Spend program (applies to #2322, #2527, #2548, #2569, #2575, #2577 — closing together):

We want the ideas — the token-activity view and the cross-provider cost overview in particular are genuinely good, and we're adopting them. What we can't absorb is the delivery shape: 8k–20k-line PRs bundling scanners, pricing, identity, and UI can't be reviewed honestly, and live testing of the current heads surfaced the kind of defects that big surfaces hide (duplicate token-activity cards in the Models view; the unified Overview rendering no chip for an enabled provider; the account-attribution issue flagged earlier).

So we're taking this work as a base in-house and rebuilding it in small, individually landable slices — first the token-activity view rebuilt on the shared scan cache (no separate annual scan), then the cost overview aligned with the #2578 design discussion. Your commits will be cherry-picked where they fit, and every slice that draws on this work will credit you in the changelog, as today's merges already do.

@Yuxin-Qiao — you're this repo's most prolific contributor and much of today's release is your work. Focused PRs the size of #2574 land same-day; that's the shape that serves both of us.

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

Labels

merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants