Uh oh!
There was an error while loading. Please reload this page.
feat(swift-ios): link thread rows to pull requests - #5804
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 |
230a113 to
fba2518CompareUh oh!
There was an error while loading. Please reload this page.
fba2518 to
d56c1dcCompareApprovabilityVerdict: Needs human review 1 blocking correctness issue found. New feature adding pull request links to thread rows with async data loading and caching. Multiple unresolved comments identify potential bugs in cache expiration and retry logic. A Medium-severity finding about provider fallback logic also requires attention. You can customize Macroscope's approvability policy. Learn more. |
saphid
commented
Aug 9, 2026
@t3dotgg This SwiftUI PR is ready for your review. Its exact head is mergeable; repository/native CI, MacroScope, Cursor, and review-thread audits are clean with zero unresolved threads. The only red status is the unrelated Vercel marketing authorization check. |
4cb3307 to
497f54fComparesaphid
commented
Aug 10, 2026
Rebuilt as one focused commit on exact current Theo Verification on this exact Theo-based head:
Conflict classification: stale branch topology + duplicated foundation code, now removed. Unique feature remains wanted. Landing order: merge #5975 first so this UI consumes the cached subscription path; landing this first would remain correct but use the existing expensive refresh path. That is a dependency/performance concern, not a feature conflict. Fresh direct Opus review is unavailable because the confirmed session quota returns HTTP 429 before inference; no independent verdict is claimed. |
d56c1dc to
5f5a76bCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| @@ -325,6 +360,51 @@ struct HomeThreadCollectionView: UIViewRepresentable { | |||
| } | |||
| } | |||
| private func loadPullRequestIfNeeded(for thread: FeatureThread) { | |||
| guard let key = HomeThreadPullRequestLookupKey(thread: thread), | |||
| pullRequestResolutions[key] == nil, | |||
There was a problem hiding this comment.
successful lookups, including nil, are cached forever for the coordinator lifetime. a newly created PR or later state/title change therefore never appears while the row remains active. store a timestamp and expire resolved entries so visible rows can refresh.
| let status = try await client.sourceControlStatus(threadID: thread.id) | ||
| presentation = HomeThreadPullRequestPresentation(thread: thread, status: status) | ||
| } catch { | ||
| guard let self, pullRequestTasks[key]?.token == token else { return } |
There was a problem hiding this comment.
on failure the task entry is cleared with no failure resolution or retry deadline. working rows reconfigure frequently, so this can immediately launch another sourceControlStatus call and keep retrying. record a cooldown/backoff entry before allowing another lookup.
saphid
commented
Aug 13, 2026
Updated frozen head: |
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 fc5786d119b00eac24269bdbcfa9772ad63c370d. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
fc5786d to
0abd88cComparesaphid
commented
Aug 13, 2026
Refreshed this branch onto current The environment-specific provider catalog remains authoritative when present. Legacy snapshots now fall back to Verification on exact head
A fresh direct Claude Opus 5 high review was attempted after the test pass. The process exited 1 because the session quota is exhausted until 04:50 AEST. No independent review is claimed for this refreshed head. |
Uh oh!
There was an error while loading. Please reload this page.
saphid
commented
Aug 15, 2026
Closing this version while I rebuild the upstream contribution set from the latest base. Clean versions are coming soon. |

What changed
Linkwith the short#<number>label.Why
The server already publishes pull-request metadata, but the SwiftUI thread list did not surface it. A manual VCS refresh invalidates the backend PR cache, so list rows use the existing status subscription instead; the source-control screen keeps its explicit refresh behavior.
Scope
This is one native SwiftUI change. Every changed file is under
apps/swift-iosor its native tests. There are noapps/mobile, Expo, React Native, or bridge changes.UI evidence
Owner baseline
0d0c77431c851ff31181fb5f1708f351e0c5e80c:UI capture at
fba2518d76761185499935255b74d1e725936dfd:Integrated simulator safe-destination smoke video — starts on the row and verifies the sanitized destination opens PR #5804 in Safari. The destination launch in this recording was invoked at the simulator OS level because the hosted cell hides nested SwiftUI controls from the semantic automation tree; it is not presented as coordinate-tap evidence.
Final head
d56c1dcf937285609ca31b1c2462d14e9fdb47b9changes only the cache-expiry behavior and its test after this capture; it does not alter the rendered row or link destination.Evidence is Tailnet-only. The downloaded MP4 matched the source byte-for-byte (
f9d14dbf581f6934b4833c39fcaa2ece0e32f11d7c5ccbca63b83afe32f2fa0f, 3,514,304 bytes,video/mp4).Verification
4401D856-DE6C-4769-A649-468778C929F6.apps/swift-ios/Scripts/ci-test.sh: 222 passed across 27 suites;TEST SUCCEEDED.#5804rendered on the matching thread and the sanitized URL opened the actual PR.apps/swift-iosand native Swift tests.Macroscope's valid stale-cache finding was addressed by expiring successful lookup results after five minutes; the focused cache test now covers both success expiry and failure retry.
Independent cross-provider review was attempted with Claude Code 2.1.224 / Claude Opus 5 high, but Claude returned HTTP 429 before inference because the weekly quota was exhausted. No independent-model review is claimed.
Built with GPT-5.6 Sol high in T3 Code's Codex harness.
Note
Add pull request links to thread rows in the iOS home view
HomeThreadPullRequestPresentationin WorkspaceView.swift validates PR data before surfacing it: branch must match, PR number must be positive, and the URL must be a credential-freehttp/httpslink with a host.homeProviderLabelandHomeThreadRowContext.indexnow falls back to the global providers list whenprovidersByEnvironmentis absent, fixing cases where the provider ID was shown instead of its name.Macroscope summarized b499d83.
Note
Low Risk
SwiftUI-only home list UX with URL sanitization and tests; provider fallback change is a targeted correctness fix with no auth or data-path changes.
Overview
Home thread rows now asynchronously resolve and show a tappable PR badge (
#<number>) when source-control status matches the thread’s branch.The home collection coordinator loads status via
sourceControlStatus, keys lookups by checkout (not thread id), caches successes for five minutes with failure backoff, and cancels/prunes work when rows scroll off or the view dismantles.HomeThreadPullRequestPresentationonly surfaces PRs with matching branches andsafeExternalURL(credential-free http/https). Rich and slim rows get a SwiftUILink; VoiceOver gets PR text plus a custom action to open the PR in Safari.Provider resolution no longer falls back to legacy
snapshot.providerswhenprovidersByEnvironmentexists but omits the thread’s environment—avoiding wrong harness labels across devices.Reviewed by Cursor Bugbot for commit b499d83. Bugbot is set up for automated code reviews on this repo. Configure here.
Delivery: direct
Validated against Theo commit: f98cab5
Depends on: none
Merge order: this PR only
Validation status: Mergeable with runnable checks green; requested review changes remain. The unrelated Vercel authorization failure is a maintainer-side gate.