Repository navigation
Fix spend chart date inspection and source visibility - #4329
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. Reviewed October 7, 2026, 9:54 PM ET / October 8, 2026, 01:54 UTC (Revision 3). ClawSweeper reviewWhat this changesThe branch constrains spend-chart date inspection, scopes and wraps source legends, and recovers stale selections while retaining recorded zero-dollar amounts. Example: Hover October 4, 2026 in the sparse daily chart.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain This PR needs real behavior proof before merge. It remains useful on current main, and no actionable correctness defect was found; the earlier interactive-proof blocker remains unresolved. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherCodexBar’s Usage & Spend settings turn recorded account history into spending charts and exact-amount inspectors. This change governs which dates and sources users can inspect within the displayed reporting period. flowchart TD
A[Recorded account amounts] --> C[Spend chart presentation]
B[Reporting period and time zone] --> C
C --> D[Available date buckets and sources]
E[Pointer and source selections] --> F[Validate selection]
D --> F
F --> G[Chart and exact amount inspector]
Technical reviewBest possible solution: Keep selection validation and source scoping in the existing chart presentation layer, preserving recorded-zero, missing-cost, and stable account-identity semantics. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the path: the base rounds pointer dates without checking the plotted domain or recorded daily buckets. The scope fixtures provide concrete boundary cases; this read-only review did not execute them. Is this the best way to solve the issue? Yes, the patch reuses the existing chart model and wrapping layout, preserves accounting semantics, and has explicit maintainer direction for scoped source visibility. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 844b0e19bbbb. Provenance checked
TestingProof path: in-process harness. Added test files: 3. SecurityNone. EvidenceWhat I checked:
Likely related people:
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment History |
Keep date inspection within plotted buckets, retain recorded zero-dollar source chips and inspector rows, and cover hourly inspection across DST. Reuse source records during stacking and sync the reviewed main baseline without rewriting contributor history. Co-authored-by: Yuxin Qiao <104957188+Yuxin-Qiao@users.noreply.github.com>
Spend-chart pointer inspection could round plot padding to an adjacent date with no bucket. Resolve daily inspection to existing buckets inside the plotted domain, restrict hourly navigation to recorded days in the reporting range, and recover stale date/source selections.
Scope the wrapping legend to sources with recorded amounts in the displayed overview, drilled interval, or hourly day. Recorded zero-dollar sources remain visible and selectable, and zero-dollar inspector rows remain visible. Account labels/colors continue to use the full source list. Stack construction reuses source identity records without changing accounting totals.
Maintainer changes preserve the contributor commits and add DST inspection and zero-only source coverage. Thanks @Yuxin-Qiao!
Verification
make check: passed; zero format/lint violations.source Scripts/test_environment.shfollowed byswift test --build-system native --jobs 4 -Xswiftc -gnone --filter 'SpendTrendScopeTests|SpendTrendChartTests|SpendTrendPresentationRegressionTests|SpendTrendCalendarTests|SpendTrendOverflowTests|SpendStackedBarChartTests': 35 tests passed on the final head.CODEXBAR_SPEND_TREND_PROOF_DIR=...withSpendTrendChartRenderTests: one native render test passed, producing 14 synthetic captures.c3c6ce06120: a behavior-preserving extraction of the existing overlay date calculation plus scope tests failed 21 assertions. The contributor's positive-only filter separately failed three zero-source assertions; all pass after the fix.Final combined source proof at
8f564053f16d0b1a027e35828dca44c49df34d2c:The wrapper forwards
test/buildtoswiftwith--build-system native --jobs 4 -Xswiftc -gnone. 1,592 selections, 144/144 groups successful on the first attempt, zero retries and zero timeouts. The earlier 180-second invocation stopped on an unrelated publication-suite timeout; source and assertions were unchanged for the successful rerun. The pushed integration branch istriage/20260921-spend-prs-23; its later commit adds only the contributor's runtime-proof documents.Synthetic before/after
Before the zero-dollar correction:
After:
These are isolated production-component renders, not a packaged-app pointer recording. Fixture details and reproduction commands:
docs/screenshots/spend-chart-scope/README.md.Refs #4298.
Current head:
9e0ee8091e87dce25848925108dcdfdd632ea646. CI for this head was queued at the final status check.