fix(swift-ios): apply audit findings across transport, home, chat, and settings - #10843
fix(swift-ios): apply audit findings across transport, home, chat, and settings#10843t3dotgg wants to merge 1 commit into
Conversation
…d settings Five sub-agents audited the SwiftUI client. This commit applies the findings that were safe to change without a design discussion. Transport - Subscription streams no longer drop values under load. The server flow-controls with Acks, so the buffer is unbounded. - Reconnect backoff caps at 30s. A network path monitor wakes the backoff early when the network returns. - A rejected credential (401) is a needsPairing state, not a transient failure. Polling stops and every surface offers "Pair again". Home - Row content changes bump threadRowRevision. Only order key changes rebuild the shelves, so streamed tokens no longer re-sort the list. - Thread status, activity filters, and pinned order match the web client rules. - Archive and snooze gate on live capabilities and state. - Capabilities read from the live server config, not the descriptor cached at pairing. Chat - Transcript links open. The openURL handler is injected per cell because UIHostingConfiguration does not inherit the environment. - Approvals and questions ignore a second tap while one is in flight. - Approval detail scrolls in a bounded height so buttons stay visible. - Keyboard dismisses interactively. Scroll to bottom does not fight a user drag. Draft saving is not blocked while a message sends. - Queued and failed user messages show a footer state. - Voice input cancel during preparation cancels the task. Terminal, usage, PRs, devices - Terminal output applies append or replace deltas with a 4KB anchor. Background is true black. - Usage and PR tabs stay mounted. PR search debounces with a small cache. Diff parsing runs off the main actor with cancellation. - Only merge and close confirm. Flat sections replace rounded cards. FeatureClient - One requirement per operation. The lossy default chain that dropped worktree and identity arguments is gone, along with the forwarding overloads in NativeFeatureClient. - Outbox queueing is type based instead of error string matching. - Settings are cached after the first load. Removed dead code: pollShell, unused theme tokens, needsInput and failed sidebar buckets, outbox removal retry, and two tests that only asserted callback wiring. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Macroscope skipped reviewing this pull request. Per-review cost limit exceeded (workspace setting). This review would cost an estimated $9.66, which exceeds your per-review limit of $8.00. The top 3 files driving up this estimate:
Tip To get this pull request reviewed, you can:
|
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR changes core transport defaults and reconnection semantics while also altering credential handling, durable message delivery, thread state, terminal rendering, usage subscriptions, and several user-facing workflows. Its cross-cutting production impact and authentication-related behavior warrant human review. Not approved because:
Review your spending limits in Billing settings, or comment |
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. |
Audit of the SwiftUI iOS client on top of #5178. Five sub-agents reviewed transport, home list, chat, terminal, usage, PRs, and settings. This PR applies the findings that were safe to change without a design discussion. It is one PR so you can pull it down and test it as one unit.
Bugs fixed
needsPairingconnection state. It stops polling, shows "Pair again" in Home, thread view, Settings, and the connection hub, and opens onboarding prefilled with the endpoint.UIHostingConfigurationdoes not inherit the SwiftUI environment, soopenURLoverrides never reached transcript cells. The open handler is now injected per cell.resolveSidebarThreadStatusin the web sidebar. Working timers use the same source.session-logic.ts.pinOrderKeyand sort with the same rule assortPinnedThreadsByOrderKey.FeatureClientprotocol had a chain of default overloads that dropped arguments. Each operation now has one requirement, so a call cannot lose the worktree or identity fields on the way to the server.Performance
threadRowRevision. Only changes to the order key (pin, state, dates, archive) bumphomePresentationRevisionand rebuild the shelves.TimelineViewruns at one minute and only for countdowns.UX
Removed
Dead code the audit found:
pollShell, unused theme tokens, theneedsInputandfailedsidebar buckets, the lossyFeatureClientdefault chain, forwarding overloads inNativeFeatureClient, the outbox removal-retry machinery, and two test files that only asserted callback wiring.Tests
New:
TerminalBufferTests,UsagePresentationTests, and a large-chunk delivery test for the WebSocket RPC. Updated tests for the changed protocol signatures, thread status rules, and swipe gating. Full suite run on iPhone 17 Pro simulator.Not changed
Findings that need a design call or a separate PR: splitting
NativeFeatureClient(7800 lines), a settings write queue, DPoP keys in the Secure Enclave, deep-link pairing confirmation while the workspace is visible, local plus remote notification double-fire, relay registration re-POST every 60s, drafts JSON rewrite with inline image bytes, Swift 6 language mode, iPad NavigationStack back gesture, state restoration, and the Ghostty binary path relative to apps/mobile.Changes made by Claude Fable 5.1 through Claude Code.