Repository navigation
Add debug-only fake steps mode and reactive step screens - #90
sjaramillo10 wants to merge 8 commits into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (28)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change adds provider-based step access and cache synchronization, a persisted fake-step mode for debug builds, and observable cached history for the home and statistics screens. It also adds access-state handling, serialized provider changes, tests, and build and usage documentation. ChangesStep history and debug mode
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant MainActivity
participant DebugStepsMenu
participant HealthConnectSyncCoordinator
participant DebugStepsProvider
participant FakeStepsProvider
participant HealthConnectStepCacheSynchronizer
MainActivity->>DebugStepsMenu: select fake-steps menu item
DebugStepsMenu->>HealthConnectSyncCoordinator: refreshAfter provider change
HealthConnectSyncCoordinator->>DebugStepsProvider: setFakeSteps
HealthConnectSyncCoordinator->>DebugStepsProvider: access
HealthConnectSyncCoordinator->>HealthConnectStepCacheSynchronizer: sync when access is available
HealthConnectStepCacheSynchronizer->>DebugStepsProvider: readDailySteps
DebugStepsProvider->>FakeStepsProvider: delegate reads when fake mode is enabled
Merge Risk: ⚪ Minimal · up to No actionable merge-blocking issue is established. The documented fake-step cache behavior may remain until real data replaces it. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Release continues to use permission-gated Health Connect data, while sample generation is confined to a separately installed debug app. The main residual risk is debug data integrity: sample counts can overwrite recent history and remain visible or exportable after fake mode is disabled. No introduced security bypass was established, but runtime and crash-recovery behavior are not fully verified. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
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 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 73 functions across 23 files. (5 skipped: 5 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
Debug builds can now use deterministic sample step history without Health Connect permissions or a step-counter sensor. Debug installs alongside release with a separate application ID and a launcher icon marked with a D.
Fake steps can overwrite real or imported debug history in the recent 30-day window; sample counts can remain cached after fake mode is disabled until real data replaces them. The README documents this behavior.
Validation:
./gradlew buildpassed with all 22 unit tests, including regression coverage for retained Home data and queued toggles../gradlew ktlintCheckand./gradlew :app:testDebugUnitTest --tests 'dev.sjaramillo.pedometer.data.StepsCsvTest'also passed. Device UI behavior has not been manually verified.Summary by CodeRabbit
New Features
Documentation
Tests