@in-the-loop-labs/pair-review 4.1.1 → 5.0.0

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 (70) hide show
  1. package/README.md +81 -13
  2. package/package.json +6 -2
  3. package/plugin/.claude-plugin/plugin.json +1 -1
  4. package/plugin-code-critic/.claude-plugin/plugin.json +1 -1
  5. package/plugin-pair-loop/.claude-plugin/plugin.json +1 -1
  6. package/plugin-pair-loop/skills/loop/SKILL.md +17 -8
  7. package/public/css/ai-summary-modal.css +1 -1
  8. package/public/css/analysis-config.css +33 -49
  9. package/public/css/council-card.css +118 -0
  10. package/public/css/council-dropdown.css +164 -0
  11. package/public/css/pr.css +666 -394
  12. package/public/css/repo-settings.css +15 -305
  13. package/public/css/settings.css +1141 -0
  14. package/public/css/snippet-manager.css +233 -0
  15. package/public/index.html +40 -59
  16. package/public/js/components/AIPanel.js +82 -16
  17. package/public/js/components/ChatPanel.js +401 -5
  18. package/public/js/components/CouncilCard.js +202 -0
  19. package/public/js/components/CouncilDropdown.js +292 -0
  20. package/public/js/components/DiffOptionsDropdown.js +177 -4
  21. package/public/js/components/SnippetManager.js +463 -0
  22. package/public/js/index.js +7 -30
  23. package/public/js/local.js +20 -2
  24. package/public/js/modules/comment-manager.js +8 -1
  25. package/public/js/modules/comment-minimizer.js +249 -190
  26. package/public/js/modules/external-comment-manager.js +414 -48
  27. package/public/js/modules/file-comment-manager.js +28 -21
  28. package/public/js/modules/hunk-summary-renderer.js +155 -29
  29. package/public/js/modules/pierre-bridge.js +2513 -0
  30. package/public/js/modules/pierre-context.js +345 -0
  31. package/public/js/modules/suggestion-manager.js +176 -20
  32. package/public/js/modules/tour-renderer.js +400 -184
  33. package/public/js/pr.js +1434 -150
  34. package/public/js/repo-settings.js +60 -284
  35. package/public/js/settings.js +1086 -0
  36. package/public/js/theme-bootstrap.js +40 -0
  37. package/public/js/theme.js +247 -0
  38. package/public/js/utils/provider-model.js +3 -3
  39. package/public/js/utils/suggestion-ui.js +157 -8
  40. package/public/local.html +20 -31
  41. package/public/pr.html +14 -23
  42. package/public/repo-settings.html +24 -14
  43. package/public/settings.html +138 -0
  44. package/public/setup.html +8 -13
  45. package/src/chat/api-reference.js +9 -5
  46. package/src/chat/prompt-builder.js +8 -1
  47. package/src/config.js +15 -6
  48. package/src/database.js +307 -14
  49. package/src/external/github-adapter.js +39 -5
  50. package/src/headless/delegate.js +682 -0
  51. package/src/local-review.js +10 -10
  52. package/src/local-scope.js +9 -0
  53. package/src/main.js +276 -157
  54. package/src/mcp-stdio.js +24 -1
  55. package/src/review-config.js +93 -25
  56. package/src/routes/chat.js +2 -2
  57. package/src/routes/config.js +12 -10
  58. package/src/routes/external-comments.js +5 -1
  59. package/src/routes/local.js +2 -4
  60. package/src/routes/mcp.js +18 -13
  61. package/src/routes/reviews.js +223 -4
  62. package/src/routes/settings.js +252 -0
  63. package/src/routes/setup.js +80 -1
  64. package/src/routes/shared.js +31 -29
  65. package/src/routes/snippets.js +154 -0
  66. package/src/routes/stack-analysis.js +17 -14
  67. package/src/server.js +86 -18
  68. package/src/settings/global-settings-service.js +472 -0
  69. package/src/settings/registry.js +624 -0
  70. package/src/utils/db-identity.js +44 -0
@@ -131,7 +131,7 @@ html, body {
131
131
  border-radius: 8px;
132
132
  color: var(--color-text-secondary);
133
133
  cursor: pointer;
134
- transition: all 0.15s ease;
134
+ transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
135
135
  }
136
136
 
137
137
  .theme-toggle:hover {
@@ -167,7 +167,7 @@ html, body {
167
167
  background: var(--color-bg-secondary);
168
168
  border: 1px solid var(--color-border-primary);
169
169
  border-radius: 6px;
170
- transition: all 0.15s ease;
170
+ transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
171
171
  }
172
172
 
173
173
  .back-to-pr:hover {
@@ -201,17 +201,11 @@ html, body {
201
201
  width: 56px;
202
202
  height: 56px;
203
203
  border-radius: 14px;
204
- background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
204
+ background: var(--ai-accent-flat, #d97706);
205
205
  color: white;
206
- box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
207
206
  flex-shrink: 0;
208
207
  }
209
208
 
210
- [data-theme="dark"] .page-header .header-icon {
211
- background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
212
- box-shadow: 0 4px 16px rgba(251, 191, 36, 0.2);
213
- }
214
-
215
209
  .header-text h1 {
216
210
  margin: 0 0 4px;
217
211
  font-size: 24px;
@@ -358,15 +352,11 @@ html, body {
358
352
 
359
353
  .settings-model-card-static:hover {
360
354
  transform: none;
361
- box-shadow:
362
- 0 0 0 3px rgba(245, 158, 11, 0.15),
363
- 0 4px 12px rgba(245, 158, 11, 0.1);
355
+ box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
364
356
  }
365
357
 
366
358
  [data-theme="dark"] .settings-model-card-static:hover {
367
- box-shadow:
368
- 0 0 0 3px rgba(251, 191, 36, 0.15),
369
- 0 4px 12px rgba(251, 191, 36, 0.08);
359
+ box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
370
360
  }
371
361
 
372
362
  /* Speech bubble arrow — points left toward the settings section */
@@ -402,123 +392,6 @@ html, body {
402
392
  display: none;
403
393
  }
404
394
 
405
- /* ============================================
406
- Council Card Preview (Council mode)
407
- ============================================ */
408
-
409
- .council-card {
410
- position: relative;
411
- pointer-events: none;
412
- width: 190px;
413
- padding: 14px 12px 12px;
414
- background: var(--color-bg-primary);
415
- border: 1px solid var(--color-border-primary);
416
- border-radius: 10px;
417
- box-shadow:
418
- 0 0 0 3px rgba(245, 158, 11, 0.15),
419
- 0 4px 12px rgba(245, 158, 11, 0.1);
420
- }
421
-
422
- [data-theme="dark"] .council-card {
423
- box-shadow:
424
- 0 0 0 3px rgba(251, 191, 36, 0.15),
425
- 0 4px 12px rgba(251, 191, 36, 0.08);
426
- }
427
-
428
- .council-card-name {
429
- font-size: 13px;
430
- font-weight: 600;
431
- color: var(--color-text-primary);
432
- margin-bottom: 2px;
433
- overflow: hidden;
434
- text-overflow: ellipsis;
435
- white-space: nowrap;
436
- }
437
-
438
- .council-card-summary {
439
- font-size: 11px;
440
- color: var(--color-text-muted);
441
- margin-bottom: 10px;
442
- }
443
-
444
- .council-card-reviewers {
445
- display: flex;
446
- flex-direction: column;
447
- gap: 4px;
448
- }
449
-
450
- .council-card-reviewer {
451
- display: flex;
452
- align-items: center;
453
- gap: 5px;
454
- font-size: 12px;
455
- color: var(--color-text-secondary);
456
- overflow: hidden;
457
- text-overflow: ellipsis;
458
- white-space: nowrap;
459
- }
460
-
461
- .council-card-reviewer-name {
462
- flex: 1;
463
- overflow: hidden;
464
- text-overflow: ellipsis;
465
- white-space: nowrap;
466
- }
467
-
468
- .council-card-tier {
469
- flex-shrink: 0;
470
- font-size: 10px;
471
- color: var(--color-text-muted);
472
- text-transform: capitalize;
473
- }
474
-
475
- .council-card-divider {
476
- border: none;
477
- border-top: 1px solid var(--color-border-primary);
478
- margin: 8px 0 6px;
479
- }
480
-
481
- .council-card-consolidation {
482
- font-size: 12px;
483
- color: var(--color-text-secondary);
484
- }
485
-
486
- .council-card-consolidation-label {
487
- font-size: 10px;
488
- text-transform: uppercase;
489
- letter-spacing: 0.04em;
490
- color: var(--color-text-muted);
491
- margin-bottom: 3px;
492
- }
493
-
494
- .council-card-level-header {
495
- font-size: 10px;
496
- text-transform: uppercase;
497
- letter-spacing: 0.04em;
498
- color: var(--color-text-muted);
499
- margin-top: 8px;
500
- margin-bottom: 3px;
501
- }
502
-
503
- .council-card-level-header:first-child {
504
- margin-top: 0;
505
- }
506
-
507
- .council-card-badge-advanced {
508
- display: inline-flex;
509
- padding: 1px 6px;
510
- font-size: 9px;
511
- font-weight: 600;
512
- border-radius: 8px;
513
- background: rgba(139, 92, 246, 0.12);
514
- color: #7c3aed;
515
- }
516
-
517
- [data-theme="dark"] .council-card-badge-advanced {
518
- background: rgba(139, 92, 246, 0.15);
519
- color: #a78bfa;
520
- }
521
-
522
395
  /* Speech bubble arrow — points left toward the settings section */
523
396
  .council-card::before {
524
397
  content: '';
@@ -555,7 +428,7 @@ html, body {
555
428
  font-weight: 500;
556
429
  color: var(--color-text-secondary);
557
430
  cursor: pointer;
558
- transition: all 0.2s ease;
431
+ transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
559
432
  }
560
433
 
561
434
  .mode-btn:hover:not(.selected) {
@@ -616,167 +489,6 @@ html, body {
616
489
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
617
490
  }
618
491
 
619
- /* ============================================
620
- Custom Dropdown (Council Selector)
621
- ============================================ */
622
-
623
- .custom-dropdown {
624
- position: relative;
625
- width: 100%;
626
- }
627
-
628
- .custom-dropdown-trigger {
629
- display: flex;
630
- align-items: center;
631
- width: 100%;
632
- padding: 10px 14px;
633
- padding-right: 36px;
634
- background: var(--color-bg-primary);
635
- border: 1px solid var(--color-border-primary);
636
- border-radius: 8px;
637
- font-family: inherit;
638
- font-size: 14px;
639
- color: var(--color-text-primary);
640
- cursor: pointer;
641
- transition: border-color 0.15s ease, box-shadow 0.15s ease;
642
- text-align: left;
643
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.22 4.22a.75.75 0 011.06 0L6 6.94l2.72-2.72a.75.75 0 111.06 1.06l-3.25 3.25a.75.75 0 01-1.06 0L2.22 5.28a.75.75 0 010-1.06z'/%3E%3C/svg%3E");
644
- background-repeat: no-repeat;
645
- background-position: right 12px center;
646
- }
647
-
648
- .custom-dropdown-trigger:hover {
649
- border-color: var(--color-border-secondary);
650
- }
651
-
652
- .custom-dropdown-trigger:focus {
653
- outline: none;
654
- border-color: #f59e0b;
655
- box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
656
- }
657
-
658
- [data-theme="dark"] .custom-dropdown-trigger:focus {
659
- border-color: #fbbf24;
660
- box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
661
- }
662
-
663
- .custom-dropdown.open .custom-dropdown-trigger {
664
- border-color: #f59e0b;
665
- box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
666
- border-bottom-left-radius: 0;
667
- border-bottom-right-radius: 0;
668
- }
669
-
670
- [data-theme="dark"] .custom-dropdown.open .custom-dropdown-trigger {
671
- border-color: #fbbf24;
672
- box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
673
- }
674
-
675
- .custom-dropdown-trigger .trigger-text {
676
- flex: 1;
677
- overflow: hidden;
678
- text-overflow: ellipsis;
679
- white-space: nowrap;
680
- }
681
-
682
- .custom-dropdown-trigger .trigger-text.placeholder {
683
- color: var(--color-text-tertiary);
684
- }
685
-
686
- .custom-dropdown-list {
687
- display: none;
688
- position: absolute;
689
- top: 100%;
690
- left: 0;
691
- right: 0;
692
- z-index: 50;
693
- max-height: 240px;
694
- overflow-y: auto;
695
- background: var(--color-bg-primary);
696
- border: 1px solid #f59e0b;
697
- border-top: none;
698
- border-bottom-left-radius: 8px;
699
- border-bottom-right-radius: 8px;
700
- box-shadow: 0 4px 12px var(--color-shadow);
701
- }
702
-
703
- [data-theme="dark"] .custom-dropdown-list {
704
- border-color: #fbbf24;
705
- }
706
-
707
- .custom-dropdown.open .custom-dropdown-list {
708
- display: block;
709
- }
710
-
711
- .custom-dropdown-option {
712
- display: flex;
713
- align-items: center;
714
- gap: 8px;
715
- padding: 10px 14px;
716
- cursor: pointer;
717
- font-size: 14px;
718
- color: var(--color-text-primary);
719
- transition: background-color 0.1s ease;
720
- }
721
-
722
- .custom-dropdown-option:hover,
723
- .custom-dropdown-option.focused {
724
- background: var(--color-bg-tertiary);
725
- }
726
-
727
- .custom-dropdown-option.selected {
728
- background: rgba(245, 158, 11, 0.08);
729
- font-weight: 500;
730
- }
731
-
732
- [data-theme="dark"] .custom-dropdown-option.selected {
733
- background: rgba(251, 191, 36, 0.1);
734
- }
735
-
736
- .custom-dropdown-option + .custom-dropdown-option {
737
- border-top: 1px solid var(--color-border-primary);
738
- }
739
-
740
- .custom-dropdown-option .option-name {
741
- flex: 1;
742
- overflow: hidden;
743
- text-overflow: ellipsis;
744
- white-space: nowrap;
745
- }
746
-
747
- /* Council type badges in dropdown */
748
- .council-type-badge {
749
- display: inline-flex;
750
- align-items: center;
751
- padding: 2px 7px;
752
- font-size: 10px;
753
- font-weight: 600;
754
- letter-spacing: 0.03em;
755
- border-radius: 10px;
756
- white-space: nowrap;
757
- flex-shrink: 0;
758
- }
759
-
760
- .council-type-badge.badge-standard {
761
- background: rgba(34, 197, 94, 0.12);
762
- color: #16a34a;
763
- }
764
-
765
- [data-theme="dark"] .council-type-badge.badge-standard {
766
- background: rgba(34, 197, 94, 0.15);
767
- color: #4ade80;
768
- }
769
-
770
- .council-type-badge.badge-advanced {
771
- background: rgba(139, 92, 246, 0.12);
772
- color: #7c3aed;
773
- }
774
-
775
- [data-theme="dark"] .council-type-badge.badge-advanced {
776
- background: rgba(139, 92, 246, 0.15);
777
- color: #a78bfa;
778
- }
779
-
780
492
  /* ============================================
781
493
  Instructions Textarea
782
494
  ============================================ */
@@ -1118,7 +830,7 @@ html, body {
1118
830
  border-radius: 6px;
1119
831
  color: var(--color-text-tertiary);
1120
832
  cursor: pointer;
1121
- transition: all 0.15s ease;
833
+ transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
1122
834
  }
1123
835
 
1124
836
  .worktree-delete-btn:hover {
@@ -1159,7 +871,7 @@ html, body {
1159
871
  font-weight: 500;
1160
872
  color: var(--color-danger);
1161
873
  cursor: pointer;
1162
- transition: all 0.15s ease;
874
+ transition: background-color 0.15s ease, color 0.15s ease;
1163
875
  }
1164
876
 
1165
877
  .worktree-delete-all-btn:hover {
@@ -1244,7 +956,7 @@ html, body {
1244
956
  font-weight: 500;
1245
957
  color: var(--color-danger);
1246
958
  cursor: pointer;
1247
- transition: all 0.15s ease;
959
+ transition: background-color 0.15s ease, color 0.15s ease;
1248
960
  }
1249
961
 
1250
962
  .btn-danger-outline:hover {
@@ -1323,7 +1035,7 @@ html, body {
1323
1035
  font-size: 14px;
1324
1036
  font-weight: 500;
1325
1037
  cursor: pointer;
1326
- transition: all 0.15s ease;
1038
+ transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
1327
1039
  border: none;
1328
1040
  }
1329
1041
 
@@ -1340,15 +1052,13 @@ html, body {
1340
1052
  }
1341
1053
 
1342
1054
  .btn-primary.btn-save {
1343
- background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
1055
+ background: var(--ai-accent-flat, #d97706);
1344
1056
  color: white;
1345
- box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
1346
1057
  }
1347
1058
 
1348
1059
  .btn-primary.btn-save:hover {
1349
- background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
1060
+ background: #f59e0b;
1350
1061
  transform: translateY(-1px);
1351
- box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
1352
1062
  }
1353
1063
 
1354
1064
  .btn-primary.btn-save:disabled {
@@ -1357,10 +1067,10 @@ html, body {
1357
1067
  transform: none;
1358
1068
  }
1359
1069
 
1070
+ /* Dark theme resolves --ai-accent-flat to the lighter #f59e0b, which needs
1071
+ dark text for contrast. Background comes from the token above. */
1360
1072
  [data-theme="dark"] .btn-primary.btn-save {
1361
- background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
1362
1073
  color: #1a1a1a;
1363
- box-shadow: 0 2px 12px rgba(251, 191, 36, 0.2);
1364
1074
  }
1365
1075
 
1366
1076
  /* ============================================
@@ -1432,7 +1142,7 @@ html, body {
1432
1142
  border-radius: 4px;
1433
1143
  color: var(--color-text-tertiary);
1434
1144
  cursor: pointer;
1435
- transition: all 0.15s ease;
1145
+ transition: background-color 0.15s ease, color 0.15s ease;
1436
1146
  }
1437
1147
 
1438
1148
  .toast-close:hover {