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

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 (71) 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 +668 -393
  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/diff-renderer.js +16 -4
  27. package/public/js/modules/external-comment-manager.js +414 -48
  28. package/public/js/modules/file-comment-manager.js +28 -21
  29. package/public/js/modules/hunk-summary-renderer.js +155 -29
  30. package/public/js/modules/pierre-bridge.js +2513 -0
  31. package/public/js/modules/pierre-context.js +345 -0
  32. package/public/js/modules/suggestion-manager.js +176 -20
  33. package/public/js/modules/tour-renderer.js +400 -184
  34. package/public/js/pr.js +1614 -158
  35. package/public/js/repo-settings.js +60 -284
  36. package/public/js/settings.js +1086 -0
  37. package/public/js/theme-bootstrap.js +40 -0
  38. package/public/js/theme.js +247 -0
  39. package/public/js/utils/provider-model.js +3 -3
  40. package/public/js/utils/suggestion-ui.js +157 -8
  41. package/public/local.html +20 -31
  42. package/public/pr.html +14 -23
  43. package/public/repo-settings.html +24 -14
  44. package/public/settings.html +138 -0
  45. package/public/setup.html +8 -13
  46. package/src/chat/api-reference.js +9 -5
  47. package/src/chat/prompt-builder.js +8 -1
  48. package/src/config.js +15 -6
  49. package/src/database.js +307 -14
  50. package/src/external/github-adapter.js +39 -5
  51. package/src/headless/delegate.js +682 -0
  52. package/src/local-review.js +10 -10
  53. package/src/local-scope.js +9 -0
  54. package/src/main.js +276 -157
  55. package/src/mcp-stdio.js +24 -1
  56. package/src/review-config.js +93 -25
  57. package/src/routes/chat.js +2 -2
  58. package/src/routes/config.js +12 -10
  59. package/src/routes/external-comments.js +5 -1
  60. package/src/routes/local.js +2 -4
  61. package/src/routes/mcp.js +18 -13
  62. package/src/routes/reviews.js +223 -4
  63. package/src/routes/settings.js +252 -0
  64. package/src/routes/setup.js +80 -1
  65. package/src/routes/shared.js +31 -29
  66. package/src/routes/snippets.js +154 -0
  67. package/src/routes/stack-analysis.js +17 -14
  68. package/src/server.js +86 -18
  69. package/src/settings/global-settings-service.js +472 -0
  70. package/src/settings/registry.js +624 -0
  71. package/src/utils/db-identity.js +44 -0
@@ -0,0 +1,1141 @@
1
+ /* ============================================
2
+ Global Settings Page Styles
3
+ (Mirrors repo-settings.css structure; inherits CSS variables from pr.css)
4
+ ============================================ */
5
+
6
+ :root {
7
+ /* Two-column layout: sidebar + content. Content column stays ~760px. */
8
+ --settings-max-width: 1000px;
9
+ --settings-sidebar-width: 210px;
10
+ /* Approx. height of the sticky top nav (12+12 padding + ~36 content + 1 border). */
11
+ --settings-header-h: 61px;
12
+ /* Offset applied to section scroll targets so headings clear the sticky header. */
13
+ --settings-scroll-offset: 80px;
14
+ }
15
+
16
+ /* Override global html/body styles from pr.css for the settings page.
17
+ The page scrolls as a whole (unlike the app-like PR view), so the root is the
18
+ scroller. Clip horizontal overflow on the root only: overflow on <html>
19
+ propagates to the viewport and does NOT break position: sticky. */
20
+ html {
21
+ height: auto;
22
+ min-height: 100%;
23
+ overflow-y: auto;
24
+ overflow-x: hidden;
25
+ margin: 0;
26
+ padding: 0;
27
+ background: var(--color-bg-primary);
28
+ }
29
+
30
+ /* Body must stay overflow: visible. Any non-visible overflow makes the body a
31
+ scroll/clip container, which becomes the containing block for the sticky
32
+ sidebar — and since the body is as tall as the content and never scrolls
33
+ internally (the viewport does), the sidebar would just scroll away with the
34
+ page. This overrides pr.css `html, body { overflow: hidden }`. */
35
+ body {
36
+ height: auto;
37
+ min-height: 100%;
38
+ overflow: visible;
39
+ margin: 0;
40
+ padding: 0;
41
+ background: var(--color-bg-primary);
42
+ }
43
+
44
+ .settings-page {
45
+ min-height: 100vh;
46
+ background: var(--color-bg-primary);
47
+ color: var(--color-text-primary);
48
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
49
+ line-height: 1.5;
50
+ padding-bottom: 48px;
51
+ }
52
+
53
+ /* ============================================
54
+ Navigation Bar
55
+ ============================================ */
56
+
57
+ .settings-nav {
58
+ position: sticky;
59
+ top: 0;
60
+ z-index: 100;
61
+ background: var(--color-bg-secondary);
62
+ border-bottom: 1px solid var(--color-border-primary);
63
+ backdrop-filter: blur(8px);
64
+ }
65
+
66
+ .nav-content {
67
+ margin: 0 auto;
68
+ padding: 12px 24px;
69
+ display: flex;
70
+ align-items: center;
71
+ gap: 24px;
72
+ }
73
+
74
+ .nav-logo {
75
+ display: flex;
76
+ align-items: center;
77
+ gap: 8px;
78
+ color: var(--color-text-primary);
79
+ text-decoration: none;
80
+ font-size: 16px;
81
+ transition: opacity 0.15s ease;
82
+ }
83
+
84
+ .nav-logo:hover {
85
+ opacity: 0.8;
86
+ }
87
+
88
+ .nav-logo svg {
89
+ color: #f59e0b;
90
+ }
91
+
92
+ .logo-text {
93
+ font-weight: 400;
94
+ }
95
+
96
+ .logo-text strong {
97
+ font-weight: 600;
98
+ }
99
+
100
+ .breadcrumb {
101
+ flex: 1;
102
+ max-width: none;
103
+ overflow: visible;
104
+ }
105
+
106
+ .breadcrumb ol {
107
+ list-style: none;
108
+ margin: 0;
109
+ padding: 0;
110
+ display: flex;
111
+ align-items: center;
112
+ gap: 4px;
113
+ font-size: 14px;
114
+ white-space: nowrap;
115
+ }
116
+
117
+ .breadcrumb li {
118
+ display: flex;
119
+ align-items: center;
120
+ }
121
+
122
+ .breadcrumb a {
123
+ color: var(--color-text-secondary);
124
+ text-decoration: none;
125
+ transition: color 0.15s ease;
126
+ }
127
+
128
+ .breadcrumb a:hover {
129
+ color: var(--color-accent-primary);
130
+ }
131
+
132
+ .breadcrumb .separator {
133
+ color: var(--color-text-muted);
134
+ }
135
+
136
+ .breadcrumb .current {
137
+ color: var(--color-text-primary);
138
+ font-weight: 500;
139
+ }
140
+
141
+ .theme-toggle {
142
+ display: flex;
143
+ align-items: center;
144
+ justify-content: center;
145
+ width: 36px;
146
+ height: 36px;
147
+ flex-shrink: 0;
148
+ background: var(--color-bg-tertiary);
149
+ border: 1px solid var(--color-border-primary);
150
+ border-radius: 8px;
151
+ color: var(--color-text-secondary);
152
+ cursor: pointer;
153
+ transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
154
+ }
155
+
156
+ .theme-toggle:hover {
157
+ background: var(--color-bg-primary);
158
+ color: var(--color-text-primary);
159
+ border-color: var(--color-border-secondary);
160
+ }
161
+
162
+ /* ============================================
163
+ Main Content Area
164
+ ============================================ */
165
+
166
+ .settings-main {
167
+ padding: 32px 24px;
168
+ }
169
+
170
+ .settings-container {
171
+ max-width: var(--settings-max-width);
172
+ margin: 0 auto;
173
+ }
174
+
175
+ /* ============================================
176
+ Two-column layout (section nav + content)
177
+ ============================================ */
178
+
179
+ .settings-layout {
180
+ display: grid;
181
+ grid-template-columns: var(--settings-sidebar-width) minmax(0, 1fr);
182
+ gap: 32px;
183
+ align-items: start;
184
+ }
185
+
186
+ /* Content column: min-width 0 so long code/paths can't force page overflow. */
187
+ .settings-content {
188
+ min-width: 0;
189
+ }
190
+
191
+ /* Sticky sidebar — usable from anywhere on the page. */
192
+ .settings-sidebar {
193
+ position: sticky;
194
+ top: calc(var(--settings-header-h) + 16px);
195
+ align-self: start;
196
+ max-height: calc(100vh - var(--settings-header-h) - 32px);
197
+ overflow-y: auto;
198
+ }
199
+
200
+ .settings-nav-list {
201
+ display: flex;
202
+ flex-direction: column;
203
+ gap: 2px;
204
+ border-left: 1px solid var(--color-border-primary);
205
+ }
206
+
207
+ .settings-nav-item {
208
+ display: block;
209
+ padding: 6px 12px;
210
+ margin-left: -1px;
211
+ border-left: 2px solid transparent;
212
+ font-size: 13px;
213
+ font-weight: 500;
214
+ color: var(--color-text-secondary);
215
+ text-decoration: none;
216
+ white-space: nowrap;
217
+ overflow: hidden;
218
+ text-overflow: ellipsis;
219
+ border-radius: 0 6px 6px 0;
220
+ transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
221
+ }
222
+
223
+ .settings-nav-item:hover {
224
+ color: var(--color-text-primary);
225
+ background: var(--color-bg-secondary);
226
+ }
227
+
228
+ .settings-nav-item.is-active {
229
+ color: #b45309;
230
+ border-left-color: #f59e0b;
231
+ background: rgba(245, 158, 11, 0.08);
232
+ font-weight: 600;
233
+ }
234
+
235
+ [data-theme="dark"] .settings-nav-item.is-active {
236
+ color: #fbbf24;
237
+ border-left-color: #fbbf24;
238
+ background: rgba(251, 191, 36, 0.1);
239
+ }
240
+
241
+ .settings-nav-item:focus-visible {
242
+ outline: none;
243
+ box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.4);
244
+ border-radius: 6px;
245
+ }
246
+
247
+ /* Page Header */
248
+ .page-header {
249
+ display: flex;
250
+ align-items: flex-start;
251
+ gap: 16px;
252
+ margin-bottom: 24px;
253
+ padding-bottom: 24px;
254
+ border-bottom: 1px solid var(--color-border-primary);
255
+ }
256
+
257
+ .page-header .header-icon {
258
+ display: flex;
259
+ align-items: center;
260
+ justify-content: center;
261
+ width: 56px;
262
+ height: 56px;
263
+ border-radius: 14px;
264
+ background: var(--ai-accent-flat, #d97706);
265
+ color: white;
266
+ flex-shrink: 0;
267
+ }
268
+
269
+ .header-text h1 {
270
+ margin: 0 0 4px;
271
+ font-size: 24px;
272
+ font-weight: 600;
273
+ color: var(--color-text-primary);
274
+ }
275
+
276
+ .header-subtitle {
277
+ margin: 0;
278
+ font-size: 14px;
279
+ color: var(--color-text-secondary);
280
+ max-width: 60ch;
281
+ }
282
+
283
+ /* Precedence explainer */
284
+ .settings-precedence-note {
285
+ display: flex;
286
+ align-items: flex-start;
287
+ gap: 8px;
288
+ margin-bottom: 28px;
289
+ padding: 12px 16px;
290
+ font-size: 13px;
291
+ line-height: 1.5;
292
+ color: var(--color-text-secondary);
293
+ background: var(--color-bg-secondary);
294
+ border: 1px solid var(--color-border-primary);
295
+ border-radius: 10px;
296
+ }
297
+
298
+ .settings-precedence-note svg {
299
+ flex-shrink: 0;
300
+ margin-top: 3px;
301
+ color: var(--color-text-muted);
302
+ }
303
+
304
+ .settings-precedence-note strong {
305
+ color: var(--color-text-primary);
306
+ font-weight: 600;
307
+ }
308
+
309
+ .settings-precedence-note .source-badge {
310
+ vertical-align: middle;
311
+ }
312
+
313
+ /* Loading / error */
314
+ .settings-loading,
315
+ .settings-error {
316
+ padding: 24px 0;
317
+ font-size: 14px;
318
+ color: var(--color-text-muted);
319
+ }
320
+
321
+ .settings-error {
322
+ color: var(--color-danger);
323
+ }
324
+
325
+ /* ============================================
326
+ Settings Sections
327
+ ============================================ */
328
+
329
+ .settings-section {
330
+ margin-bottom: 28px;
331
+ padding: 24px;
332
+ background: var(--color-bg-secondary);
333
+ border: 1px solid var(--color-border-primary);
334
+ border-radius: 12px;
335
+ /* Keep the heading clear of the sticky header when scrolled to. */
336
+ scroll-margin-top: var(--settings-scroll-offset);
337
+ }
338
+
339
+ .section-header {
340
+ margin-bottom: 8px;
341
+ }
342
+
343
+ .section-header h2 {
344
+ display: flex;
345
+ align-items: center;
346
+ gap: 10px;
347
+ margin: 0 0 6px;
348
+ font-size: 16px;
349
+ font-weight: 600;
350
+ color: var(--color-text-primary);
351
+ }
352
+
353
+ .section-description {
354
+ margin: 0;
355
+ font-size: 13px;
356
+ color: var(--color-text-secondary);
357
+ line-height: 1.5;
358
+ }
359
+
360
+ .settings-rows {
361
+ margin-top: 8px;
362
+ }
363
+
364
+ /* ============================================
365
+ Setting Row
366
+ ============================================ */
367
+
368
+ .setting-row {
369
+ display: flex;
370
+ align-items: flex-start;
371
+ justify-content: space-between;
372
+ gap: 20px;
373
+ padding: 16px 0;
374
+ border-top: 1px solid var(--color-border-primary);
375
+ }
376
+
377
+ .setting-row:first-child {
378
+ border-top: none;
379
+ }
380
+
381
+ .setting-info {
382
+ min-width: 0;
383
+ flex: 1;
384
+ }
385
+
386
+ .setting-label-row {
387
+ display: flex;
388
+ align-items: center;
389
+ gap: 10px;
390
+ flex-wrap: wrap;
391
+ }
392
+
393
+ .setting-label {
394
+ font-size: 14px;
395
+ font-weight: 500;
396
+ color: var(--color-text-primary);
397
+ }
398
+
399
+ .setting-description {
400
+ margin: 4px 0 0;
401
+ font-size: 13px;
402
+ color: var(--color-text-secondary);
403
+ line-height: 1.5;
404
+ max-width: 52ch;
405
+ }
406
+
407
+ .restart-note {
408
+ display: inline-flex;
409
+ align-items: center;
410
+ gap: 5px;
411
+ margin-top: 8px;
412
+ padding: 2px 8px;
413
+ font-size: 11px;
414
+ font-weight: 500;
415
+ border-radius: 8px;
416
+ background: var(--color-warning-bg, rgba(245, 158, 11, 0.1));
417
+ color: var(--color-warning-text, #b45309);
418
+ }
419
+
420
+ .restart-note[hidden] {
421
+ display: none;
422
+ }
423
+
424
+ .restart-note svg {
425
+ flex-shrink: 0;
426
+ }
427
+
428
+ [data-theme="dark"] .restart-note {
429
+ background: rgba(251, 191, 36, 0.12);
430
+ color: #fbbf24;
431
+ }
432
+
433
+ /* Control column */
434
+ .setting-control {
435
+ display: flex;
436
+ align-items: center;
437
+ gap: 10px;
438
+ flex-shrink: 0;
439
+ padding-top: 2px;
440
+ }
441
+
442
+ /* The "Default for Analysis" control stacks the dropdown over its composition
443
+ preview; top-align the reset button beside the (taller) stack. */
444
+ .setting-control:has(.council-control-wrap) {
445
+ align-items: flex-start;
446
+ }
447
+
448
+ .council-control-wrap {
449
+ display: flex;
450
+ flex-direction: column;
451
+ gap: 10px;
452
+ align-items: flex-start;
453
+ min-width: 240px;
454
+ }
455
+
456
+ .council-control-wrap .custom-dropdown {
457
+ width: 240px;
458
+ }
459
+
460
+ .council-preview {
461
+ width: 100%;
462
+ }
463
+
464
+ .council-preview-hint {
465
+ margin: 0;
466
+ font-size: 12px;
467
+ color: var(--color-text-tertiary);
468
+ }
469
+
470
+ /* ============================================
471
+ Source Badges
472
+ ============================================ */
473
+
474
+ .source-badge {
475
+ display: inline-flex;
476
+ align-items: center;
477
+ padding: 2px 8px;
478
+ font-size: 11px;
479
+ font-weight: 600;
480
+ letter-spacing: 0.02em;
481
+ border-radius: 10px;
482
+ white-space: nowrap;
483
+ border: 1px solid transparent;
484
+ }
485
+
486
+ /* default = "not explicitly set" — muted */
487
+ .source-badge--default {
488
+ background: var(--color-bg-tertiary);
489
+ color: var(--color-text-muted);
490
+ }
491
+
492
+ /* in-app override — accent */
493
+ .source-badge--app {
494
+ background: rgba(245, 158, 11, 0.12);
495
+ color: #b45309;
496
+ border-color: rgba(245, 158, 11, 0.25);
497
+ }
498
+
499
+ [data-theme="dark"] .source-badge--app {
500
+ background: rgba(251, 191, 36, 0.15);
501
+ color: #fbbf24;
502
+ border-color: rgba(251, 191, 36, 0.25);
503
+ }
504
+
505
+ /* environment variable */
506
+ .source-badge--env {
507
+ background: rgba(139, 92, 246, 0.12);
508
+ color: #7c3aed;
509
+ }
510
+
511
+ [data-theme="dark"] .source-badge--env {
512
+ background: rgba(139, 92, 246, 0.18);
513
+ color: #a78bfa;
514
+ }
515
+
516
+ /* config files (global or project) */
517
+ .source-badge--file {
518
+ background: rgba(14, 165, 233, 0.12);
519
+ color: #0284c7;
520
+ }
521
+
522
+ [data-theme="dark"] .source-badge--file {
523
+ background: rgba(56, 189, 248, 0.15);
524
+ color: #38bdf8;
525
+ }
526
+
527
+ /* managed config */
528
+ .source-badge--managed {
529
+ background: rgba(100, 116, 139, 0.14);
530
+ color: #475569;
531
+ }
532
+
533
+ [data-theme="dark"] .source-badge--managed {
534
+ background: rgba(148, 163, 184, 0.16);
535
+ color: #cbd5e1;
536
+ }
537
+
538
+ /* ============================================
539
+ Feature badges (new / beta) + final lock
540
+ ============================================ */
541
+
542
+ /* Small status pill shown in section headers, sidebar nav items, and per-
543
+ setting rows. Unknown badge strings reuse the beta styling. */
544
+ .feature-badge {
545
+ display: inline-flex;
546
+ align-items: center;
547
+ padding: 1px 7px;
548
+ font-size: 10px;
549
+ font-weight: 700;
550
+ letter-spacing: 0.04em;
551
+ text-transform: uppercase;
552
+ border-radius: 8px;
553
+ white-space: nowrap;
554
+ border: 1px solid transparent;
555
+ }
556
+
557
+ .feature-badge--new {
558
+ background: rgba(34, 197, 94, 0.14);
559
+ color: #16a34a;
560
+ border-color: rgba(34, 197, 94, 0.25);
561
+ }
562
+
563
+ [data-theme="dark"] .feature-badge--new {
564
+ background: rgba(34, 197, 94, 0.18);
565
+ color: #4ade80;
566
+ border-color: rgba(34, 197, 94, 0.3);
567
+ }
568
+
569
+ .feature-badge--beta {
570
+ background: rgba(139, 92, 246, 0.14);
571
+ color: #7c3aed;
572
+ border-color: rgba(139, 92, 246, 0.25);
573
+ }
574
+
575
+ [data-theme="dark"] .feature-badge--beta {
576
+ background: rgba(139, 92, 246, 0.2);
577
+ color: #a78bfa;
578
+ border-color: rgba(139, 92, 246, 0.3);
579
+ }
580
+
581
+ /* Spacing when a badge trails a nav-item label (the anchor is a block, so the
582
+ pill flows inline after the title). */
583
+ .settings-nav-item .feature-badge {
584
+ margin-left: 6px;
585
+ vertical-align: middle;
586
+ }
587
+
588
+ /* Lock pill next to the source badge on a config-finalized setting. */
589
+ .final-badge {
590
+ display: inline-flex;
591
+ align-items: center;
592
+ gap: 4px;
593
+ padding: 2px 8px;
594
+ font-size: 11px;
595
+ font-weight: 600;
596
+ letter-spacing: 0.02em;
597
+ border-radius: 10px;
598
+ white-space: nowrap;
599
+ background: rgba(100, 116, 139, 0.14);
600
+ color: #475569;
601
+ border: 1px solid rgba(100, 116, 139, 0.22);
602
+ }
603
+
604
+ [data-theme="dark"] .final-badge {
605
+ background: rgba(148, 163, 184, 0.16);
606
+ color: #cbd5e1;
607
+ border-color: rgba(148, 163, 184, 0.24);
608
+ }
609
+
610
+ .final-badge svg {
611
+ flex-shrink: 0;
612
+ }
613
+
614
+ /* ============================================
615
+ Controls
616
+ ============================================ */
617
+
618
+ .settings-input {
619
+ padding: 8px 12px;
620
+ min-width: 200px;
621
+ background: var(--color-bg-primary);
622
+ border: 1px solid var(--color-border-primary);
623
+ border-radius: 8px;
624
+ font-family: inherit;
625
+ font-size: 14px;
626
+ color: var(--color-text-primary);
627
+ transition: border-color 0.15s ease, box-shadow 0.15s ease;
628
+ }
629
+
630
+ .settings-input--number {
631
+ min-width: 100px;
632
+ width: 100px;
633
+ }
634
+
635
+ .settings-input::placeholder {
636
+ color: var(--color-text-tertiary);
637
+ }
638
+
639
+ .settings-input:focus {
640
+ outline: none;
641
+ border-color: #f59e0b;
642
+ box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
643
+ }
644
+
645
+ [data-theme="dark"] .settings-input:focus {
646
+ border-color: #fbbf24;
647
+ box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
648
+ }
649
+
650
+ .settings-select {
651
+ padding: 8px 12px;
652
+ min-width: 200px;
653
+ background: var(--color-bg-primary);
654
+ border: 1px solid var(--color-border-primary);
655
+ border-radius: 8px;
656
+ font-family: inherit;
657
+ font-size: 14px;
658
+ color: var(--color-text-primary);
659
+ cursor: pointer;
660
+ transition: border-color 0.15s ease, box-shadow 0.15s ease;
661
+ appearance: none;
662
+ 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");
663
+ background-repeat: no-repeat;
664
+ background-position: right 12px center;
665
+ padding-right: 34px;
666
+ }
667
+
668
+ .settings-select:focus {
669
+ outline: none;
670
+ border-color: #f59e0b;
671
+ box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
672
+ }
673
+
674
+ [data-theme="dark"] .settings-select:focus {
675
+ border-color: #fbbf24;
676
+ box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
677
+ }
678
+
679
+ /* Toggle (boolean) */
680
+ .toggle {
681
+ position: relative;
682
+ display: inline-flex;
683
+ align-items: center;
684
+ width: 40px;
685
+ height: 22px;
686
+ cursor: pointer;
687
+ flex-shrink: 0;
688
+ }
689
+
690
+ .toggle input {
691
+ position: absolute;
692
+ opacity: 0;
693
+ width: 0;
694
+ height: 0;
695
+ }
696
+
697
+ .toggle-slider {
698
+ position: absolute;
699
+ inset: 0;
700
+ background: var(--color-bg-tertiary);
701
+ border: 1px solid var(--color-border-primary);
702
+ border-radius: 22px;
703
+ transition: background 0.15s ease, border-color 0.15s ease;
704
+ }
705
+
706
+ .toggle-slider::before {
707
+ content: '';
708
+ position: absolute;
709
+ top: 2px;
710
+ left: 2px;
711
+ width: 16px;
712
+ height: 16px;
713
+ background: var(--color-text-tertiary);
714
+ border-radius: 50%;
715
+ transition: transform 0.15s ease, background 0.15s ease;
716
+ }
717
+
718
+ .toggle input:checked + .toggle-slider {
719
+ background: #f59e0b;
720
+ border-color: #f59e0b;
721
+ }
722
+
723
+ .toggle input:checked + .toggle-slider::before {
724
+ transform: translateX(18px);
725
+ background: white;
726
+ }
727
+
728
+ .toggle input:focus-visible + .toggle-slider {
729
+ box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
730
+ }
731
+
732
+ [data-theme="dark"] .toggle input:checked + .toggle-slider {
733
+ background: #fbbf24;
734
+ border-color: #fbbf24;
735
+ }
736
+
737
+ /* Disabled controls — used by config-finalized settings. */
738
+ .settings-input:disabled,
739
+ .settings-select:disabled {
740
+ opacity: 0.55;
741
+ cursor: not-allowed;
742
+ }
743
+
744
+ .toggle input:disabled + .toggle-slider {
745
+ opacity: 0.55;
746
+ cursor: not-allowed;
747
+ }
748
+
749
+ .toggle:has(input:disabled) {
750
+ cursor: not-allowed;
751
+ }
752
+
753
+ /* Read-only value display — deliberately styled as a plain code chip (no input
754
+ border, tinted background) so it never reads as an editable field like the
755
+ .settings-input / .settings-select controls in the other sections. */
756
+ .readonly-value {
757
+ display: inline-flex;
758
+ align-items: center;
759
+ padding: 3px 8px;
760
+ font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
761
+ font-size: 13px;
762
+ color: var(--color-text-tertiary);
763
+ background: var(--color-bg-tertiary);
764
+ border: none;
765
+ border-radius: 6px;
766
+ max-width: 320px;
767
+ overflow: hidden;
768
+ text-overflow: ellipsis;
769
+ white-space: nowrap;
770
+ }
771
+
772
+ .readonly-value--set {
773
+ color: var(--color-text-secondary);
774
+ }
775
+
776
+ /* Object read-only (providers / chat_providers / hooks / repos): an inline
777
+ collapsible showing the full contents. The summary is a code chip matching
778
+ .readonly-value; the expanded body is a scroll-capped <pre>. */
779
+ .readonly-object {
780
+ max-width: 360px;
781
+ font-size: 13px;
782
+ }
783
+
784
+ .readonly-object-summary {
785
+ display: inline-flex;
786
+ align-items: center;
787
+ gap: 6px;
788
+ padding: 3px 8px;
789
+ font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
790
+ color: var(--color-text-secondary);
791
+ background: var(--color-bg-tertiary);
792
+ border-radius: 6px;
793
+ cursor: pointer;
794
+ user-select: none;
795
+ list-style: none;
796
+ }
797
+
798
+ .readonly-object-summary::-webkit-details-marker {
799
+ display: none;
800
+ }
801
+
802
+ .readonly-object-summary::before {
803
+ content: '▸';
804
+ color: var(--color-text-tertiary);
805
+ font-size: 11px;
806
+ }
807
+
808
+ .readonly-object[open] > .readonly-object-summary::before {
809
+ content: '▾';
810
+ }
811
+
812
+ .readonly-object[open] > .readonly-object-summary {
813
+ margin-bottom: 6px;
814
+ }
815
+
816
+ .readonly-object-json {
817
+ margin: 0;
818
+ padding: 10px 12px;
819
+ max-height: 240px;
820
+ overflow: auto;
821
+ font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
822
+ font-size: 12px;
823
+ line-height: 1.5;
824
+ color: var(--color-text-primary);
825
+ background: var(--color-bg-secondary);
826
+ border: 1px solid var(--color-border-primary);
827
+ border-radius: 8px;
828
+ white-space: pre;
829
+ }
830
+
831
+ /* Reset button */
832
+ .reset-btn {
833
+ padding: 6px 12px;
834
+ font-size: 12px;
835
+ font-weight: 500;
836
+ color: var(--color-text-secondary);
837
+ background: transparent;
838
+ border: 1px solid var(--color-border-primary);
839
+ border-radius: 6px;
840
+ cursor: pointer;
841
+ transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
842
+ white-space: nowrap;
843
+ }
844
+
845
+ .reset-btn:hover {
846
+ color: var(--color-accent-primary);
847
+ border-color: var(--color-accent-primary);
848
+ background: rgba(245, 158, 11, 0.06);
849
+ }
850
+
851
+ .reset-btn[hidden] {
852
+ display: none;
853
+ }
854
+
855
+ /* ============================================
856
+ Repositories Section
857
+ ============================================ */
858
+
859
+ .repo-row {
860
+ display: flex;
861
+ align-items: center;
862
+ justify-content: space-between;
863
+ gap: 16px;
864
+ padding: 12px 14px;
865
+ margin-top: 8px;
866
+ text-decoration: none;
867
+ background: var(--color-bg-primary);
868
+ border: 1px solid var(--color-border-primary);
869
+ border-radius: 8px;
870
+ transition: border-color 0.15s ease, background-color 0.15s ease;
871
+ }
872
+
873
+ .repo-row:hover {
874
+ border-color: var(--color-accent-primary);
875
+ background: rgba(245, 158, 11, 0.04);
876
+ }
877
+
878
+ [data-theme="dark"] .repo-row:hover {
879
+ background: rgba(251, 191, 36, 0.06);
880
+ }
881
+
882
+ .repo-row-main {
883
+ display: flex;
884
+ flex-direction: column;
885
+ gap: 3px;
886
+ min-width: 0;
887
+ }
888
+
889
+ .repo-row-name {
890
+ font-size: 14px;
891
+ font-weight: 500;
892
+ color: var(--color-text-primary);
893
+ }
894
+
895
+ .repo-path {
896
+ font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
897
+ font-size: 11px;
898
+ color: var(--color-text-muted);
899
+ overflow: hidden;
900
+ text-overflow: ellipsis;
901
+ white-space: nowrap;
902
+ max-width: 420px;
903
+ }
904
+
905
+ .repo-row-badges {
906
+ display: flex;
907
+ align-items: center;
908
+ gap: 10px;
909
+ flex-shrink: 0;
910
+ }
911
+
912
+ .repo-source-hint {
913
+ font-size: 12px;
914
+ color: var(--color-text-muted);
915
+ }
916
+
917
+ .repo-badge {
918
+ display: inline-flex;
919
+ align-items: center;
920
+ padding: 2px 8px;
921
+ font-size: 11px;
922
+ font-weight: 600;
923
+ letter-spacing: 0.02em;
924
+ border-radius: 10px;
925
+ white-space: nowrap;
926
+ }
927
+
928
+ .repo-badge--configured {
929
+ background: rgba(34, 197, 94, 0.12);
930
+ color: #16a34a;
931
+ }
932
+
933
+ [data-theme="dark"] .repo-badge--configured {
934
+ background: rgba(34, 197, 94, 0.15);
935
+ color: #4ade80;
936
+ }
937
+
938
+ .repo-badge--known {
939
+ background: var(--color-bg-tertiary);
940
+ color: var(--color-text-muted);
941
+ }
942
+
943
+ .repos-empty {
944
+ padding: 20px 0 4px;
945
+ font-size: 14px;
946
+ color: var(--color-text-muted);
947
+ }
948
+
949
+ .repos-empty code {
950
+ background: var(--color-bg-tertiary);
951
+ padding: 2px 6px;
952
+ border-radius: 4px;
953
+ font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
954
+ font-size: 12px;
955
+ }
956
+
957
+ /* ============================================
958
+ Toast Notifications
959
+ ============================================ */
960
+
961
+ .toast-container {
962
+ position: fixed;
963
+ top: 24px;
964
+ right: 24px;
965
+ z-index: 1000;
966
+ display: flex;
967
+ flex-direction: column;
968
+ gap: 12px;
969
+ }
970
+
971
+ .toast {
972
+ display: flex;
973
+ align-items: center;
974
+ gap: 12px;
975
+ padding: 14px 18px;
976
+ background: var(--color-bg-elevated, var(--color-bg-secondary));
977
+ border: 1px solid var(--color-border-primary);
978
+ border-radius: 10px;
979
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
980
+ transform: translateX(120%);
981
+ transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
982
+ min-width: 260px;
983
+ }
984
+
985
+ .toast.show {
986
+ transform: translateX(0);
987
+ }
988
+
989
+ .toast-icon {
990
+ display: flex;
991
+ align-items: center;
992
+ justify-content: center;
993
+ width: 24px;
994
+ height: 24px;
995
+ border-radius: 50%;
996
+ flex-shrink: 0;
997
+ }
998
+
999
+ .toast.success .toast-icon {
1000
+ background: rgba(34, 197, 94, 0.15);
1001
+ color: #22c55e;
1002
+ }
1003
+
1004
+ .toast.error .toast-icon {
1005
+ background: rgba(239, 68, 68, 0.15);
1006
+ color: #ef4444;
1007
+ }
1008
+
1009
+ .toast-message {
1010
+ flex: 1;
1011
+ font-size: 14px;
1012
+ color: var(--color-text-primary);
1013
+ }
1014
+
1015
+ .toast-close {
1016
+ display: flex;
1017
+ align-items: center;
1018
+ justify-content: center;
1019
+ width: 24px;
1020
+ height: 24px;
1021
+ background: transparent;
1022
+ border: none;
1023
+ border-radius: 4px;
1024
+ color: var(--color-text-tertiary);
1025
+ cursor: pointer;
1026
+ transition: background-color 0.15s ease, color 0.15s ease;
1027
+ }
1028
+
1029
+ .toast-close:hover {
1030
+ background: var(--color-bg-tertiary);
1031
+ color: var(--color-text-secondary);
1032
+ }
1033
+
1034
+ /* ============================================
1035
+ Responsive
1036
+ ============================================ */
1037
+
1038
+ /* Below the two-column threshold, stack the section nav above the content as a
1039
+ sticky, horizontally scrollable chip bar. */
1040
+ @media (max-width: 940px) {
1041
+ .settings-layout {
1042
+ grid-template-columns: 1fr;
1043
+ gap: 16px;
1044
+ }
1045
+
1046
+ .settings-sidebar {
1047
+ position: sticky;
1048
+ top: var(--settings-header-h);
1049
+ z-index: 50;
1050
+ align-self: stretch;
1051
+ max-height: none;
1052
+ /* Horizontal scroll for overflowing chips; never the page. */
1053
+ overflow-x: auto;
1054
+ overflow-y: hidden;
1055
+ padding: 8px 0;
1056
+ background: var(--color-bg-primary);
1057
+ border-bottom: 1px solid var(--color-border-primary);
1058
+ -webkit-overflow-scrolling: touch;
1059
+ }
1060
+
1061
+ .settings-nav-list {
1062
+ flex-direction: row;
1063
+ gap: 6px;
1064
+ border-left: none;
1065
+ padding-bottom: 2px;
1066
+ }
1067
+
1068
+ .settings-nav-item {
1069
+ margin-left: 0;
1070
+ padding: 6px 12px;
1071
+ border-left: none;
1072
+ border: 1px solid var(--color-border-primary);
1073
+ border-radius: 999px;
1074
+ background: var(--color-bg-secondary);
1075
+ flex: 0 0 auto;
1076
+ }
1077
+
1078
+ .settings-nav-item.is-active {
1079
+ border-color: #f59e0b;
1080
+ border-left-color: #f59e0b;
1081
+ }
1082
+
1083
+ [data-theme="dark"] .settings-nav-item.is-active {
1084
+ border-color: #fbbf24;
1085
+ border-left-color: #fbbf24;
1086
+ }
1087
+
1088
+ /* Section targets must clear both the header and the sticky chip bar. */
1089
+ .settings-section {
1090
+ scroll-margin-top: calc(var(--settings-header-h) + 64px);
1091
+ }
1092
+ }
1093
+
1094
+ @media (max-width: 768px) {
1095
+ .nav-content {
1096
+ padding: 12px 16px;
1097
+ }
1098
+
1099
+ .breadcrumb {
1100
+ display: none;
1101
+ }
1102
+
1103
+ .settings-main {
1104
+ padding: 24px 16px;
1105
+ }
1106
+
1107
+ .page-header {
1108
+ flex-direction: column;
1109
+ align-items: flex-start;
1110
+ }
1111
+
1112
+ .settings-section {
1113
+ padding: 20px 16px;
1114
+ }
1115
+
1116
+ .setting-row {
1117
+ flex-direction: column;
1118
+ gap: 12px;
1119
+ }
1120
+
1121
+ .setting-control {
1122
+ width: 100%;
1123
+ }
1124
+
1125
+ .settings-input,
1126
+ .settings-select {
1127
+ flex: 1;
1128
+ min-width: 0;
1129
+ }
1130
+
1131
+ .repo-row {
1132
+ flex-direction: column;
1133
+ align-items: flex-start;
1134
+ gap: 8px;
1135
+ }
1136
+
1137
+ .repo-row-badges {
1138
+ width: 100%;
1139
+ justify-content: flex-start;
1140
+ }
1141
+ }