refactor: move chat queued-overlay construction to shared and adopt in mobile#616
Merged
Conversation
…n mobile web/src/chatQueuedOverlays.ts moves to shared/src/chatQueuedOverlays.ts; mobile's ChatProvider drops its inline pendingMessageFromSendPayload / pendingSpawnFromPayload near-copies and calls the shared constructors. The drifted optional-field behaviors are reconciled to the union, so each platform gains the other's improvements: - optimistic spawn sessions now carry repos/githubIdentityMode/ agentProfileVersionId and the multi-repo repo/branch fallback on web (mobile already had them) - optimistic spawn messages now carry sessionTask + attachments on mobile (web already had them) - voice pending messages use web's semantics everywhere (voiceFileId = voice.fileId ?? attachments[0].id; waveform key omitted when empty) — verified equivalent against both platforms' VoiceMessage renderers and the canonical timeline.ts parseVoice wire shape Known follow-ups (out of scope, pre-existing): mobile's live send() builds a third inline pending message; mobile applyQueuedOp lacks web's session.steer thread-overlay branch. Consolidation verified in the 2026-07-19 dead-code audit; see docs/archive/notes/2026-07-19-dead-code-audit.md. Validation: lint, web+mobile typecheck, centaur-client build, shared 465 / web / mobile unit suites green on the rebased base — gating on CI e2e.
gbasin
enabled auto-merge
July 19, 2026 21:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Final consolidation from the 2026-07-19 dead-code audit (
docs/archive/notes/2026-07-19-dead-code-audit.md).web/src/chatQueuedOverlays.ts→shared/src/chatQueuedOverlays.ts(git-tracked rename); mobile'sChatProviderdrops its ~85-line inline near-copies and calls the shared constructors. Web importers now pull from@atrium/surface-client. Net −51 LOC, and the drift-prone duplicate is gone.Deliberate union reconciliation (each platform gains the other's improvements):
repos/githubIdentityMode/agentProfileVersionId+ the multi-repo repo/branch fallback (mobile already had them)sessionTask+attachments(web already had them)voiceFileId = voice.fileId ?? attachments[0].id, waveform key omitted when empty) — verified equivalent against bothVoiceMessagerenderers andtimeline.ts parseVoiceFlagged follow-ups (pre-existing, untouched): mobile's live
send()has a third inline pending-message copy; mobileapplyQueuedOplacks web'ssession.steerthread-overlay branch.Validation: lint, web+mobile typecheck, centaur-client build, shared 465 / web / mobile unit suites green on the rebased base (post-#615). Gating on CI e2e per the audit-train protocol (#610/#611/#613/#615).