Redesign usage share card around model activity#2307
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 20, 2026, 8:03 PM ET / July 21, 2026, 00:03 UTC. Summary Reproducibility: not applicable. This PR proposes an additional user-facing card style, not a report of broken existing behavior. The final interactive selector behavior can be validated through a fresh packaged-app run rather than a bug reproduction. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Keep Summary as the default, merge the activity card only with owner approval, and attach redacted current-head bundle proof showing both styles plus Copy Image, Copy Text, and Save producing the selected style. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes an additional user-facing card style, not a report of broken existing behavior. The final interactive selector behavior can be validated through a fresh packaged-app run rather than a bug reproduction. Is this the best way to solve the issue? Unclear: retaining Summary as the default is the narrow compatibility-safe implementation, but whether Model activity should be a supported selectable artifact requires owner approval rather than further autonomous code changes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f8636cb37eb0. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
Review history (8 earlier review cycles)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a77e8aafd5
ℹ️ 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".
a77e8aa to
4df2ed3
Compare
4df2ed3 to
ccc4f58
Compare
|
@clawsweeper re-review Exact-head proof handoff for Real renderer outputsAll three files were generated by the final
Renderer tests assert exact pixel dimensions, PNG signature, nonblank sampled color diversity, and sampled alpha > 0.99 at every size. Findings addressed
Each of the four original inline threads has a finding-specific reply and is resolved. Exact-head gates
The branch was rebased and exact-head tested on Scope note: the multi-provider fixture proves the renderer/payload contract, and the OpenRouter test proves the production dashboard-builder path. This PR does not claim every CodexBar provider already supplies usage history to Usage & Spend; provider fetcher expansion is separate. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
CI triage update for ClawSweeper/maintainers:
The share-card exact-head local gate remains 718 selections / 60 of 60 groups with no retries or timeouts. GitHub lint, GitGuardian, and the arm64 release build are green; remaining CI continues. |
Renderer provenance correction for ClawSweeperThe P1 in the generated review is based on a reversed premise. This PR does not replace a proven Immutable repository evidence:
Exact-head runtime proof at
The only red CI job is the unrelated, freshly reproduced parameterized |
|
@clawsweeper re-review |
|
@steipete this is the remaining product-layer follow-through for the share-card work that has already landed: #2112 introduced sharing, #2116 added Usage & Spend, #2292 fixed the production PNG renderer, and #2308 established the partial-history truth contract. This PR brings those pieces together into the model-activity share card; leaving it open means the recently merged prerequisites are present, but the intended public artifact is not. I have now merged current The implementation/proof is ready; the remaining decision is the product call ClawSweeper identified: whether model activity and explicit partial-coverage disclosure should be the default share narrative. I would appreciate that owner decision so this final piece does not get stranded after its prerequisites merged. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|


Status
Ready for maintainer review. Merge-risk follow-up
cf1157cdpreserves the established summary card as the default and exposes the redesigned model-activity card as an explicit preview choice. The underlying activity-card implementation retains its exact-head local release-gate proof fromccc4f585970899129a13efe6af1c4fd8a8d381d9; GitHub CI validates the current PR head and merge ref.What changed
source instance + provider + raw modelbefore public sanitizationClaude Sonnet 4 via OpenRouter)Real renderer proof
These are deterministic, redacted outputs produced by
ShareStatsRendererfrom the committed proof fixture on the exact PR head—not design concepts.1200×630
Additional social sizes
Renderer assertions verify exact pixel dimensions, nonblank color diversity, and fully opaque sampled output at all three sizes.
Renderer provenance
This PR preserves the final no-Metal renderer merged in #2292. The merged tree at
6ba3d195usesNSHostingView+NSBitmapImageRep+NSGraphicsContext+displayIgnoringOpacity; it does not use SwiftUIImageRenderer. The maintainer’s merge verification explicitly records thatImageRenderer/Metal was removed for Intel CI compatibility.Against current
main, this PR only parameterizes the bitmap pixel dimensions for deterministic social-size exports and updates the default filename. It does not replace the proven rendering path.Truth-contract fixes
periodEndcomes from the selected chart domain’s inclusive end, so quiet trailing days stay in a 30-day snapshot.Validation
Activity-card implementation commit:
ccc4f585970899129a13efe6af1c4fd8a8d381d9make test— 718 selections, 60/60 groups passedmake check— passed; SwiftFormat 0 files, SwiftLint 0 violations across 1,576 filesswift test --filter ShareStatsTests— 21/21 passedCostUsageTokenSnapshotwith known Claude tokens and unavailable pricing survivesSpendDashboardModel.buildand appears asClaude Sonnet 4 via OpenRouterCompatibility follow-up commit:
cf1157cdShareStatsCardStyle.defaultStyleProof file SHA-256:
Scope and honest limitations
The committed multi-provider proof fixture demonstrates the renderer and payload contract under multiple provider/source/model routes. The production builder regression demonstrates that a real dashboard input shape preserves an OpenRouter route when pricing is missing.
This PR does not claim every CodexBar provider currently supplies token/cost history to Usage & Spend. The selected share card reads whatever supported sources the existing Usage & Spend pipeline supplies; provider fetcher expansion remains separate work. No real account data was used in the committed proof.
Related work