CCCT-2888 Handle Optional Daily Limits For Backward Compatibility - #3938
Conversation
[AI] Parsed null opportunity and payment unit daily limits as "no daily limit" instead of failing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
[AI] Stopped missing daily limits from triggering daily-limit warnings or blocking further work. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
[AI] Showed a plain daily visit count and hid the per-day limit text wherever an opportunity has no daily limit. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
[AI] Bumped the Connect API version to 2.0 so the server knows this app handles null daily limits. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Suggested Review OrderRead commit by commit; each is self-contained with its tests:
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (21)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughConnect treats null daily limits as absent limits for jobs and payment units. Daily-limit warnings and blocked-work checks use guarded comparisons. Home and Connect screens display visit counts without daily-limit indicators when no limit exists. The change also updates the Connect API version to 2.0 and adds tests and release notes for the behavior. Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant ConnectOpportunitiesParser
participant ConnectJobRecord
participant ConnectDeliveryDashboardFragment
participant ConnectProgressCard
ConnectOpportunitiesParser->>ConnectJobRecord: Parse job with absent daily limit
ConnectJobRecord->>ConnectDeliveryDashboardFragment: Provide job and limit state
ConnectDeliveryDashboardFragment->>ConnectProgressCard: Provide visit count and no maximum
ConnectProgressCard->>ConnectDeliveryDashboardFragment: Render count without progress bar
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change consistently represents uncapped opportunities and removes daily-limit indicators while preserving other limits. No concrete merge-blocking issue is established; normal checks and server compatibility validation remain appropriate. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The no-limit behavior retains overall visit caps and existing authentication. The main uncertainty is rollout compatibility: API version 2.0 also applies to progress, job claims and payment confirmations, and compatibility with the real server has not yet been demonstrated. Retained concerns
Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 63 functions across 19 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3938 +/- ##
============================================
+ Coverage 36.85% 37.16% +0.30%
- Complexity 6748 6829 +81
============================================
Files 1032 1034 +2
Lines 60861 61093 +232
Branches 7399 7471 +72
============================================
+ Hits 22432 22705 +273
+ Misses 35828 35749 -79
- Partials 2601 2639 +38 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…daily-limits-backward-compat # Conflicts: # RELEASES.md
[AI] Made the daily limit JSON helper fall back on a missing key as well as null, and renamed it to optIntSafe. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…daily-limits-backward-compat # Conflicts: # RELEASES.md
| public static final String META_JOB_UUID = ConnectJobRecord.META_JOB_UUID; | ||
| public static final String META_PAYMENT_UNIT_UUID = "payment_unit_id"; | ||
|
|
||
| public static final int NO_DAILY_LIMIT = -1; |
There was a problem hiding this comment.
I see this constant defined in several places but thinking it should be a single source of truth since changing it in one place alone would break functionality
CCCT-2888
Product Description
With no daily limit, the app shows only today's visit count, without daily-limit bars, warnings or "per day" text.
Here are before (left side) and after (right side) screenshots of what the screens look like with
nullvalues:Technical Summary
Null limits are stored as a -1 sentinel in the existing columns, avoiding a DB migration. The API bump to 2.0 is what tells the server it may send nulls (CCCT-2765).
Safety Assurance
Safety story
What gives confidence
Risks to review
Automated test coverage
Unit and Robolectric tests cover null parsing, skipped warnings and blocking, and the count-only UI.
🤖 Generated with Claude Code