Repository navigation
perf(swift-ios): stop redoing work on every keystroke and stream event - #17343
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…itself Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…atch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ce per detail flush Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ences Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…changed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The model-level pull request cache had no reader, but each update still forced a full Home re-sort, and the thread detail polled the server every 30 seconds only to fill it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nder Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HomeCollectionCell hides the row from accessibility and exposes its own label and value, so the row built a string on every render for nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop needsAttention, homeProviderLabel, reasoningSummary, the model isEffectivelySettled wrapper, and DailyUXSidebarIndex search, which every production caller ran with an empty query. Search tests now use HomePresentation. Rename ProjectAndArchiveViews.swift to AddProjectView.swift to match its only type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…date The sheet rebuilt and reconfigured every row on each snapshot change. It now applies only when the order, shared cell inputs, or a row thread changed, reconfigures only changed rows, and looks rows up by id. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nk at the cap Trim terminal history to 3/4 of the limit so later output arrives as an append, and take the snapshot out of the cache before appending so the buffer is not copied on every output event. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…view Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eystroke Move the review comment field into its own view so only it reads the draft text. Typing no longer re-runs the diff body over every line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop FeatureSourceControlOperation, homeProviderLabel, reasoningSummary, submissionText, markdownLink, the mailbox peek, the QR-only pairing path, and saveAppearance. Point the recovery tests at the live FeatureGitOperation and keep the pairing and appearance tests on the live paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…comments Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This is a broad Swift iOS production refactor spanning streaming state, protocol decoding, caches, workspace behavior, thread rendering, and public client APIs. It also changes the New Task project-selection default and pairing-related behavior, so the runtime and user-facing effects require human review. 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. |
|
Note 🤖 Claude Opus 5.5 responding on behalf of Theo I checked both behavior claims against the diff.
Agreed that the scope needs human review. Theo will review it before any merge. |
The SwiftUI app did a lot of repeated work on hot paths. Each keystroke in a thread re-ran the whole thread view. Each stream event re-parsed tool output, re-folded the full transcript, and decoded JSON twice. Home re-sorted every thread for a pull request cache that nothing read. The app also carried a lot of dead code.
This PR removes that work without changing what users see. Net change is about 380 lines removed (+806 / -1189).
Thread view
AsyncImage, so reused cells do not fetch and decode them again.Home and workspace
lastVisitedAtparsing no longer repeat on every render or keystroke.Core and state
JSONValuedecoding no longer runs a re-encode round trip or throws through a chain ofDecodingErrors for each node.OrchestrationV2Commandsbuilders.Other features
Cleanup: removed unused T3Client RPCs, the dead image preview in Files, production helpers that only tests used, and duplicate provider label and suffix-merge code.
One narrow difference: after a clone reset clears the New Task project and opens the picker, a later snapshot update no longer picks a project behind the picker. This matches the existing rule that an explicit selection never jumps (
NewThreadViewcreationProjectIDshandler). All other New Task selection paths behave the same.Skipped on purpose: file-backed draft images (the risk is larger than the gain) and lazy diff lines in the PR Files tab (it changes scrolling behavior).
How I checked it
xcodebuild testsuite passes after the rebase onto the current SwiftUI branch: 1267 Swift Testing and 510 XCTest. New focused tests cover the work item format after the flag change, JSONValue token decoding, preview text, and terminal buffer trimming. Removed tests that only covered deleted dead code.mainwith copied real data. I checked pairing, the Home list and badges, opening and scrolling a long V2 thread with tables, typing, a draft that survives navigation and an app relaunch, and the New Task sheet with its project picker.Reviewed with sol-loop: 2 rounds with GPT-6.1 Sol on high.
Created with Claude Opus 5.5 in Claude Code. A parallel audit and implementation workflow used Claude Opus 5.5 subagents.
🤖 Generated with Claude Code