@@ -40,6 +40,8 @@ import {
4040 writePullRequestListPreferences ,
4141} from "./pullRequestListPreferences" ;
4242
43+ import { pullRequestGroups } from "./pullRequestListGroups.logic" ;
44+
4345const VIEWERS = { "github.com" : "Bilal" } as const ;
4446
4547function entry (
@@ -490,6 +492,36 @@ describe("merging the environments' own listings", () => {
490492 . toEqual ( [ 3 , 2 , 1 ] ) ;
491493 } ) ;
492494
495+ it ( "orders host timestamps by instant in the Updated view with no search" , ( ) => {
496+ const known = [
497+ entry ( { number : 1 , updatedAt : "2026-07-05T01:00:00+02:00" } ) ,
498+ entry ( { number : 2 , updatedAt : "2026-07-05T00:30:00Z" } ) ,
499+ entry ( { number : 3 , updatedAt : "2026-07-05T00:30:00.5Z" } ) ,
500+ ] ;
501+ for ( const involvement of [ "all" , "authored" , "reviewing" ] as const ) {
502+ const { groups } = pullRequestGroups ( {
503+ known : known . map ( ( row ) => ( { ...row , viewerReviewRequested : true } ) ) ,
504+ providers : [ ] ,
505+ viewers : { "github.com" : "octocat" } ,
506+ involvement,
507+ localFilters : { } ,
508+ hasLocalFilters : false ,
509+ text : "" ,
510+ answeredLocally : true ,
511+ baselineEmpty : false ,
512+ held : undefined ,
513+ authored : [ ] ,
514+ reviewing : [ ] ,
515+ partitionsWanted : true ,
516+ } ) ;
517+ expect
518+ . soft ( sortPullRequestGroups ( groups , "updated" , "" ) . flatMap ( ( group ) =>
519+ group . entries . map ( ( row ) => row . number ) ,
520+ ) )
521+ . toEqual ( [ 3 , 2 , 1 ] ) ;
522+ }
523+ } ) ;
524+
493525 it ( "tags every row with the environment that read it, newest first" , ( ) => {
494526 const merged = mergePullRequestLists ( [
495527 [ ENV_1 , answer ( { entries : [ entry ( { number : 1 , updatedAt : "2026-07-01T00:00:00Z" } ) ] } ) ] ,
0 commit comments