Apple/Web Streaming Parity
Apple/Web Streaming Parity Status: Linux static audit Created: 2026-06-01 Scope: AI task events, typing state, chunks, thinking, post-processing, queued mess...
[T:documentation.sender_name]
Apple/Web Streaming Parity
Status: Linux static audit
Created: 2026-06-01
Scope: AI task events, typing state, chunks, thinking, post-processing, queued messages
Goal
Apple streaming must match web-visible AI response behavior: task initiation, typing indicator, incremental content chunks, thinking sections, final message readiness, post-processing metadata, suggestions, and queued-message handling.
Web Source
frontend/packages/ui/src/services/websocketService.tsfrontend/packages/ui/src/services/chatSyncServiceHandlersAI.tsfrontend/packages/ui/src/services/chatSyncService.tsfrontend/packages/ui/src/components/ChatMessage.sveltefrontend/packages/ui/src/components/ThinkingSection.svelte- Web specs that assert
message-assistant,typing-indicator, and streaming completion across skill flows
Apple Source
apple/OpenMates/Sources/Core/Networking/WebSocketManager.swiftapple/OpenMates/Sources/Core/Networking/StreamingClient.swiftapple/OpenMates/Sources/Features/Chat/ViewModels/ChatViewModel.swiftapple/OpenMates/Sources/Features/Chat/Views/ChatView.swiftapple/OpenMates/Sources/Features/Chat/Views/ThinkingSectionView.swiftapple/OpenMates/Sources/Features/Chat/Views/ProcessingDetailsView.swift
Confirmed Apple Behavior From Source
WebSocketManagerroutesai_task_initiatedtoStreamingClient.StreamEvent.taskInitiated.ai_typing_startedis routed with chat metadata, including title, icons, category, model/provider/region, user message ID, and encrypted chat key.ai_message_updateis routed as chunk events with sequence, full content so far, final flag, user message ID, category, model name, and rejection reason.thinking_chunkandthinking_completehave dedicated stream events.ai_message_readyhas a dedicated stream event.preprocessing_stepandpost_processing_completedroute to stream events.StreamingClientbuffers up to 80 events per chat when no active stream exists, which is useful for race conditions where events arrive before a view subscribes.- WebSocket routes
message_queuedthrough.wsMessageReceivedbut not intoStreamingClientdirectly.
Web Parity Risks
- Web has explicit queued
ai_typing_startedhandling for a missing chat shell (OPE-360). Apple buffering is per chat ID and likely helps, but parity depends onChatViewModelsubscribing at the correct time and creating the shell fromnew_chat_messageor metadata. - Web handles background chat completion notifications and unread increments in AI handlers. Apple streaming source alone does not prove equivalent background notification behavior.
- Web
ai_message_updatecomments show extensive debug handling around streaming. Apple route is simpler; verify final chunk ordering, duplicate chunks, and missed final events. message_queuedshould surface in the composer/input area on web, not as a generic notification. Apple needs equivalent UI behavior if supported.post_processing_completedcarries follow-up suggestions, new chat suggestions, summary, tags, and updated title. Apple must confirm these are applied to UI and persisted.
Testability IDs Needed
typing-indicatormessage-assistantthinking-sectionprocessing-detailsfollow-up-suggestionsnew-chat-suggestionsmessage-queued-banneror native equivalent
Mac Verification Checklist
- Send a prompt and verify typing indicator appears before first chunk.
- Verify chunks update the same assistant bubble rather than duplicating messages.
- Verify thinking chunks appear and collapse/complete like web.
- Verify final response persists and no streaming indicator remains stuck.
- Trigger post-processing and verify follow-up suggestions, summary/title updates, and new-chat suggestions.
- Trigger an active-task queued message and verify it appears in the composer/input surface, not as an unrelated notification.
- Start streaming on web and open Apple mid-stream to verify buffered event handling.
First Implementation Tasks
- Audit
ChatViewModelevent handling against everyStreamingClient.StreamEventcase. - Add stable identifiers for typing, thinking, processing, and suggestions UI.
- Add a streaming race test plan for chat shell creation before/after
ai_typing_started.