@cueloop/client 0.1.0-alpha.72 → 0.1.0-alpha.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/package.json +5 -5
  2. package/src/App.tsx +35 -170
  3. package/src/App.workbench.test.tsx +103 -2
  4. package/src/app-screens.tsx +84 -10
  5. package/src/components/AppShell.brand.test.tsx +58 -0
  6. package/src/components/AppShell.tsx +32 -6
  7. package/src/components/BareWorkbenchFileView.tsx +1 -1
  8. package/src/components/ConfirmCard.tsx +0 -1
  9. package/src/components/GridTabContent.stories.tsx +59 -0
  10. package/src/components/GridTabContent.tsx +165 -0
  11. package/src/components/SettingsDialog.tsx +4 -13
  12. package/src/components/ThreadTree.tsx +6 -18
  13. package/src/components/__snapshots__/stories.test.tsx.snap +112 -68
  14. package/src/components/primitives/Card.tsx +1 -1
  15. package/src/components/primitives/frame.test.ts +5 -5
  16. package/src/components/primitives/frame.ts +5 -7
  17. package/src/components/quick-actions-editor.stories.tsx +2 -0
  18. package/src/components/quick-actions-editor.test.tsx +36 -2
  19. package/src/components/quick-actions-editor.tsx +104 -29
  20. package/src/components/truncate-title.test.ts +31 -0
  21. package/src/components/truncate-title.ts +15 -0
  22. package/src/config.test.ts +36 -0
  23. package/src/config.ts +38 -8
  24. package/src/index.ts +2 -0
  25. package/src/intent-dispatch.test.ts +1 -0
  26. package/src/launch-layout.test.ts +52 -0
  27. package/src/launch-layout.ts +42 -0
  28. package/src/run.ts +10 -0
  29. package/src/serve.ts +31 -0
  30. package/src/thread-controller.live-diff.test.ts +119 -0
  31. package/src/thread-controller.ts +88 -27
  32. package/src/use-changes-workbench.ts +41 -4
  33. package/src/use-remember-layout.ts +31 -0
  34. package/src/use-settings-dialog.tsx +11 -2
  35. package/src/view-diff.test.ts +73 -2
  36. package/src/view-diff.ts +38 -0
  37. package/src/workbench-snapshot.test.ts +81 -0
  38. package/src/workbench-snapshot.ts +29 -0
  39. package/src/components/fade-title.test.ts +0 -49
  40. package/src/components/fade-title.ts +0 -61
@@ -351,13 +351,13 @@ exports[`stories catalog Overlays/CompletionOverlay/FeedbackCounting renders, sn
351
351
  `;
352
352
 
353
353
  exports[`stories catalog Cards/ConfirmCard/ApproveDefault renders, snapshots, and carries its colors: Cards/ConfirmCard/ApproveDefault 1`] = `
354
- "╭─ send message ───────────────────────╮
354
+ "┌──────────────────────────────────────┐
355
355
  │ Comment [Approve] Changes │
356
356
  │ │
357
357
  │ summary for the agent (optional) │
358
358
  │ │
359
359
  │ send message Cancel │
360
- ╰──────────────────────────────────────╯
360
+ └──────────────────────────────────────┘
361
361
 
362
362
 
363
363
 
@@ -369,13 +369,13 @@ exports[`stories catalog Cards/ConfirmCard/ApproveDefault renders, snapshots, an
369
369
  `;
370
370
 
371
371
  exports[`stories catalog Cards/ConfirmCard/RequestChanges renders, snapshots, and carries its colors: Cards/ConfirmCard/RequestChanges 1`] = `
372
- "╭─ send message ───────────────────────╮
372
+ "┌──────────────────────────────────────┐
373
373
  │ Comment Approve [Changes] │
374
374
  │ │
375
375
  │ Tighten the steps. │
376
376
  │ │
377
377
  │ send message Cancel │
378
- ╰──────────────────────────────────────╯
378
+ └──────────────────────────────────────┘
379
379
 
380
380
 
381
381
 
@@ -387,7 +387,7 @@ exports[`stories catalog Cards/ConfirmCard/RequestChanges renders, snapshots, an
387
387
  `;
388
388
 
389
389
  exports[`stories catalog Cards/ConfirmCard/WithViewedSummary renders, snapshots, and carries its colors: Cards/ConfirmCard/WithViewedSummary 1`] = `
390
- "╭─ send message ───────────────────────╮
390
+ "┌──────────────────────────────────────┐
391
391
  │ 2/3 files viewed │
392
392
  │ │
393
393
  │ Comment [Approve] Changes │
@@ -395,7 +395,7 @@ exports[`stories catalog Cards/ConfirmCard/WithViewedSummary renders, snapshots,
395
395
  │ summary for the agent (optional) │
396
396
  │ │
397
397
  │ send message Cancel │
398
- ╰──────────────────────────────────────╯
398
+ └──────────────────────────────────────┘
399
399
 
400
400
 
401
401
 
@@ -410,13 +410,13 @@ exports[`stories catalog Overlays/ConfirmDialog/DeletePlan renders, snapshots, a
410
410
 
411
411
 
412
412
 
413
- ╭─ Delete plan ──────────────────────────────────────╮
413
+ ┌─ Delete plan ──────────────────────────────────────┐
414
414
  │ │
415
415
  │ Delete "Auth rollout"? This removes the plan and │
416
416
  │ its review. │
417
417
  │ │
418
418
  │ Delete Cancel esc │
419
- ╰────────────────────────────────────────────────────╯
419
+ └────────────────────────────────────────────────────┘
420
420
 
421
421
 
422
422
 
@@ -595,6 +595,50 @@ exports[`stories catalog Surfaces/FileContentsView/Loaded renders, snapshots, an
595
595
 
596
596
 
597
597
 
598
+ "
599
+ `;
600
+
601
+ exports[`stories catalog Surfaces/GridTabContent/ChangesTab renders, snapshots, and carries its colors: Surfaces/GridTabContent/ChangesTab 1`] = `
602
+ " ───────────────────────────────────────────────────────────────────────────
603
+ src/store.ts +1 -1
604
+ ───────────────────────────────────────────────────────────────────────────
605
+ @@ -1,4 +1,4 @@
606
+ ▎1 1 export class Store {
607
+ 2 - private items = [];
608
+ 2 + private items = new Map();
609
+ 3 3 }
610
+
611
+
612
+
613
+
614
+
615
+
616
+
617
+
618
+
619
+
620
+ "
621
+ `;
622
+
623
+ exports[`stories catalog Surfaces/GridTabContent/FileDiffTab renders, snapshots, and carries its colors: Surfaces/GridTabContent/FileDiffTab 1`] = `
624
+ " ───────────────────────────────────────────────────────────────────────────
625
+ src/store.ts +1 -1
626
+ ───────────────────────────────────────────────────────────────────────────
627
+ @@ -1,4 +1,4 @@
628
+ ▎1 1 export class Store {
629
+ 2 - private items = [];
630
+ 2 + private items = new Map();
631
+ 3 3 }
632
+
633
+
634
+
635
+
636
+
637
+
638
+
639
+
640
+
641
+
598
642
  "
599
643
  `;
600
644
 
@@ -604,7 +648,7 @@ exports[`stories catalog Overlays/KeybindsDialog/Cheatsheet renders, snapshots,
604
648
 
605
649
 
606
650
 
607
- ╭─ keybinds ───────────────────────────────────────╮
651
+ ┌─ keybinds ───────────────────────────────────────┐
608
652
  │ │
609
653
  │ Review │
610
654
  │ j / k move │
@@ -617,7 +661,7 @@ exports[`stories catalog Overlays/KeybindsDialog/Cheatsheet renders, snapshots,
617
661
  │ esc cancel │
618
662
  │ │
619
663
  │ [esc] │
620
- ╰──────────────────────────────────────────────────╯
664
+ └──────────────────────────────────────────────────┘
621
665
 
622
666
 
623
667
 
@@ -629,10 +673,10 @@ exports[`stories catalog Overlays/KeybindsDialog/Cheatsheet renders, snapshots,
629
673
  exports[`stories catalog Chrome/MenuBar/Open renders, snapshots, and carries its colors: Chrome/MenuBar/Open 1`] = `
630
674
  "
631
675
 
632
- ╭──────────────╮
676
+ ┌──────────────┐
633
677
  │ Settings │
634
678
  │ Keybinds │
635
- ╰──────────────╯
679
+ └──────────────┘
636
680
 
637
681
 
638
682
  "
@@ -744,13 +788,13 @@ exports[`stories catalog Overlays/PromptDialog/NameYourself renders, snapshots,
744
788
 
745
789
 
746
790
 
747
- ╭─ Welcome ──────────────────────────────────────────╮
791
+ ┌─ Welcome ──────────────────────────────────────────┐
748
792
  │ │
749
793
  │ Your name (optional) - it attributes the notes │
750
794
  │ you leave: │
751
795
  │ your name │
752
796
  │ enter save · esc cancel │
753
- ╰────────────────────────────────────────────────────╯
797
+ └────────────────────────────────────────────────────┘
754
798
 
755
799
 
756
800
 
@@ -764,13 +808,13 @@ exports[`stories catalog Overlays/PromptDialog/RenameAuthor renders, snapshots,
764
808
 
765
809
 
766
810
 
767
- ╭─ Rename author ────────────────────────────────────╮
811
+ ┌─ Rename author ────────────────────────────────────┐
768
812
  │ │
769
813
  │ Display name for this collaborator: │
770
814
  │ Robin │
771
815
  │ │
772
816
  │ enter save · esc cancel │
773
- ╰────────────────────────────────────────────────────╯
817
+ └────────────────────────────────────────────────────┘
774
818
 
775
819
 
776
820
 
@@ -833,11 +877,11 @@ exports[`stories catalog Overlays/SettingsDialog/AppearanceThemed renders, snaps
833
877
 
834
878
 
835
879
 
836
- ╭─ Settings ───────────────────────────────────────────────────────────────╮
837
- │ Settings │ Appearance │
838
- │ General │ the color theme │
839
- │ Display │ │
840
- │ Appearance │ Theme Rosé Pine Moon │
880
+ ┌─ Settings ───────────────────────────────────────────────────────────────┐
881
+ │ General │ Appearance │
882
+ │ Display │ the color theme │
883
+ │ Appearance │ │
884
+ │ │ Theme Rosé Pine Moon │
841
885
  │ │ │
842
886
  │ │ │
843
887
  │ │ │
@@ -854,7 +898,7 @@ exports[`stories catalog Overlays/SettingsDialog/AppearanceThemed renders, snaps
854
898
  │ │ │
855
899
  │ │ │
856
900
  │ j/k row · l/space change · h back · esc close cueloop v0.1.0-alpha.32 │
857
- ╰──────────────────────────────────────────────────────────────────────────╯
901
+ └──────────────────────────────────────────────────────────────────────────┘
858
902
 
859
903
 
860
904
 
@@ -867,11 +911,11 @@ exports[`stories catalog Overlays/SettingsDialog/BodyZone renders, snapshots, an
867
911
 
868
912
 
869
913
 
870
- ╭─ Settings ───────────────────────────────────────────────────────────────╮
871
- │ Settings │ Display │
872
- │ General │ plan width and chrome │
873
- │ Display │ │
874
- │ Appearance │ Plan width default │
914
+ ┌─ Settings ───────────────────────────────────────────────────────────────┐
915
+ │ General │ Display │
916
+ │ Display │ plan width and chrome │
917
+ │ Appearance │ │
918
+ │ │ Plan width default │
875
919
  │ │ Line numbers on │
876
920
  │ │ │
877
921
  │ │ │
@@ -888,7 +932,7 @@ exports[`stories catalog Overlays/SettingsDialog/BodyZone renders, snapshots, an
888
932
  │ │ │
889
933
  │ │ │
890
934
  │ j/k row · l/space change · h back · esc close cueloop v0.1.0-alpha.32 │
891
- ╰──────────────────────────────────────────────────────────────────────────╯
935
+ └──────────────────────────────────────────────────────────────────────────┘
892
936
 
893
937
 
894
938
 
@@ -901,11 +945,11 @@ exports[`stories catalog Overlays/SettingsDialog/NavZone renders, snapshots, and
901
945
 
902
946
 
903
947
 
904
- ╭─ Settings ───────────────────────────────────────────────────────────────╮
905
- │ Settings │ General │
906
- │ General │ identity and submission │
907
- │ Display │ │
908
- │ Appearance │ Display name amber-heron │
948
+ ┌─ Settings ───────────────────────────────────────────────────────────────┐
949
+ │ General │ General │
950
+ │ Display │ identity and submission │
951
+ │ Appearance │ │
952
+ │ │ Display name amber-heron │
909
953
  │ │ Auto-close on submit 3s │
910
954
  │ │ │
911
955
  │ │ │
@@ -922,7 +966,7 @@ exports[`stories catalog Overlays/SettingsDialog/NavZone renders, snapshots, and
922
966
  │ │ │
923
967
  │ │ │
924
968
  │ j/k nav · l/tab open · esc close cueloop v0.1.0-alpha.32 │
925
- ╰──────────────────────────────────────────────────────────────────────────╯
969
+ └──────────────────────────────────────────────────────────────────────────┘
926
970
 
927
971
 
928
972
 
@@ -1070,12 +1114,12 @@ exports[`stories catalog Overlays/Toast/ShareLink renders, snapshots, and carrie
1070
1114
  "
1071
1115
 
1072
1116
 
1073
- ╭─ share link copied ─────────╮
1117
+ ┌─ share link copied ─────────┐
1074
1118
  │ │
1075
1119
  │ ssh review-4f2a@cueloop.dev │
1076
1120
  │ │
1077
1121
  │ [esc] │
1078
- ╰─────────────────────────────╯
1122
+ └─────────────────────────────┘
1079
1123
 
1080
1124
 
1081
1125
 
@@ -1173,11 +1217,11 @@ exports[`stories catalog Overlays/WalkWizard/EndCard renders, snapshots, and car
1173
1217
 
1174
1218
 
1175
1219
 
1176
- ╭─ walk complete ──────────────────────────────────────────────────────╮
1220
+ ┌─ walk complete ──────────────────────────────────────────────────────┐
1177
1221
  │ every file viewed (3/3) │
1178
1222
  │ │
1179
1223
  │ Submit review [ back │
1180
- ╰──────────────────────────────────────────────────────────────────────╯
1224
+ └──────────────────────────────────────────────────────────────────────┘
1181
1225
 
1182
1226
 
1183
1227
 
@@ -1201,11 +1245,11 @@ exports[`stories catalog Overlays/WalkWizard/EndCardPartialPass renders, snapsho
1201
1245
 
1202
1246
 
1203
1247
 
1204
- ╭─ walk complete ──────────────────────────────────────────────────────╮
1248
+ ┌─ walk complete ──────────────────────────────────────────────────────┐
1205
1249
  │ 1 of 3 files viewed │
1206
1250
  │ │
1207
1251
  │ Submit review [ back │
1208
- ╰──────────────────────────────────────────────────────────────────────╯
1252
+ └──────────────────────────────────────────────────────────────────────┘
1209
1253
 
1210
1254
 
1211
1255
 
@@ -1227,14 +1271,14 @@ exports[`stories catalog Overlays/WalkWizard/FirstFile renders, snapshots, and c
1227
1271
 
1228
1272
 
1229
1273
 
1230
- ╭─ file 1 of 3 · 0 viewed ─────────────────────────────────────────────╮
1274
+ ┌─ file 1 of 3 · 0 viewed ─────────────────────────────────────────────┐
1231
1275
  │ packages/daemon/src/store.ts │
1232
1276
  │ +12 -3 │
1233
1277
  │ │
1234
1278
  │ +const viewed = new Set<string>(); │
1235
1279
  │ +record.viewedPaths = [...viewed]; │
1236
1280
  │ -// viewed tracking lives in the client only │
1237
- ╰──────────────────────────────────────────────────────────────────────╯
1281
+ └──────────────────────────────────────────────────────────────────────┘
1238
1282
 
1239
1283
 
1240
1284
 
@@ -1254,17 +1298,17 @@ exports[`stories catalog Overlays/WalkWizard/WithAgentNote renders, snapshots, a
1254
1298
 
1255
1299
 
1256
1300
 
1257
- ╭─ file 2 of 3 · 1 viewed ─────────────────────────────────────────────╮
1301
+ ┌─ file 2 of 3 · 1 viewed ─────────────────────────────────────────────┐
1258
1302
  │ packages/client/src/walk.ts │
1259
1303
  │ +48 -0 │
1260
1304
  │ │
1261
1305
  │ +export function firstUnviewedIndex(files, viewed) { │
1262
- ╰──────────────────────────────────────────────────────────────────────╯
1306
+ └──────────────────────────────────────────────────────────────────────┘
1263
1307
 
1264
- ╭─ agent note ─────────────────────────────────────────────────────────╮
1308
+ ┌─ agent note ─────────────────────────────────────────────────────────┐
1265
1309
  │ New module: pure helpers that pick the next unviewed file. No IO, │
1266
1310
  │ unit tested. │
1267
- ╰──────────────────────────────────────────────────────────────────────╯
1311
+ └──────────────────────────────────────────────────────────────────────┘
1268
1312
 
1269
1313
 
1270
1314
 
@@ -1299,15 +1343,15 @@ exports[`stories catalog Surfaces/WelcomePlayground/Welcome renders, snapshots,
1299
1343
  `;
1300
1344
 
1301
1345
  exports[`stories catalog Chrome/AgentLauncher/Launcher renders, snapshots, and carries its colors: Chrome/AgentLauncher/Launcher 1`] = `
1302
- " ╭────────────────────────────────────╮
1346
+ " ┌────────────────────────────────────┐
1303
1347
  │ Claude Code │
1304
- ╰────────────────────────────────────╯
1305
- ╭────────────────────────────────────╮
1348
+ └────────────────────────────────────┘
1349
+ ┌────────────────────────────────────┐
1306
1350
  │ Pi │
1307
- ╰────────────────────────────────────╯
1308
- ╭────────────────────────────────────╮
1351
+ └────────────────────────────────────┘
1352
+ ┌────────────────────────────────────┐
1309
1353
  │ OpenAI Codex │
1310
- ╰────────────────────────────────────╯
1354
+ └────────────────────────────────────┘
1311
1355
  plan context: seed the plan
1312
1356
 
1313
1357
 
@@ -1429,9 +1473,9 @@ exports[`stories catalog Primitives/Button/Variants renders, snapshots, and carr
1429
1473
  `;
1430
1474
 
1431
1475
  exports[`stories catalog Primitives/Card/AccentBorder renders, snapshots, and carries its colors: Primitives/Card/AccentBorder 1`] = `
1432
- "╭─ accented ───────────────────────────────────────────────────────────────────╮
1476
+ "┌─ accented ───────────────────────────────────────────────────────────────────┐
1433
1477
  │ content │
1434
- ╰──────────────────────────────────────────────────────────────────────────────╯
1478
+ └──────────────────────────────────────────────────────────────────────────────┘
1435
1479
 
1436
1480
 
1437
1481
 
@@ -1457,10 +1501,10 @@ exports[`stories catalog Primitives/Card/AccentBorder renders, snapshots, and ca
1457
1501
  `;
1458
1502
 
1459
1503
  exports[`stories catalog Primitives/Card/Titled renders, snapshots, and carries its colors: Primitives/Card/Titled 1`] = `
1460
- "╭─ a titled card ──────────────────────────────────────────────────────────────╮
1504
+ "┌─ a titled card ──────────────────────────────────────────────────────────────┐
1461
1505
  │ first content row │
1462
1506
  │ second content row │
1463
- ╰──────────────────────────────────────────────────────────────────────────────╯
1507
+ └──────────────────────────────────────────────────────────────────────────────┘
1464
1508
 
1465
1509
 
1466
1510
 
@@ -1517,14 +1561,14 @@ exports[`stories catalog Primitives/Dialog/Open renders, snapshots, and carries
1517
1561
 
1518
1562
 
1519
1563
 
1520
- ╭─ a modal ────────────────────────────╮
1564
+ ┌─ a modal ────────────────────────────┐
1521
1565
  │dialog body content │
1522
1566
  │ │
1523
1567
  │ │
1524
1568
  │ │
1525
1569
  │ │
1526
1570
  │ │
1527
- ╰──────────────────────────────────────╯
1571
+ └──────────────────────────────────────┘
1528
1572
 
1529
1573
 
1530
1574
 
@@ -1575,9 +1619,9 @@ exports[`stories catalog Primitives/StatusBar/HintLine renders, snapshots, and c
1575
1619
  `;
1576
1620
 
1577
1621
  exports[`stories catalog Primitives/Tabs/SecondSelected renders, snapshots, and carries its colors: Primitives/Tabs/SecondSelected 1`] = `
1578
- "╭──────────────────────────────────────────────────────────────────────────────╮
1622
+ "┌──────────────────────────────────────────────────────────────────────────────┐
1579
1623
  │ Review (0) Agent │
1580
- ╰──────────────────────────────────────────────────────────────────────────────╯
1624
+ └──────────────────────────────────────────────────────────────────────────────┘
1581
1625
 
1582
1626
 
1583
1627
 
@@ -1603,9 +1647,9 @@ exports[`stories catalog Primitives/Tabs/SecondSelected renders, snapshots, and
1603
1647
  `;
1604
1648
 
1605
1649
  exports[`stories catalog Primitives/Tabs/TwoTabs renders, snapshots, and carries its colors: Primitives/Tabs/TwoTabs 1`] = `
1606
- "╭──────────────────────────────────────────────────────────────────────────────╮
1650
+ "┌──────────────────────────────────────────────────────────────────────────────┐
1607
1651
  │ Review (2) Agent │
1608
- ╰──────────────────────────────────────────────────────────────────────────────╯
1652
+ └──────────────────────────────────────────────────────────────────────────────┘
1609
1653
 
1610
1654
 
1611
1655
 
@@ -1761,9 +1805,9 @@ exports[`stories catalog Chrome/QuickActionsEditor/RowExpanded renders, snapshot
1761
1805
  `;
1762
1806
 
1763
1807
  exports[`stories catalog Foundations/Theme/ContextDefault renders, snapshots, and carries its colors: Foundations/Theme/ContextDefault 1`] = `
1764
- "╭─ default dark theme ─────────────────────────────────────────────────────────╮
1808
+ "┌─ default dark theme ─────────────────────────────────────────────────────────┐
1765
1809
  │ no provider needed │
1766
- ╰──────────────────────────────────────────────────────────────────────────────╯
1810
+ └──────────────────────────────────────────────────────────────────────────────┘
1767
1811
 
1768
1812
 
1769
1813
 
@@ -1789,9 +1833,9 @@ exports[`stories catalog Foundations/Theme/ContextDefault renders, snapshots, an
1789
1833
  `;
1790
1834
 
1791
1835
  exports[`stories catalog Foundations/Theme/PropOverride renders, snapshots, and carries its colors: Foundations/Theme/PropOverride 1`] = `
1792
- "╭─ prop-overridden theme ──────────────────────────────────────────────────────╮
1836
+ "┌─ prop-overridden theme ──────────────────────────────────────────────────────┐
1793
1837
  │ the theme prop beats the context │
1794
- ╰──────────────────────────────────────────────────────────────────────────────╯
1838
+ └──────────────────────────────────────────────────────────────────────────────┘
1795
1839
 
1796
1840
 
1797
1841
 
@@ -1817,9 +1861,9 @@ exports[`stories catalog Foundations/Theme/PropOverride renders, snapshots, and
1817
1861
  `;
1818
1862
 
1819
1863
  exports[`stories catalog Foundations/Theme/ProviderSwap renders, snapshots, and carries its colors: Foundations/Theme/ProviderSwap 1`] = `
1820
- "╭─ provider theme ─────────────────────────────────────────────────────────────╮
1864
+ "┌─ provider theme ─────────────────────────────────────────────────────────────┐
1821
1865
  │ tokens come from the provider │
1822
- ╰──────────────────────────────────────────────────────────────────────────────╯
1866
+ └──────────────────────────────────────────────────────────────────────────────┘
1823
1867
 
1824
1868
 
1825
1869
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Bordered rounded box with an optional title. The card owns the
2
+ * Bordered box with an optional title. The card owns the
3
3
  * height-derivation rule: its height is always the declared content row
4
4
  * count plus the two border rows, so layout math and the mounted box can
5
5
  * never drift apart - border-collapse bugs die here.
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Locks the single frame border rule: every bordered frame reads this token,
3
- * so a regression to square corners (or any other style) fails here first,
4
- * before the slower VRT snapshots catch it. Decision: rounded (issue #116).
2
+ * Locks the single frame border rule: every bordered frame reads this token, so
3
+ * a drift back to rounded (or any other style) fails here first, before the
4
+ * slower VRT snapshots catch it.
5
5
  */
6
6
 
7
7
  import { expect, test } from "bun:test";
8
8
  import { FRAME_BORDER_STYLE } from "./frame";
9
9
 
10
- test("frames use the rounded border style", () => {
11
- expect(FRAME_BORDER_STYLE).toBe("rounded");
10
+ test("frames use the square border style", () => {
11
+ expect(FRAME_BORDER_STYLE).toBe("single");
12
12
  });
@@ -1,14 +1,12 @@
1
1
  /**
2
2
  * The one frame border rule for the design system. Every bordered frame -
3
3
  * cards, dialogs, and the stories gallery chrome - reads its corner style
4
- * from FRAME_BORDER_STYLE, so the rounded-corner decision lives in a single
5
- * place and can never drift between frames. Buttons stay text-first and
6
- * borderless: the frame they sit in carries the border, not the button.
7
- *
8
- * Decision: rounded on the frames, not on the buttons (issue #116).
4
+ * from FRAME_BORDER_STYLE, so the corner decision lives in a single place and
5
+ * can never drift between frames. Buttons stay text-first and borderless: the
6
+ * frame they sit in carries the border, not the button.
9
7
  */
10
8
 
11
9
  import type { BorderStyle } from "@opentui/core";
12
10
 
13
- /** Corner style shared by every bordered frame in the app. */
14
- export const FRAME_BORDER_STYLE: BorderStyle = "rounded";
11
+ /** Corner style shared by every bordered frame in the app: square, not rounded. */
12
+ export const FRAME_BORDER_STYLE: BorderStyle = "single";
@@ -25,6 +25,7 @@ export const Collapsed: Story = {
25
25
  selectedIndex={0}
26
26
  expandedIndex={null}
27
27
  onToggleExpand={noop}
28
+ onEditPrompt={() => {}}
28
29
  onEditMetadata={noop}
29
30
  onReset={noop}
30
31
  onAdd={noop}
@@ -43,6 +44,7 @@ export const RowExpanded: Story = {
43
44
  selectedIndex={1}
44
45
  expandedIndex={1}
45
46
  onToggleExpand={noop}
47
+ onEditPrompt={() => {}}
46
48
  onEditMetadata={noop}
47
49
  onReset={noop}
48
50
  onAdd={noop}
@@ -1,10 +1,10 @@
1
- /** The Actions editor scrolls to keep the selected row in view when the list outgrows the pane. */
1
+ /** The Actions editor scrolls the list, and an expanded row edits both the title and the description. */
2
2
 
3
3
  import { describe, expect, test } from "bun:test";
4
4
  import React from "react";
5
5
  import { testRender } from "@opentui/react/test-utils";
6
6
  import type { QuickAction } from "../config";
7
- import { settle } from "../test-support";
7
+ import { settle, typeText } from "../test-support";
8
8
  import { QuickActionsEditor } from "./quick-actions-editor";
9
9
 
10
10
  const MANY: QuickAction[] = Array.from({ length: 14 }, (_, index) => ({
@@ -18,6 +18,7 @@ async function mount(selectedIndex: number) {
18
18
  selectedIndex={selectedIndex}
19
19
  expandedIndex={null}
20
20
  onToggleExpand={() => {}}
21
+ onEditPrompt={() => {}}
21
22
  onEditMetadata={() => {}}
22
23
  onReset={() => {}}
23
24
  onAdd={() => {}}
@@ -47,3 +48,36 @@ describe("QuickActionsEditor scrolling", () => {
47
48
  setup.renderer.destroy();
48
49
  });
49
50
  });
51
+
52
+ describe("editing an expanded action", () => {
53
+ test("an expanded row edits both the title and the description", async () => {
54
+ const prompts: string[] = [];
55
+ const metadatas: string[] = [];
56
+ const setup = await testRender(
57
+ <QuickActionsEditor
58
+ actions={[{ prompt: "Ship it", metadata: "be terse" }]}
59
+ selectedIndex={0}
60
+ expandedIndex={0}
61
+ onToggleExpand={() => {}}
62
+ onEditPrompt={(_index, prompt) => prompts.push(prompt)}
63
+ onEditMetadata={(_index, metadata) => metadatas.push(metadata)}
64
+ onReset={() => {}}
65
+ onAdd={() => {}}
66
+ />,
67
+ { width: 60, height: 8 },
68
+ );
69
+
70
+ await settle(setup);
71
+ await settle(setup);
72
+
73
+ await typeText(setup, "!");
74
+ expect(prompts.at(-1)).toBe("Ship it!");
75
+
76
+ setup.mockInput.pressKey("RETURN");
77
+ await settle(setup);
78
+ await typeText(setup, "X");
79
+ expect(metadatas.at(-1)).toBe("be terseX");
80
+
81
+ setup.renderer.destroy();
82
+ });
83
+ });