feat(mobile): reorder and edit queued messages in place (port #3242)#3466
Merged
trunk-io[bot] merged 2 commits intoJul 15, 2026
Merged
Conversation
Ports the desktop queued-messages improvements to the mobile app. - Reorder queued messages with per-card move up/down controls. - Edit a queued message in place: pull it into the composer while it stays in the queue, then save it back into position (or cancel unchanged). - Drain boundary: while a message is being edited, only the messages queued before it auto-send when the turn ends; the edited message and everything after it stay queued until the edit is saved or cancelled. Generated-By: PostHog Code Task-Id: 8d0379e9-fb51-4ce7-9eb9-8f5b7a508bf0
|
😎 Merged directly without going through the merge queue, as the queue was empty and the PR was up to date with the target branch - details. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
danielcarletti
approved these changes
Jul 15, 2026
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.
Problem
The mobile app lets you queue follow-up messages while the agent is mid-turn,
but you could only steer or discard them — there was no way to reorder the
queue or fix a message you'd already queued. This ports the desktop
capabilities (#3242) to mobile.
Changes
shown is the order they send.
the queue, then save it back into its original position (or cancel, leaving
it unchanged). The composer shows an "Editing queued message" banner with a
cancel action.
boundary — when the turn ends, only the messages queued before it
auto-send; the edited message and everything after it stay queued until the
edit is saved or cancelled.
Queue/edit logic lives in
messageQueueStore(reorder, in-place update, andthe edit-hold that gates draining) and
taskSessionStore(
flushQueuedMessagesIfIdle); the screen and dock are thin wiring. Thesendable-prefix boundary mirrors
sendableQueuePrefixLengthfrom@posthog/shared, reimplemented locally because mobile's queue rows don'tmatch the shared
AgentSessionmessage shape.How did you test this?
messageQueueStore.test.ts(reorder, edit-in-place update, edithold set/clear + clear-on-remove, and the
stopAtEditeddrain boundary).flushQueuedMessagesIfIdlecases totaskSessionStore.test.ts(idle flush, edit-boundary flush, and no-op while running/terminal/compacting
or empty). All 55 mobile store tests pass via
vitest run.biome checkandtscon the changed files — clean.Automatic notifications
Created with PostHog Code