Repository navigation
fix(ios): delegated task threads open with literal percent IDs - #23547
juliusmarminge wants to merge 3 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
threadPath already percent-escapes the thread ID, but makeRequest assigned the result to URLComponents.path, which escaped every % again. Delegated child IDs such as command%3Amcp%3A... then 404ed. Environment request paths are now percent-encoded by contract and set via percentEncodedPath. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped iOS URL-encoding fix that preserves percent-encoded delegated-task thread IDs and adds a focused regression test. Existing static API routes and query behavior remain unchanged. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 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.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
… into fix/issue-17643
|
The automated pipeline stopped on this pull request and will not merge it: these checks fail on 58eb305, also when run again: Release Smoke, Contract fixtures and native tests, and the rework changed nothing: No change pushed. The item's premise does not hold for this PR: #23547 targets t3code/rebuild-mobile-app-swift, not main, and that branch is 3,670 commits behind origin/main, so merging main would put the whole divergence into a 23-line fix's diff. Both failing checks come from the base branch, not the fix (which touches only apps/swift-ios/Core/HTTP.swift and DualOrchestrationClientTests.swift). Contract fixtures and native tests: the iOS build fails in apps/swift-ios/Features/Chat/FeatureThreadToolsToolbar.swift (no member 'visibilityPriority', 'toolbarMinimizationBehavior' on the runner's Xcode). That file is identical to base tip f021c92, the job lives in swift-ios.yml which exists only on the Swift branch, and main has no apps/swift-ios, so main cannot have fixed it. Release Smoke: It stays open for a person to finish or close. |
Problem
In the SwiftUI app, tapping a completed delegated task in the Agents sheet fails with
thread_not_found. Delegated thread IDs contain literal percent escapes; the Swift client escapes the path a second time, so the host looks up a different ID.Change
Build environment request URLs with an explicitly percent-encoded path helper. Keep the plain-path helper for discovery, pairing, and route probes. Add a regression assertion on the outgoing bounded snapshot URL for a delegated thread ID containing
%3A.Scope and approval
Fixes https://git.cafe/pingdotgg/t3code/issues/17643
Triaged bug via the automated issue flow. Targets
t3code/rebuild-mobile-app-swift, which owns the native SwiftUI client.Verification
8d3b061121, isolated synthetic thread projection: the single-encoded bounded request returned HTTP 200 with the original thread ID; the double-encoded request returned HTTP 404thread_not_found. Runtime transcript.V2OrchestrationClientTests.testThreadReadEncodesLiteralPercentInThreadIDOncein the existing transport test file. Swift tests were not executed: Linux has no Swift compiler or Xcode. No claim of an observed red or green XCTest result.git diff --checkpassed. Two independent reviews (gpt-6.1-sol and claude-opus-5-5) returned MERGE with no confirmed code findings.4619c0bca6)f8dadbc5f6)cannot-verify ios-swift: native build, focused XCTest execution, and opening the delegated child on an Apple runtime remain for Mac verification.Models: gpt-6.1-sol and claude-opus-5-5. Harnesses: Codex and Claude Agent via T3 Code.
Fixes #17643