Repository navigation
feat(widgets): add a multi-account quota overview - #4400
Conversation
Show four account quotas on medium and support eight on large, ordered by remaining quota. Count accounts beyond the existing six-account snapshot cap without publishing their identities or expanding refreshes. Reuse the widget configuration and provider-safe account filtering explored in #3938, with quota-only rows and no paging or combined history. Fixes #3144 Refs #3938 Co-authored-by: Adrien Ledeul <adrien.ledeul@cern.ch>
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: blocked before merge. What this changesAdds a provider-specific Accounts widget with quota-sorted account rows and a combined overflow count. Example: Nine Codex accounts are configured and six are published to the widget snapshot.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain Keep open: this owner-authored PR implements the approved overview missing from main, but the previously reported setup-message defect remains unresolved. Priority: P3 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe app publishes verified, privacy-aware account quotas to shared JSON; WidgetKit reads that snapshot and renders the selected provider’s account overview. flowchart LR
A[Saved account inventories] --> B[Verified quota snapshots]
B --> C[Shared widget JSON]
C --> D[Provider timeline]
D --> E[Quota ordering and overflow]
E --> F[Accounts widget]
Technical reviewBest possible solution: Land the bounded overview with actionable setup guidance while preserving existing account ownership, privacy, refresh limits, and widget configurations. Do we have a high-confidence way to reproduce the issue? Source inspection establishes the empty-state failure with accountWidgetsEnabled=false; no runtime reproduction was attempted under the read-only review constraints. Is this the best way to solve the issue? Reusing the existing account writer, timeline, quota selector, and privacy labels is a focused implementation of the owner-approved design. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 08f42ab06704. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel 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 HistoryReview history (2 earlier review cycles)Reviewed October 9, 2026, 11:37 PM ET / October 10, 2026, 03:37 UTC (Revision 3). |
Split the account projection and quota sort into typed steps so Swift 6.2 and 6.3 can compile the overview without a type-check timeout.
# Conflicts: # CHANGELOG.md
Adds CodexBar Accounts, a quota-only overview for one provider. Medium shows up to four account rows and large supports eight, ordered by their most constrained general quota's remaining percentage, lowest first. One
+N morerow combines rows beyond the family limit with accounts omitted by the existing six-account snapshot cap.The widget reuses
ProviderSelectionIntent, the existing timeline and account snapshot data, quota selection, and privacy labels. Only anonymous overflow counts are added to the snapshot; refresh opt-in, ownership guards, the six-account publication cap, and existing widget configurations stay intact. Large currently has at most six populated rows from the app; eight-row capacity is verified synthetically. No paging, combined history, or account-level borrowing of provider costs/credits.Thanks @nicosuave for the request and @aledeul for #3938. This smaller implementation adopts that PR's widget configuration and provider-safe account filtering; the commit retains Adrien Ledeul's co-author credit. The prior PR is intentionally not adopted wholesale because the approved design excludes its paging, active-account state, combined history, and changes to existing tiles.
Fixes #3144
Refs #3938
Verification
The
swift-nativewrapper sourcesScripts/test_environment.shand forwardstest/buildto Swift with--build-system native --jobs 4 -Xswiftc -gnone.cd24c380e100:../reports/widgets-multi-26-proof/swift-native test --filter WidgetAccountPublicationTests— 5 tests, 4 passed / 1 failed, specifically the absent overflow count (nilinstead of3). The six-account cap and selected-account retention assertions already passed.CODEXBAR_WIDGET_HEADLINE_PROOF_DIR="$PWD/../reports/widgets-multi-26-proof" ../reports/widgets-multi-26-proof/swift-native test --filter 'Widget|ProviderArchitectureGatekeeperTests'— 284 tests in 33 suites passed. Covers sorting, four/eight cutoffs, combined overflow, redaction, provider/owner isolation, legacy decoding, all three account inventories, and light/dark render/OCR proof../Scripts/test.sh --swift-command "$PWD/../reports/widgets-multi-26-proof/swift-native" --direct-workers 4— all 149 groups passed on final head0756b45251f, all on the first attempt with zero timeouts or retries; direct mode verified 14,491 test methods. The earlier run also passed after two unrelated status-menu/usage-store batches recovered through 24 isolated retries.--filter 'WidgetAccountsOverviewTests|WidgetHeadlineRenderTests|WidgetAccountPublicationTests'— 13 tests in 3 suites passed, including the original red test and eight overview renders. The before comparison uses the existing single-account layout with quota-only data.make check— passed; SwiftLint 0 violations across 2,939 files.git diff --check— clean. Independent Codex review — no actionable P0–P2 findings.git diff --shortstat origin/main -- Sources WidgetExtension: 29 files changed, 186 insertions(+), no deletions (authorized feature growth, including 23 generated locale entries).-- Tests: 4 files changed, 265 insertions(+), no deletions.The first CI run exposed a type-check timeout in the chained account projection/sort on Swift 6.2.4 and 6.3.3. Commit
0756b45251fseparates it into explicitly typed steps. Local Swift 6.4 passes the same 284 focused tests and all 149 full-suite groups after the correction; the new CI run checks both older compilers.Synthetic visual proof
Production SwiftUI views, synthetic accounts, simulated WidgetKit margins. These verify layout and OCR readability; they do not claim installed WidgetKit compositor or upgrade/rollback proof. The owner's app and installed widgets were not touched.