feat(ios): show debug build distance from base - #5789
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 |
fb558e1 to
1354265
Compare
7b9082e to
888296e
Compare
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 888296e. Configure here.
ApprovabilityVerdict: Approved 8e9e51c This PR adds a debug-only badge showing git commit info and distance from base branch. All Swift code is wrapped in You can customize Macroscope's approvability policy. Learn more. |
888296e to
8e9e51c
Compare
Dismissing prior approval to re-evaluate 8e9e51c
4cb3307 to
497f54f
Compare
|
Dependency-safe rebuild is complete and preserved at The eventual unique PR commit is Verification on exact integration stack: resolver shell suite; monotonic shell suite; focused Swift 4/4; full native 234 tests/31 suites; Debug build/run and semantic Settings proof; Release build with normal name/version and empty Debug metadata; Conflict classification: stale history/code plus feature-placement overlap (old second Home badge conflicts with #5972 visual ownership). Landing plan: merge #5790, #5970, #5972; rebase only |
8e9e51c to
811a2a7
Compare
| if [[ "${CONFIGURATION}" == "Debug" ]]; then | ||
| GIT_COMMIT="$(git -C "${APP_DIR}" rev-parse --short HEAD 2>/dev/null || echo unknown)" | ||
| if [[ "${GIT_COMMIT}" != "unknown" ]] && \ | ||
| [[ -n "$(git -C "${APP_DIR}" status --porcelain -- . 2>/dev/null)" ]]; then |
There was a problem hiding this comment.
🟡 Medium Scripts/install-device.sh:82
The dirty-status check runs git status --porcelain -- . scoped to the app directory, so modifications to tracked files outside apps/swift-ios (e.g. ../mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework) are not detected. The build badge then reports a clean commit and enables a commit link even though the installed binary includes uncommitted changes from outside that path. Consider checking the full working tree (drop the -- . pathspec) so any dirty tracked input marks the commit as -dirty.
| [[ -n "$(git -C "${APP_DIR}" status --porcelain -- . 2>/dev/null)" ]]; then | |
| [[ -n "$(git -C "${APP_DIR}" status --porcelain 2>/dev/null)" ]]; then |
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/swift-ios/Scripts/install-device.sh around line 82:
The dirty-status check runs `git status --porcelain -- .` scoped to the app directory, so modifications to tracked files outside `apps/swift-ios` (e.g. `../mobile/modules/t3-terminal/Vendor/libghostty/GhosttyKit.xcframework`) are not detected. The build badge then reports a clean commit and enables a commit link even though the installed binary includes uncommitted changes from outside that path. Consider checking the full working tree (drop the `-- .` pathspec) so any dirty tracked input marks the commit as `-dirty`.
| fi | ||
|
|
||
| # Prefer an explicit comparison line, then the public repository's default. | ||
| git -C "${APP_DIR}" fetch --quiet upstream 2>/dev/null || true |
There was a problem hiding this comment.
🟠 High Scripts/install-device.sh:107
git fetch --quiet upstream runs unconditionally on every Debug install, so when the upstream remote requires interactive SSH authentication or the network stalls, the script hangs before xcodebuild ever starts. The fetch is unnecessary when T3_SWIFT_BASE_REF already resolves to a local commit, and git fetch has no timeout or non-interactive SSH settings. Consider skipping the fetch when the base ref is already resolvable locally, or guard it with a timeout and GIT_SSH_COMMAND set to BatchMode=yes.
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/swift-ios/Scripts/install-device.sh around line 107:
`git fetch --quiet upstream` runs unconditionally on every Debug install, so when the `upstream` remote requires interactive SSH authentication or the network stalls, the script hangs before `xcodebuild` ever starts. The fetch is unnecessary when `T3_SWIFT_BASE_REF` already resolves to a local commit, and `git fetch` has no timeout or non-interactive SSH settings. Consider skipping the fetch when the base ref is already resolvable locally, or guard it with a timeout and `GIT_SSH_COMMAND` set to `BatchMode=yes`.
|
Exact final-head simulator proof (811a2a7): the Debug badge remains legible at phone width and exposes the full build/base-distance accessibility label. Focused DebugBuildMetadataTests (5/5) and shell syntax passed. The current native-CI red is the base-branch provider-catalog fixture failure fixed separately in #6130. |


What changed
Fixes #5786.
Base:
pingdotgg/t3code:t3code/rebuild-mobile-app-swiftate55c7ffd1.Reviewed head:
8e9e51c380acc74050db09d8d36b75869d5f7312.UI evidence
Before:
Rebased feature evidence — build 5789, one ahead and zero behind (the follow-up changes only base-ref discovery):
Additional fallbacks:
Badge-to-commit interaction video
Verification
T3CodeTests/DebugBuildMetadataTests: 4 passed, 0 failed.bash -n apps/swift-ios/Scripts/install-device.sh: passed.plutil -lint apps/swift-ios/Resources/Info.plist: OK.git diff --check: passed; rebase preserved the feature patch exactly.upstream/HEADfinding is fixed with a verified localupstream/mainfallback beforeorigin/HEAD; an isolated Git fixture resolvedupstream/mainwhen the fork default pointed elsewhere. Current-head CI and review bots completed without further findings.Checklist
Built with GPT-5.6 Sol in the Codex harness.