perf(ios): publish refreshed chats independently of model catalogs - #283
Conversation
Hermes Review BotConfidence: 5 Engine: SummaryDecouples transcript retrieval from model catalog loading during iOS chat initialization, resolving an issue where a successful transcript fetch was blocked by or discarded due to catalog latency or failures. In Confidence Score: 5/5Fully traced and verified across iOS ViewModel lifetime rules, actor isolation, cancellation handling, Android parity ( 📁 Important Files Changed
FindingsNo findings. Sequence DiagramsequenceDiagram
autonumber
participant V as View (AidenChatDetailView)
participant VM as ViewModel (AidenChatViewModel)
participant C as RemoteClient
participant CO as Coordinator
V->>VM: load()
par Fetch Transcript
VM->>C: chat(id)
and Fetch Catalog (Child Task)
VM->>C: modelCatalog()
end
C-->>VM: remoteChat (200 OK)
VM->>VM: acceptRemoteChat()
VM-->>V: Publish updated chat transcript
alt Catalog Succeeds
C-->>VM: remoteCatalog (200 OK)
VM->>VM: resolveModelSelection()
else Catalog Transient Failure (e.g. 503)
C-->>VM: error (503)
Note over VM: Suppress catalog error; retain existing transcript & selection
else Credential Revoked (401)
C-->>VM: error (401 credential_revoked)
VM->>CO: handleCredentialRevocation()
VM->>VM: handleRemoval() (chat.messages = [])
VM-->>V: Synchronously redact messages
end
[]
|
There was a problem hiding this comment.
Important
A catalog credential_revoked response can arrive after transcript publication and leave the newly fetched transcript renderable while the installation-data purge runs.
Reviewed changes This review covers the iOS transcript/catalog refresh decoupling, its race tests, and the performance evidence.
- Independent transcript publication.
load()now publishes the fetched transcript while the structured catalog request is pending; overall load and progress bootstrap still await catalog completion. - Optional catalog outcome. Ordinary catalog failures no longer discard the transcript or existing model choices, and successful refresh resolves the live selection.
- Race coverage and evidence. Tests cover held-catalog success/failure, selection preservation, chat failure, removal/unpair, and revocation while the transcript is held. The report states that 212 chat XCTests passed and makes no physical-device latency claim.
GPT Luna | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes This review covers the revocation-redaction follow-up since the prior Pullfrog review.
- Redacted removed chat content.
handleRemoval()now clears mounted transcript messages synchronously before asynchronous installation cleanup, and the regression holds cleanup to verify redaction before the shell switches to pairing. - Strengthened catalog-failure coverage. The held-catalog scenario now confirms the fresh transcript remains after an ordinary catalog failure is released.
- Recorded follow-up evidence. The performance notes document the late-revocation ordering, simulator results, and remaining measurement limits.
GPT Luna | 𝕏

A successful iOS chat refresh previously waited for the model catalog, and a catalog failure discarded the fresh transcript result. Publish the transcript independently while retaining structured task ownership, cache admission, live model selection and credential-revocation fences. Overall load completion and progress bootstrap still await the catalog. If revocation arrives after publication, the removal path now clears mounted messages synchronously before cleanup can suspend.
Validation: the initial loader regression fails seven assertions on original source. The follow-up held-purge regression reproduces two failures before redaction; fixed production passed all 213 chat XCTests. Final focused tests passed 2/2 after one documented simulator-launch retry. Fresh-context follow-up review independently passed three targeted race/error cases without retry, with no actionable findings. Release-policy checks passed. Ordinary catalog 503 retains the transcript and selected model.
Evidence:
docs/performance/ios-chat-loading.md. No shared wire contract changes; Android already loads chat/catalog independently. No physical-device latency or energy result is claimed.