refactor(mobile): queued-overlay parity with web — shared applyQueuedOp, live steer overlay#629
Merged
Merged
Conversation
…Op, live steer overlay Closes the two gaps flagged in #616: - live send() derives its optimistic message from the shared pendingMessageFromSendPayload instead of a third inline copy (only drift: waveform key now omitted when empty — renderer-identical per the #616 verification) - applyQueuedOp delegates wholesale to the shared queuedOverlayAction (mobile already used the shared appReducer and dispatched the same action shapes), which adds the previously-missing session.steer thread-overlay branch. Crucially, mobile never enqueued thread provenance, so the branch would have been dead: steerSession now carries the full QueuedThreadSteerPayload shape (channelId, threadRootEventId, clientMsgId=opId, createdAt) and dispatches the optimistic thread row in onStored, mirroring web's useSessionActions; the thread composer passes the provenance. MessageRow already renders steeredSessionId. New mobile/test/chatOverlays.test.ts (6 tests): voice/plain send construction, steer overlay recovery + provenance-less rejection guard, reducer land/reconcile by clientMsgId, and delegation coverage for edit/delete/reaction/mute/read overlays. Validation: pnpm check green (mobile 233), e2e 120/120.
gbasin
enabled auto-merge
July 21, 2026 15:27
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.
Closes the two mobile gaps flagged in #616.
Gap 1 — live
send(): now derives its optimistic message from the sharedpendingMessageFromSendPayloadinstead of a third inline copy. Only drift found: the waveform key is now omitted when empty — verified renderer-identical in #616.Gap 2 — queued steer overlay:
applyQueuedOpdelegates wholesale to the sharedqueuedOverlayAction(~75-line if-chain → small wrapper; mobile already uses the sharedappReducerand dispatched identical action shapes), picking up web'ssession.steerthread-overlay branch. The audit's deeper finding: mobile never enqueued thread provenance, so that branch alone would have been dead code —steerSessionnow builds the fullQueuedThreadSteerPayload(channelId/threadRootEventId/clientMsgId=opId/createdAt) and dispatches the optimistic thread row inonStored, exactly mirroring web'suseSessionActions(verified side-by-side; the op executor already tolerates the fields, andsession.steer.onRejectedalready routessend-failedbychannelId+clientMsgId). Mobile'sMessageRowalready renderssteeredSessionId(the → agent chip).New
mobile/test/chatOverlays.test.ts(6 tests): voice/plain send construction, steer-overlay recovery, provenance-less rejection guard, reducer land/reconcile byclientMsgId, and first-ever delegation coverage for the edit/delete/reaction/mute/read overlay ops.Validation:
pnpm checkfully green (mobile 233 tests), full local e2e 120/120 exit 0.