@@ -175,7 +175,7 @@ import { newCommandId, newDraftId, newMessageId, newThreadId } from "~/lib/utils
175175import { useBrowserHistoryStore } from "~/browserHistoryStore" ;
176176import { resolveComposerSendLabel } from "~/outbox/composerSendLabel.logic" ;
177177import { enqueueThreadOutboxMessage , useThreadOutboxQueue } from "~/outbox/threadOutbox" ;
178- import { canSteerActiveThread } from "~/outbox/composerSteering.logic" ;
178+ import { canSteerActiveThread , steerProviderBinding } from "~/outbox/composerSteering.logic" ;
179179import { logComposerDispatch } from "~/outbox/outboxDiagnostics" ;
180180import { ThreadOutboxQueueList } from "./chat/ThreadOutboxQueueList" ;
181181import { getProviderModelCapabilities , resolveSelectableProvider } from "../providerModels" ;
@@ -2250,11 +2250,16 @@ function ChatViewContent(props: ChatViewProps) {
22502250 const composerActiveThreadBusy = phase === "running" || isSendBusy || isRevertingCheckpoint ;
22512251 // A running turn is not on its own a reason to queue: steer-capable drivers
22522252 // fold a mid-turn send into the work in progress.
2253+ //
2254+ // Keyed on the thread's routing binding, not `selectedProvider` — the picker
2255+ // falls back to the first enabled provider, so it can classify a Codex thread
2256+ // as steerable (radroid/t3code#40 A4). See `steerProviderBinding`.
2257+ const composerSteerProvider = steerProviderBinding ( activeThread ) ;
22532258 const composerCanSteerActiveThread = canSteerActiveThread ( {
22542259 phase,
22552260 isSendBusy,
22562261 isRevertingCheckpoint,
2257- provider : selectedProvider ,
2262+ provider : composerSteerProvider ,
22582263 } ) ;
22592264 const composerSendLabel = resolveComposerSendLabel ( {
22602265 connectionState : activeEnvironmentConnectionPhase ,
@@ -4812,6 +4817,34 @@ function ChatViewContent(props: ChatViewProps) {
48124817 ] ,
48134818 ) ;
48144819
4820+ // One breadcrumb per submit that actually dispatches: whether it queued, sent,
4821+ // or steered into a running turn, plus every input to that decision. A refused
4822+ // steer is invisible on the client, so this is the only client-side evidence —
4823+ // which is why it is fired at each path's real dispatch point rather than at
4824+ // the top of `onSend`, where it also logged submits the guards had already
4825+ // rejected (Enter on an empty composer logged `steer`; radroid/t3code#40 A3).
4826+ const logComposerDispatchNow = useCallback ( ( ) => {
4827+ logComposerDispatch ( {
4828+ queued : composerQueueMode ,
4829+ steerable : composerCanSteerActiveThread ,
4830+ phase,
4831+ queueCount : outboxQueue . length ,
4832+ connection : activeEnvironmentConnectionPhase ,
4833+ provider : selectedProvider ,
4834+ steerProvider : composerSteerProvider ,
4835+ threadId : activeThread ?. id ?? null ,
4836+ } ) ;
4837+ } , [
4838+ activeEnvironmentConnectionPhase ,
4839+ activeThread ?. id ,
4840+ composerCanSteerActiveThread ,
4841+ composerQueueMode ,
4842+ composerSteerProvider ,
4843+ outboxQueue . length ,
4844+ phase ,
4845+ selectedProvider ,
4846+ ] ) ;
4847+
48154848 // Enqueue the current composer content into the thread outbox. Text-only:
48164849 // terminal/element/preview/review contexts are folded into the prompt like a
48174850 // normal send, but image attachments cannot survive a reload through
@@ -4884,6 +4917,7 @@ function ChatViewContent(props: ChatViewProps) {
48844917 text : messageTextForSend ,
48854918 } ) ;
48864919
4920+ logComposerDispatchNow ( ) ;
48874921 try {
48884922 await enqueueThreadOutboxMessage ( {
48894923 environmentId : activeThread . environmentId ,
@@ -4928,6 +4962,7 @@ function ChatViewContent(props: ChatViewProps) {
49284962 composerDraftTarget ,
49294963 composerRef ,
49304964 interactionMode ,
4965+ logComposerDispatchNow ,
49314966 promptRef ,
49324967 runtimeMode ,
49334968 setThreadError ,
@@ -4951,18 +4986,6 @@ function ChatViewContent(props: ChatViewProps) {
49514986 } ) ,
49524987 ) ;
49534988 } ;
4954- // One breadcrumb per submit: whether it queued, sent, or steered into a
4955- // running turn, plus every input to that decision. A refused steer is
4956- // invisible on the client, so this is the only client-side evidence.
4957- logComposerDispatch ( {
4958- queued : composerQueueMode ,
4959- steerable : composerCanSteerActiveThread ,
4960- phase,
4961- queueCount : outboxQueue . length ,
4962- connection : activeEnvironmentConnectionPhase ,
4963- provider : selectedProvider ,
4964- threadId : activeThread ?. id ?? null ,
4965- } ) ;
49664989 // Queue mode routes the submit through the thread outbox instead of the
49674990 // immediate-send path (which is gated on an idle, connected thread).
49684991 //
@@ -5135,6 +5158,7 @@ function ChatViewContent(props: ChatViewProps) {
51355158 return ;
51365159 }
51375160
5161+ logComposerDispatchNow ( ) ;
51385162 sendInFlightRef . current = true ;
51395163 if ( isDraftHeroState && activeThreadKey ) {
51405164 let resolveDockStarted : ( ( ) => void ) | undefined ;
0 commit comments