Repository navigation
fix(ios): show recent usage days first - #117222
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 19, 2026, 9:21 PM ET / August 20, 2026, 01:21 UTC. ClawSweeper reviewWhat this changesThe PR makes iOS request daily usage buckets in the device timezone and show the newest fourteen returned days first. Merge readinessKeep open for routine maintainer review: current main still truncates the Gateway’s ascending daily rows to the oldest fourteen, while this focused patch selects and displays the newest fourteen and aligns both iOS callers on the device calendar. The linked native screenshot proof is adequate; exact-head iOS checks were still running in the supplied status. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) — step 2 Assertions:
How this fits togetherThe iOS app requests daily usage-cost buckets from the Gateway for the Usage screen and sidebar dashboard. The Gateway resolves the requested calendar-day interpretation, returns date-ascending rows, and iOS selects the visible recent-day subset. flowchart LR
A[iOS device time zone] --> B[Usage-cost request]
B --> C[Gateway calendar-day resolver]
C --> D[Date-ascending daily rows]
D --> E[iOS recent-day selection]
E --> F[Usage screen and sidebar]
Before merge
Agent review detailsSecurityNone. PR surfaceOther +62. Total +62 across 5 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain one shared iOS usage-request builder and the local recent-day transformation, then land after the current head’s native checks are green. Do we have a high-confidence way to reproduce the issue? Yes—current main is source-reproducible: the Gateway sorts daily rows by ascending date and the iOS view then takes prefix(14), excluding recent rows when more than fourteen exist. Is this the best way to solve the issue? Yes. Selecting the final fourteen rows locally is the narrow fix because the Gateway’s ascending ordering is a shared response contract; the shared request builder also prevents the sidebar and overview from diverging on timezone semantics. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3bfc9bc80451. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Thanks — agreed. The current evidence proves the gateway contract and the ordering transformation, but it does not prove the rendered iOS Usage screen. I will not treat the PR as merge-ready on that basis. The contributor host has Apple Command Line Tools only, with no Xcode installation or iOS Simulator, so I cannot honestly attach the requested native screenshot or recording from this exact head. Exact-head iOS CI has completed the Debug app build and is currently running the Release build, followed by simulator tests and screenshot capture; however, the standard release screenshot set does not include the Usage destination, so I will not mislabel those artifacts as proof. No code defect was identified in this review. The remaining blocker is specifically native after-fix Usage-screen evidence. I am leaving the PR open and blocked until that can be captured on an Xcode/simulator or device environment. |
|
Exact-head native proof is now available. Xcode 26 CI passed the iOS Debug/Release builds and fixture-backed XCUITest, and produced the corrected rendered Usage screen artifact: https://github.com/openclaw/openclaw/actions/runs/30686813787/artifacts/8815099419 The native screenshot shows July 31 above July 30 with recent days descending; the test verifies exactly July 31 through July 18, with no August 1 rollover and no July 17 overflow row. I updated the PR body with the job, artifact, assertions, and verification details. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Update: no maintainer rerun is currently needed. The fresh fork run exposed a deterministic workflow mismatch: |
|
Exact-head update for The remaining failures are not correlated with this iOS/Swift-workflow diff:
All three failed CI lanes passed on the subsequent main run: https://github.com/openclaw/openclaw/actions/runs/30734821091 The author account has repository |
|
Addressed the scope concern in 46a439380b4fe29380833ed84ff50d8e59b3a720: the hosted-fork macOS Swift timeout/serialization policy and its guard expectation are removed from this PR. The remaining workflow delta only preserves native Usage screenshot capture and artifact upload for the iOS proof path. The PR is now 10 files (+159/-8), and exact-head CI is running at https://github.com/openclaw/openclaw/actions/runs/30789206768. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Resolved the merge conflict by merging current upstream Exact-head local validation at @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Resolved the new merge conflict by merging current upstream main into the existing branch without rewriting history. The only manual resolution kept main’s version-2 native-string inventory; the branch’s obsolete version-1 generated delta only changed a source line number. Exact-head validation at de72e67 passed: SwiftFormat 366/366 clean, focused Fastlane gates 21/21, git diff --check, and repository-mandated autoreview with no accepted or actionable findings. Hosted CI is pending, and the PR body now carries exact-head evidence. @clawsweeper re-review |
|
Exact-head workflow blocker: de72e67 already merged eb1035e, the base tip current when this head was created. The full CI run for this exact head ended action_required with zero jobs: https://github.com/openclaw/openclaw/actions/runs/31765419942. The other pull_request workflows are at the same fork-approval gate. funston-bot also attempted GitHub’s supported run-approval endpoint and lacks permission. There is no failed branch job or narrow code repair to make, and another refresh solely to chase moving main is not warranted by repository policy. Could a maintainer approve the pending fork workflows once so ios-build can produce the requested exact-head UsageProof artifact? This is the only remaining self-service-exhausted validation step. |
|
Exact-head local validation at |
|
Maintainer QA and landing verification for exact contributor head
Implementation credit remains with @funston-bot; the original report is credited to @barnett. |
|
Merged via squash.
|
* fix(ios): show recent usage days first Use the device calendar for daily usage buckets so late-evening and travel activity stays on the expected date. Co-authored-by: Barnett Klane <[email protected]> * fix(ios): satisfy native validation Keep the generated i18n inventory aligned and use the optional Data-to-String conversion required by the iOS lint policy. Co-authored-by: Barnett Klane <[email protected]> * test(ios): publish native usage ordering proof Add a deterministic 20-day Usage fixture and an exact-head XCUITest that verifies the newest fourteen rows, captures the corrected native screen, and publishes the PNG separately from App Store screenshots. Keep screenshot proof running after unrelated lifecycle-test failures and lock the artifact path into the Fastlane gate tests. Co-authored-by: Barnett Klane <[email protected]> * fix(ci): serialize Swift tests on hosted forks Keep the 12-vCPU Blacksmith path parallel while avoiding process and timing contention on hosted fork runners.\n\nCo-authored-by: Barnett Klane <[email protected]> * fix(ci): budget hosted serial Swift tests * chore(ci): keep usage fix scoped to iOS * test(ios): fail closed on missing usage proof * test(ios): simplify usage proof scope --------- Co-authored-by: Barnett Klane <[email protected]>
Summary
What Problem This Solves
usage.costreturns daily rows oldest-to-newest. The iOS Usage screen selectedprefix(14), so a 31-day response displayed the oldest rows and omitted recent days. iOS also omitted timezone mode, so Pacific-evening activity could appear in the following UTC day.Evidence
The one-off screenshot fixture, XCUITest, Fastlane capture lane, and CI artifact-path changes were removed after producing that evidence. The PR now contains only the product fix and focused unit tests.
Validation
git diff --check: cleanRelease note
Fix iOS Usage so recent days appear first and daily totals follow the device's local calendar date.
Reported by @barnett.