fix(swift-ios): honor the Add project starting directory#23211

open3
t3code/rebuild-mobile-app-swift
fix/issue-16507
opened15d agobyJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 15d ago

Problem

On the SwiftUI iOS client, Add project always starts its existing-folder browser and clone destination at ~/, even when the selected environment has Add project starts in set to ~/projects. The server returns the setting correctly; the native client did not decode or use it.

Change

Carry addProjectBaseDirectory from each environment's server settings into the native environment model. Seed the folder browser, existing-folder path, and clone destination from the trimmed setting, falling back to ~/ when absent or blank. Environment switches reseed from the selected environment. Late settings update untouched paths, including after repository lookup, while user edits, navigation, and active clone operations retain their paths.

Scope and approval

Fixes #16507

Triaged bug via the automated issue flow; GitCafe issue #16507. Swift-only fix against t3code/rebuild-mobile-app-swift, under the explicit SwiftUI triage guidance. No server, web, desktop, React Native, authentication, permission, or MCP behavior changes. No merge or auto-land requested.

Verification

  • Real isolated development server on main b5a226e49c: server.getConfig returns the configured /tmp/issue-16507-projects; filesystem.browse of ~/ returns /home/ubuntu, and of the configured directory returns /tmp/issue-16507-projects. Runtime transcript. This verifies the host contract, not native rendering.
  • git diff --check passed; commit formatter hooks passed. Both requested reviewers (GPT-6.1-Sol and Claude Opus 5.5) returned MERGE on final head 7a5fcf45e1.
  • cannot-verify ios-swift: bash apps/swift-ios/Scripts/ci-test.sh fails with missing required command: xcodebuild on this Linux VM. No Swift compilation, executable regression tests, or native before/after recordings were produced. Native-check log.

Evidence status (native rows require Apple-host verification; no substitute web/RN captures):

RowBeforeAfterDiff0DiffT
N0: decode/map and legacy configUnverifiedUnverifiedN/A: logicN/A: logic
N1–N2: configured and blank folder pathsMissing recordingMissing recordingNot producedNot produced
N3–N4: clone destination and clone promptMissing recordingMissing recordingNot producedNot produced
N5–N6: environment switches and user editsMissing recordingMissing recordingNot producedNot produced
N7: delayed settings, including repository lookupMissing recordingMissing recordingNot producedNot produced
N8–N9: entry points, error recovery, New project boundaryMissing recordingMissing recordingNot producedNot produced

Final fixture matrix and proof audit: insufficient native proof, eligible only under the explicit platform exception. The audit pins the first late-config correction; the final commit additionally retries seeding after repository lookup, with the same native proof gap.

Evidence index. Native fixtures and captures remain outstanding for Julius under the Swift platform exception. No visual comparison or claim that nothing else changed is made.

Models: Claude Opus 5.5 and GPT-6.1-Sol, through Claude Agent SDK and Codex in T3 Code.

Checks

2 failing · 23 successful · 3 skipped · 1 neutral
Some checks failed

Failing2

7a5fcf4

Added 3 commits

  • fix(swift-ios): seed Add Project paths from the environment's base directory371bb82
  • fix(swift-ios): reseed a late Add Project base directory after repository lookup7a5fcf4
  • fix(swift-ios): follow a late Add Project base directory until the user edits pathsd3be7b9
Synced from GitHub

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — The change threads an existing server setting into the Swift Add Project flow and changes the initial browser, folder, and clone locations for configured environments while retaining the ~/ fallback. Because this changes the effective user-facing starting default, its behavior warrants deliberate review.

You can add or adjust custom eligibility rules. Learn more.

Synced from GitHub

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire—5.0 KiB—6.8 KiB✅
CodexThread snapshot wire—3.8 KiB—4.9 KiB✅
CodexLive turn WebSocket wire—1.2 KiB—2.0 KiB✅
CodexLive turn WebSocket decoded—20.9 KiB—29.3 KiB✅
CodexLive turn messages—2—8✅
ClaudeTotal thread wire—5.0 KiB—6.8 KiB✅
ClaudeThread snapshot wire—3.8 KiB—4.9 KiB✅
ClaudeLive turn WebSocket wire—1.2 KiB—2.0 KiB✅
ClaudeLive turn WebSocket decoded—21.2 KiB—29.3 KiB✅
ClaudeLive turn messages—2—8✅

Baseline: unavailable · PR result: 7a5fcf4 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.