File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -304,6 +304,12 @@ these transitions. Assertions inspect fresh complete frames because incremental
304304ANSI updates can split words. This covers resize recovery; broader picker
305305navigation, visual review and sustained terminal stress remain open.
306306
307+ The approval phase now waits for the terminal's rendered ** DENY** dialog and
308+ then its rendered ** ALLOW** state before sending Enter. This replaced a fixed
309+ delay that could race the terminal's asynchronous approval refresh on a clean
310+ CI runner. The repaired PTY probe passes all eight fixture-model requests and
311+ the workspace Clippy check remains clean.
312+
307313## Reviewed copy of uncommitted work
308314
309315Twelve real-Git worktree tests pass. Copy scenarios verify distinct staged and
Original file line number Diff line number Diff line change @@ -280,9 +280,21 @@ try {
280280 await delay ( 200 ) ;
281281 assert . equal ( ( await cli ( [ "approvals" ] ) ) . approvals [ 0 ] . id , approval . id ) ;
282282 tui . child . stdin . write ( "\x7f" ) ;
283+ const openingApproval = tui . output . stdout . length ;
283284 tui . child . stdin . write ( "\x1bOS" ) ;
284- await delay ( 150 ) ;
285- tui . child . stdin . write ( "\t\r" ) ;
285+ await until ( "terminal approval dialog" , ( ) =>
286+ tui . output . stdout
287+ . slice ( openingApproval )
288+ . includes ( "DENY · Tab switches" ) ,
289+ ) ;
290+ const switchingApproval = tui . output . stdout . length ;
291+ tui . child . stdin . write ( "\t" ) ;
292+ await until ( "terminal approval allow state" , ( ) =>
293+ tui . output . stdout
294+ . slice ( switchingApproval )
295+ . includes ( "ALLOW · Tab switches" ) ,
296+ ) ;
297+ tui . child . stdin . write ( "\r" ) ;
286298 await until (
287299 "approved exact command" ,
288300 async ( ) =>
You can’t perform that action at this time.
0 commit comments