@@ -1236,93 +1236,127 @@ layer("GitLabPullRequestCli.layer", (it) => {
12361236 } ) ,
12371237 ) ;
12381238
1239- it . effect ( "reads a positioned discussion as a thread anchored to its line" , ( ) =>
1240- Effect . gen ( function * ( ) {
1241- mockedExecute . mockReturnValueOnce (
1242- Effect . succeed (
1243- output (
1244- JSON . stringify ( [
1245- {
1246- id : "abc123" ,
1247- notes : [
1248- {
1249- id : 1 ,
1250- body : "rename this" ,
1251- author : { username : "bilal" , avatar_url : "https://avatars/b.png" } ,
1252- created_at : "2026-07-01T00:00:00Z" ,
1253- resolvable : true ,
1254- resolved : true ,
1255- position : {
1256- position_type : "text" ,
1257- new_path : "src/a.ts" ,
1258- old_path : "src/a.ts" ,
1259- new_line : 12 ,
1260- old_line : null ,
1239+ it . effect (
1240+ "reads a positioned discussion as a thread and an open overview discussion as a finding" ,
1241+ ( ) =>
1242+ Effect . gen ( function * ( ) {
1243+ mockedExecute . mockReturnValueOnce (
1244+ Effect . succeed (
1245+ output (
1246+ JSON . stringify ( [
1247+ {
1248+ id : "abc123" ,
1249+ notes : [
1250+ {
1251+ id : 1 ,
1252+ body : "rename this" ,
1253+ author : { username : "bilal" , avatar_url : "https://avatars/b.png" } ,
1254+ created_at : "2026-07-01T00:00:00Z" ,
1255+ resolvable : true ,
1256+ resolved : true ,
1257+ position : {
1258+ position_type : "text" ,
1259+ new_path : "src/a.ts" ,
1260+ old_path : "src/a.ts" ,
1261+ new_line : 12 ,
1262+ old_line : null ,
1263+ } ,
12611264 } ,
1262- } ,
1263- {
1264- id : 2 ,
1265- body : "done" ,
1266- author : { username : "julius" } ,
1267- created_at : "2026-07-01T01:00:00Z" ,
1268- } ,
1269- ] ,
1270- } ,
1271- { id : "def456" , notes : [ { id : 3 , body : "ship it" , created_at : "2026-07-01Z" } ] } ,
1272- {
1273- id : "file789" ,
1274- notes : [
1275- {
1276- id : 4 ,
1277- body : "split this file" ,
1278- created_at : "2026-07-01Z" ,
1279- position : {
1280- position_type : "file" ,
1281- new_path : "src/b.ts" ,
1282- old_path : "src/b.ts" ,
1283- new_line : null ,
1284- old_line : null ,
1265+ {
1266+ id : 2 ,
1267+ body : "done" ,
1268+ author : { username : "julius" } ,
1269+ created_at : "2026-07-01T01:00:00Z" ,
12851270 } ,
1286- } ,
1287- ] ,
1288- } ,
1289- {
1290- id : "img012" ,
1291- notes : [
1292- {
1293- id : 5 ,
1294- body : "logo is blurry" ,
1295- created_at : "2026-07-01Z" ,
1296- position : {
1297- position_type : "image" ,
1298- new_path : "logo.png" ,
1299- old_path : "logo.png" ,
1300- new_line : null ,
1301- old_line : null ,
1271+ ] ,
1272+ } ,
1273+ { id : "def456" , notes : [ { id : 3 , body : "ship it" , created_at : "2026-07-01Z" } ] } ,
1274+ {
1275+ id : "ghi789" ,
1276+ notes : [
1277+ {
1278+ id : 4 ,
1279+ body : "mention the new flag in the README" ,
1280+ created_at : "2026-07-01T02:00:00Z" ,
1281+ resolvable : true ,
1282+ resolved : false ,
13021283 } ,
1303- } ,
1304- ] ,
1305- } ,
1306- ] ) ,
1284+ {
1285+ id : 5 ,
1286+ body : "will do" ,
1287+ created_at : "2026-07-01T03:00:00Z" ,
1288+ resolvable : true ,
1289+ resolved : false ,
1290+ } ,
1291+ ] ,
1292+ } ,
1293+ {
1294+ id : "jkl012" ,
1295+ notes : [
1296+ {
1297+ id : 6 ,
1298+ body : "already addressed" ,
1299+ created_at : "2026-07-01T04:00:00Z" ,
1300+ resolvable : true ,
1301+ resolved : true ,
1302+ } ,
1303+ ] ,
1304+ } ,
1305+ {
1306+ id : "file789" ,
1307+ notes : [
1308+ {
1309+ id : 7 ,
1310+ body : "split this file" ,
1311+ created_at : "2026-07-01Z" ,
1312+ position : {
1313+ position_type : "file" ,
1314+ new_path : "src/b.ts" ,
1315+ old_path : "src/b.ts" ,
1316+ new_line : null ,
1317+ old_line : null ,
1318+ } ,
1319+ } ,
1320+ ] ,
1321+ } ,
1322+ {
1323+ id : "img012" ,
1324+ notes : [
1325+ {
1326+ id : 8 ,
1327+ body : "logo is blurry" ,
1328+ created_at : "2026-07-01Z" ,
1329+ position : {
1330+ position_type : "image" ,
1331+ new_path : "logo.png" ,
1332+ old_path : "logo.png" ,
1333+ new_line : null ,
1334+ old_line : null ,
1335+ } ,
1336+ } ,
1337+ ] ,
1338+ } ,
1339+ ] ) ,
1340+ ) ,
13071341 ) ,
1308- ) ,
1309- ) ;
1310- const cli = yield * GitLabPullRequestCli . GitLabPullRequestCli ;
1342+ ) ;
1343+ const cli = yield * GitLabPullRequestCli . GitLabPullRequestCli ;
13111344
1312- const { threads } = yield * cli . listDiscussions ( {
1313- cwd : "/w" ,
1314- repository : "acme/web" ,
1315- number : 7 ,
1316- } ) ;
1345+ const { threads, overviewFindingIds } = yield * cli . listDiscussions ( {
1346+ cwd : "/w" ,
1347+ repository : "acme/web" ,
1348+ number : 7 ,
1349+ } ) ;
13171350
1318- expect ( threads . map ( ( { id, path, line, side } ) => ( { id, path, line, side } ) ) ) . toEqual ( [
1319- { id : "abc123" , path : "src/a.ts" , line : 12 , side : "right" } ,
1320- { id : "file789" , path : "src/b.ts" , line : null , side : "right" } ,
1321- { id : "img012" , path : "logo.png" , line : null , side : "right" } ,
1322- ] ) ;
1323- expect ( threads [ 0 ] ) . toMatchObject ( { isResolved : true } ) ;
1324- assert . strictEqual ( threads [ 0 ] ?. comments . length , 2 ) ;
1325- } ) ,
1351+ expect ( overviewFindingIds ) . toEqual ( [ "4" ] ) ;
1352+ expect ( threads . map ( ( { id, path, line, side } ) => ( { id, path, line, side } ) ) ) . toEqual ( [
1353+ { id : "abc123" , path : "src/a.ts" , line : 12 , side : "right" } ,
1354+ { id : "file789" , path : "src/b.ts" , line : null , side : "right" } ,
1355+ { id : "img012" , path : "logo.png" , line : null , side : "right" } ,
1356+ ] ) ;
1357+ expect ( threads [ 0 ] ) . toMatchObject ( { isResolved : true } ) ;
1358+ assert . strictEqual ( threads [ 0 ] ?. comments . length , 2 ) ;
1359+ } ) ,
13261360 ) ;
13271361
13281362 it . effect ( "sends a review as its comments, then its summary, then the verdict" , ( ) =>
0 commit comments