Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server,web,mobile): steers sent before a turn starts join it once it does #25749

Closedflamboh(GitHub profile, opens in a new tab)wants to merge 6 commits intomain fromrefs/pull/25749/headopened View on GitHub

Showing 16 changed files with 43 additions and 40 deletions (loading 13).

x
0 of 16 viewed, 16 left
12 additions and 12 deletionsapps/mobile/src/state/use-thread-composer-state.tsModified
View file
@@ -379,8 +379,15 @@
item.status === "cancelled"),
})();
+ // The server holds a steer sent before the provider turn runs until one does.
+ const turnPending =
+ queueWorkflow?.awaitsProviderTurn === true ||
+ [selectedThreadActivityRun?.status, selectedThreadRuntime?.status].some(
+ (status) => status === "preparing" || status === "starting",
+ );
// A compacting turn cannot take steering input, so follow-ups queue meanwhile.
- const canSteerActiveTurn = queueWorkflow?.canPromoteToSteer === true && !isCompacting;
+ const canSteerActiveTurn =
+ (queueWorkflow?.canPromoteToSteer === true || turnPending) && !isCompacting;
// A stop or a restart holds the queue, completion wakes included, until it
// is resumed; the queue sheet lists only the user's own messages.
const queueHeld = queueWorkflow?.isHeld === true;
@@ -715,20 +722,13 @@
// An approval redirect must steer the waiting turn instead of queueing behind it.
const activeTurnDefault = beforeDispatch !== undefined ? "steer" : followUpBehavior;
const followUpAction = resolveComposerDispatchMode({
- running: activeThreadBusy && canSteerActiveTurn,
+ running: turnPending || (activeThreadBusy && canSteerActiveTurn),
alternateModifier: followUpOverride !== undefined && followUpOverride !== activeTurnDefault,
activeTurnDefault,
+ canSteer: !isCompacting,
});
- const setupRunning = [selectedThreadActivityRun?.status, selectedThreadRuntime?.status].some(
- (status) => status === "preparing" || status === "starting",