Fix Managed Navigation State, Chat Rendering & Test Stability - #34
Conversation
|
Warning Review limit reached
Next review available in: 8 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
Sequence Diagram(s)sequenceDiagram
participant AuthorizationFlow
participant HealthApp
participant XCTest
AuthorizationFlow->>XCTest: call connectHealthRecordAccount
XCTest->>HealthApp: complete onboarding and account connection
HealthApp-->>XCTest: return setup state
XCTest-->>AuthorizationFlow: return when setup fails
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@Sources/SpeziViews/Views/ManagedNavigationStack/ManagedNavigationStack.swift`:
- Line 123: Update ManagedNavigationStack so the effective navigation path is
reconfigured whenever externalPath changes, before body selects externalPath ??
internalPath. Ensure a later nil externalPath does not leave the persisted
internalPath using stale steps, while preserving the existing external path when
it is provided.
In `@Sources/XCTHealthKit/XCTest`+HealthRecord.swift:
- Line 144: Update the flow around getStartedButton.isHittable to guard against
a non-hittable button: record the assertion failure and return before invoking
tap(). Preserve the existing tap behavior when the button is hittable.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: e6ac5cf7-0dab-47c3-957b-dcea08b07c4f
📒 Files selected for processing (4)
Sources/SpeziViews/Views/ManagedNavigationStack/ManagedNavigationStack.swiftSources/XCTHealthKit/XCTest+HealthRecord.swiftTests/SpeziViewsTests/ManagedNavigationStackStepIdentifierTests.swiftTests/SpeziViewsTests/UITests/TestApp/ViewsTests/ManagedNavigationStackTestView.swift
There was a problem hiding this comment.
♻️ Duplicate comments (1)
Sources/SpeziViews/Views/ManagedNavigationStack/ManagedNavigationStack.swift (1)
123-123: 🎯 Functional Correctness | 🟠 MajorConfigure the state-backed internal path.
let internalPath = Path()creates a new path on every initializer call. SwiftUI can retain the existing@Statestorage, soState(initialValue: internalPath)does not replaceself.internalPathwhen the view keeps the same identity. If the stack is first created with an external path and later rebuilt withexternalPath == nil, lines 173-175 configure the new local path, butbodyreads the persistedself.internalPathat line 127. The internal path can remain unconfigured or stale, which can block navigation. Configure the effective state-backed path after state installation, and add a regression test for the external-path-to-niltransition.Also applies to: 167-175
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Sources/SpeziViews/Views/ManagedNavigationStack/ManagedNavigationStack.swift` at line 123, Update ManagedNavigationStack initialization so the effective internal path is configured on the installed `@State-backed` internalPath, not only on the temporary initializer-local Path; ensure the external-path-to-nil transition updates the persisted state that body reads. Add a regression test covering this transition and verifying navigation uses the newly configured local path.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Duplicate comments:
In
`@Sources/SpeziViews/Views/ManagedNavigationStack/ManagedNavigationStack.swift`:
- Line 123: Update ManagedNavigationStack initialization so the effective
internal path is configured on the installed `@State-backed` internalPath, not
only on the temporary initializer-local Path; ensure the external-path-to-nil
transition updates the persisted state that body reads. Add a regression test
covering this transition and verifying navigation uses the newly configured
local path.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 7c0de381-926f-47bc-b8a0-9e08edbc2f26
📒 Files selected for processing (5)
Sources/SpeziChat/MessageView.swiftSources/SpeziViews/Views/ManagedNavigationStack/ManagedNavigationStack.swiftSources/XCTHealthKit/XCTest+HealthRecord.swiftTests/SpeziViewsTests/UITests/TestAppUITests/SpeziPersonalInfo/PersonalInfoViewsTests.swiftTests/SpeziViewsTests/UITests/TestAppUITests/SpeziViews/EnvironmentTests.swift
♻️ Current Situation & Problem
⚙️ Release Notes
Code of Conduct & Contributing Guidelines
By creating and submitting this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: