fix(swift-ios): show cached source-control status immediately - #5975
fix(swift-ios): show cached source-control status immediately#5975saphid wants to merge 6 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|
Integrated simulator verification completed after the focused cache tests and passing native CI. The home screen remained responsive while connected to the disposable backend and continued rendering the workspace/thread source-control summary. The cache refresh/fallback behavior itself is covered by the exact-head native tests so this proof does not rely on timing a transient network failure in a screenshot. |
ApprovabilityVerdict: Needs human review This PR introduces new async task coordination with timeouts and event accumulation to show cached source control status immediately. While self-contained and well-tested, the new loading strategy pattern represents a meaningful runtime behavior change that warrants human review. You can customize Macroscope's approvability policy. Learn more. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d10233b. Configure here.
|
Additional integrated simulator proof on iOS 26.5: the home row resolved the real upstream PR from the cached source-control status and visibly rendered the green This follows the focused 221-test pass and the green native CI run. |



Summary
Uses the VCS subscription snapshot for fast cached status, falls back to an explicit refresh on timeout/subscription failure, and preserves toolbar/pull-to-refresh semantics.
Verification
Scope
Targets the active native SwiftUI owner branch (#5178).
Note
Show cached VCS status immediately in source control view before falling back to a full refresh
NativeFeatureClient.sourceControlStatusnow reads from the VCS status event stream viaNativeSourceControlStatusAccumulator, returning a cached status within ~2 seconds before falling back to a fullrefreshVCSStatuscall.refreshSourceControlStatusmethod (and matchingFeatureClientprotocol requirement) forces a fresh fetch, used by the toolbar reload button and pull-to-refresh inFeatureSourceControlView.NativeWorkspaceMapper.sourceControl(local:remote:)defers emitting a status for repos with a primary remote until remote data arrives, preventing incomplete status display.Macroscope summarized c7e7dbd.
Note
Low Risk
UX and read-path changes for source-control display; explicit refresh behavior is preserved for user-initiated reloads, with tests covering remote-wait semantics.
Overview
Source control on iOS now prefers fast cached/subscription data on first open instead of always hitting a full VCS refresh.
sourceControlStatusraces a ~2s listen onvcsStatusEvents(viaNativeSourceControlStatusAccumulatormerging local/remoteVCSStatusEvents) against a timeout; if nothing usable arrives, it falls back torefreshVCSStatusas before. Repos with a primary remote do not surface UI status until remote data is present, avoiding misleading ahead/behind counts.A new
refreshSourceControlStatusalways performs the full refresh; the toolbar reload and pull-to-refresh call that path, while the screen’s initial.taskuses the cached path.FeatureClientgains the matching protocol method (stub delegates tosourceControlStatusfor unavailable clients).Reviewed by Cursor Bugbot for commit c7e7dbd. Bugbot is set up for automated code reviews on this repo. Configure here.