Skip to content

fix(swift-ios): compare Windows checkout paths consistently - #10733

Closed
saphid wants to merge 309 commits into
pingdotgg:t3code/rebuild-mobile-app-swiftfrom
saphid:pr/swiftui-windows-checkout-20260908
Closed

saphid wants to merge 309 commits into
pingdotgg:t3code/rebuild-mobile-app-swiftfrom
saphid:pr/swiftui-windows-checkout-20260908

Conversation

@saphid

@saphid saphid commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

New Task treated equivalent remote Windows checkout paths as different paths, so drive-letter casing, slash direction or UNC spelling could send a redundant worktree path. The comparison now recognizes Windows paths from a drive or backslash UNC root, while preserving POSIX case sensitivity and the server spelling of distinct checkouts. Existing project deduplication behavior is unchanged.

The contribution is three files on the Swift foundation #5178, originally based on 157476f1. It changes path selection rather than layout.

The Swift target was rewritten to 285d2ab8. GitHub now reports conflicts. The native results below cover the earlier 157476f1 base; integration and native verification against the rewritten target remain pending.

Historical verification: native CI passed all 23 RemoteCheckoutPathTests cases: eight equivalent roots, two project comparisons and thirteen distinct paths. The tested merge tree is identical to head a041532e. This is existing CI execution, not a new local native run. A live Windows-server task was not exercised. Fresh independent read-only review of this exact head and base found no actionable issues.

Original implementation: GPT-6 / Codex. Readiness audit: GPT-6 Astra / Codex; independent review: GPT-6.1 Sol (high) / Codex through T3 Code.

t3dotgg and others added 30 commits August 18, 2026 14:32
- Cache EnvironmentStore's decoded document; publishes read it several
  times per second and previously hit disk + JSON decode every time
- Memoize parsed ISO8601 dates in NativeFeatureClient; every publish
  re-parsed ~10 timestamps per thread through two formatters
- Cache the mapped provider catalog per environment, invalidated on
  server config writes, instead of rebuilding hundreds of structs per
  publish
- Sort activity logs by raw ISO string instead of parsing dates inside
  the comparator (O(n log n) formatter calls per detail rebuild)
- Skip attachment hydration entirely for text-only threads
- Dedupe emitConnection so per-event yields only publish transitions
- Early-out acknowledgeDeliveredMessages when the outbox is empty
- Cap terminal buffers at 256KB; unbounded append could OOM on verbose
  commands and re-layout megabyte strings per chunk
- Key the markdown document cache by content fingerprint instead of the
  whole source string, stop inserting streaming intermediates (which
  churned completed messages out), and promote the final streamed render
  on completion instead of reparsing on the main thread
- Throttle streaming markdown renders (150ms leading-edge) instead of a
  200ms trailing debounce that never fired at an 80ms publish cadence,
  which left streaming messages as plain text for whole turns
- Share JSONEncoder/Decoder.t3 instances (were rebuilt per call) and
  skip sortedKeys on throwaway JSONValue bridging encodes
- Weak-capture the RPC connection loop and keepalive so released
  clients can actually deinit; snapshot dictionary keys before
  reentrant iteration in connected(); scope subscription Interrupts to
  the connection that assigned the request ID; add reconnect jitter
- Cache DPoP JWK + thumbprint (SHA-256 per managed request before) and
  the proof encoder; reuse ISO8601 formatter in command builders
- Replace crash-prone Dictionary(uniqueKeysWithValues:) on
  server-supplied IDs with first-wins reduces (model picker, agent
  awareness); retain per-thread states instead of full FeatureThread
  copies for transition signals; idle the home list timer to 60s when
  nothing is working

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Move table column-width estimation into the background render pass
  and store it on MarkdownRenderedTable; the view measured every cell's
  AttributedString per body evaluation on the main thread
- Make rendered markdown blocks Equatable (inline runs compare by
  reference thanks to the streaming run cache) and wrap block views in
  .equatable(), so only the changed tail of a streaming message
  re-renders instead of every block
- Gate the thread header's per-second TimelineView on working status;
  idle threads render a static status
- Decode local attachment previews off-main through the shared
  thumbnail cache; UIImage(data:) ran in body per reconfigure
- Memoize composer trigger parsing (was parsed 4x per keystroke)
- Drop markdown caches on memory warnings
- Stop the QR capture session on viewDidDisappear/backgrounding and
  resume on reappear; dismantle was the only stop path
- Retry pending workspace navigation requests when snapshot data lands
  so cold-start deep links are not silently dropped
- Scope approval/user-input resolution to details that contain the
  request instead of deep-comparing every cached transcript
- Binary-search diff hydration anchors (was O(n^2) on large files)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Move streaming markdown rendering out of .task(id:) into a renderer
  that survives revision changes; the per-revision task cancelled any
  in-flight parse, so messages that parse slower than the publish
  cadence never rendered. One render runs at a time, latest revision
  wins, 150ms throttle. Keep showing the previous streamed document
  between renders instead of flashing back to plain text.
- Cap the terminal buffer in UTF-8 bytes (the unit the limit is defined
  in) instead of Character count, snapping to a character boundary.
- Start the home list timer after items are populated so an initially
  working thread gets the 1Hz interval; re-evaluate on every update.
- Sort activities by memoized parsed dates (stable, wire-order ties);
  raw ISO strings sort wrong across mixed fractional representations.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A cancelled drain unwinding after a replacement started could clear the
replacement's task slot, allowing two concurrent drains to deliver out
of order. Generation-stamp each drain; only the current generation may
clear the shared slot, loop, or deliver.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@quasa0

quasa0 commented Sep 16, 2026

Copy link
Copy Markdown

@saphid could you ping Theo on #11133 and ask him to take a look? It fixes the SwiftUI project picker merging separate checkouts of the same repository. Thanks!

@saphid
saphid force-pushed the pr/swiftui-windows-checkout-20260908 branch from fc3725b to a041532 Compare September 26, 2026 13:33
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 1, 2026 — with ChatGPT Codex Connector
@t3dotgg
t3dotgg force-pushed the t3code/rebuild-mobile-app-swift branch 2 times, most recently from 1637f70 to cf79028 Compare October 1, 2026 21:36
t3dotgg pushed a commit that referenced this pull request Oct 2, 2026
Port the focused fix from #10733 onto the current SwiftUI branch.

Source-Commit: 71a33a7
Source-Commit: ee05fd6
Source-Commit: a041532

Ported by GPT-6.1-Sol through the Codex harness in T3 Code.
@t3dotgg

t3dotgg commented Oct 2, 2026

Copy link
Copy Markdown
Member

Note

🤖 GPT-6.1-Sol responding on behalf of Theo

Applied the focused fix to t3code/rebuild-mobile-app-swift in 5ecd432969. Closing this source PR after the port.

The source branch includes old rewrite history that conflicts with the current target. Only the intended fix and its focused tests were carried over.

The combined focused native checks passed: 241 tests, one existing skip, no failures.

@t3dotgg t3dotgg closed this Oct 2, 2026
t3dotgg pushed a commit that referenced this pull request Oct 7, 2026
Port the focused fix from #10733 onto the current SwiftUI branch.

Source-Commit: 71a33a7
Source-Commit: ee05fd6
Source-Commit: a041532

Ported by GPT-6.1-Sol through the Codex harness in T3 Code.
t3dotgg pushed a commit that referenced this pull request Oct 8, 2026
Port the focused fix from #10733 onto the current SwiftUI branch.

Source-Commit: 71a33a7
Source-Commit: ee05fd6
Source-Commit: a041532

Ported by GPT-6.1-Sol through the Codex harness in T3 Code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants