@@ -194,7 +194,6 @@ describe("useQueuedRunEdit", () => {
194194 async ( prefix ) => {
195195 const { hook } = setup ( ) ;
196196 mocks . editQueuedRun . mockResolvedValue ( { _tag : "Success" } ) ;
197- await using screen = await render ( view ( THREAD_A , "queued" , hook ) ) ;
198197 using toast = vi . spyOn ( toastManager , "add" ) ;
199198 const attachments = [
200199 {
@@ -211,6 +210,10 @@ describe("useQueuedRunEdit", () => {
211210 text : prefix + ATTACHMENT_ONLY_BOOTSTRAP_PROMPT ,
212211 attachments,
213212 } ;
213+ const context = { version : 1 , records : [ ] , composerRecall : " \n " } as const ;
214+ await using screen = await render (
215+ view ( THREAD_A , "queued" , hook , [ { id : request . messageId , text : request . text , context } ] ) ,
216+ ) ;
214217 await act ( ( ) => requireHook ( hook ) . beginEdit ( request ) ) ;
215218 expect (
216219 useComposerDraftStore . getState ( ) . getComposerDraft ( requireHook ( hook ) . draftTarget ) ?. prompt ??
@@ -237,7 +240,7 @@ describe("useQueuedRunEdit", () => {
237240 expect . objectContaining ( {
238241 input : expect . objectContaining ( {
239242 text : prefix + ATTACHMENT_ONLY_BOOTSTRAP_PROMPT ,
240- edit : expect . objectContaining ( { attachments } ) ,
243+ edit : expect . objectContaining ( { attachments, context } ) ,
241244 } ) ,
242245 } ) ,
243246 ) ;
@@ -247,12 +250,17 @@ describe("useQueuedRunEdit", () => {
247250 it ( "saves an effort-only prompt without claiming removed attachments remain" , async ( ) => {
248251 const { hook } = setup ( ) ;
249252 mocks . editQueuedRun . mockResolvedValue ( { _tag : "Success" } ) ;
250- await using screen = await render ( view ( THREAD_A , "queued" , hook ) ) ;
253+ const messageId = MessageId . make ( "message-1" ) ;
254+ const text = `Ultrathink:\n${ ATTACHMENT_ONLY_BOOTSTRAP_PROMPT } ` ;
255+ const context = { version : 1 , records : [ ] , composerRecall : "" } as const ;
256+ await using screen = await render (
257+ view ( THREAD_A , "queued" , hook , [ { id : messageId , text, context } ] ) ,
258+ ) ;
251259 await act ( ( ) =>
252260 requireHook ( hook ) . beginEdit ( {
253261 runId : RUN ,
254- messageId : MessageId . make ( "message-1" ) ,
255- text : `Ultrathink:\n ${ ATTACHMENT_ONLY_BOOTSTRAP_PROMPT } ` ,
262+ messageId,
263+ text,
256264 attachments : [
257265 {
258266 type : "image" ,
@@ -271,7 +279,7 @@ describe("useQueuedRunEdit", () => {
271279 expect . objectContaining ( {
272280 input : expect . objectContaining ( {
273281 text : "Ultrathink:" ,
274- edit : expect . objectContaining ( { attachments : [ ] } ) ,
282+ edit : expect . objectContaining ( { attachments : [ ] , context } ) ,
275283 } ) ,
276284 } ) ,
277285 ) ;
0 commit comments