@@ -1181,6 +1181,7 @@ describe("current session timeline rows", () => {
11811181 { name : "opted in" , grouped : true , groups : [ [ "context" , "read" , "grep" , "agent_1" , "agent_2" , "glob" , "read_2" ] ] } ,
11821182 ] ) ( "gives each subagent its own row unless subagent grouping is enabled ($name)" , ( input ) => {
11831183 const compact = timelinePresets . find ( ( preset ) => preset . id === "compact" ) ! . value
1184+
11841185 const rows = Timeline . constructSessionMessageRows (
11851186 storyDocument ( [
11861187 storyTool ( "read" , "read" , "completed" , { path : "src/a.ts" } ) ,
@@ -1638,7 +1639,10 @@ describe("current session timeline rows", () => {
16381639
16391640 const go = [
16401641 user ,
1641- { ...assistant , error : { type : "provider.go-limit" , message : "Go usage limit reached." , retryAfterMs : 120_000 } } ,
1642+ {
1643+ ...assistant ,
1644+ error : { type : "provider.go-limit" , message : "Go usage limit reached." , retryAfterMs : 25 * 86_400_000 } ,
1645+ } ,
16421646 ] satisfies SessionMessageInfo [ ]
16431647
16441648 expect ( Timeline . constructSessionMessageRows ( step , true , { type : "idle" } ) . rows . at ( - 1 ) ) . toEqual (
@@ -1671,7 +1675,7 @@ describe("current session timeline rows", () => {
16711675 userMessageID : "msg_user" ,
16721676 text : "Go usage limit reached." ,
16731677 kind : "go-limit" ,
1674- resetAt : 121_000 ,
1678+ resetAt : 1_000 + 25 * 86_400_000 ,
16751679 } ) ,
16761680 )
16771681 expect ( Timeline . constructSessionMessageRows ( quota , true , { type : "idle" } ) . rows . at ( - 1 ) ) . toEqual (
@@ -1681,8 +1685,11 @@ describe("current session timeline rows", () => {
16811685
16821686 test ( "marks a Console budget refusal with the reset its envelope names" , ( ) => {
16831687 const user = { id : "msg_user" , type : "user" , text : "prompt" , time : { created : 1 } } satisfies SessionMessageInfo
1684- const refused = ( type : string , body ?: string ) =>
1685- Timeline . constructSessionMessageRows (
1688+
1689+ const refused = ( type : string , body ?: string ) => {
1690+ const error = { type, message : "Budget reached." , status : 429 }
1691+
1692+ return Timeline . constructSessionMessageRows (
16861693 [
16871694 user ,
16881695 {
@@ -1692,13 +1699,14 @@ describe("current session timeline rows", () => {
16921699 model : { id : "claude-opus-5" , providerID : "opencode" } ,
16931700 content : [ ] ,
16941701 finish : "error" ,
1695- error : { type , message : "Budget reached." , status : 429 , ... ( body ? { response : { body } } : { } ) } ,
1702+ error : body ? { ... error , response : { body } } : error ,
16961703 time : { created : 2 , completed : 3 } ,
16971704 } ,
16981705 ] ,
16991706 true ,
17001707 { type : "idle" } ,
17011708 ) . rows . at ( - 1 )
1709+ }
17021710
17031711 // Anthropic and OpenAI clients get Console's own envelope; Google clients get the reset in ErrorInfo's metadata.
17041712 expect (
0 commit comments