@rvagg/marginalia 0.1.1 → 0.2.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.
- package/README.md +20 -13
- package/dist/anchor.test.js +81 -0
- package/dist/anchor.test.js.map +1 -0
- package/dist/file-order.test.js +23 -0
- package/dist/file-order.test.js.map +1 -0
- package/dist/file-tree.test.js +18 -0
- package/dist/file-tree.test.js.map +1 -0
- package/dist/http.js +56 -10
- package/dist/http.js.map +1 -1
- package/dist/http.test.js +75 -1
- package/dist/http.test.js.map +1 -1
- package/dist/mcp.js +8 -2
- package/dist/mcp.js.map +1 -1
- package/dist/mcp.test.js +42 -0
- package/dist/mcp.test.js.map +1 -1
- package/dist/server.js +5 -1
- package/dist/server.js.map +1 -1
- package/dist/threads.js +35 -0
- package/dist/threads.js.map +1 -0
- package/dist/threads.test.js +27 -0
- package/dist/threads.test.js.map +1 -0
- package/marginalia.png +0 -0
- package/package.json +1 -1
- package/ui/anchor.d.ts +12 -0
- package/ui/anchor.js +80 -0
- package/ui/app.js +936 -314
- package/ui/diff2html-theme.css +55 -40
- package/ui/file-order.d.ts +4 -0
- package/ui/file-order.js +26 -0
- package/ui/file-tree.d.ts +6 -0
- package/ui/file-tree.js +32 -0
- package/ui/index.html +38 -17
- package/ui/style.css +404 -143
package/ui/style.css
CHANGED
|
@@ -8,12 +8,13 @@
|
|
|
8
8
|
--mg-border-light: #e8ecf0;
|
|
9
9
|
--mg-accent: #0969da;
|
|
10
10
|
--mg-text: #1f2328;
|
|
11
|
-
--mg-text-muted: #
|
|
11
|
+
--mg-text-muted: #59636e;
|
|
12
12
|
--mg-comment-bg: #f6f8fa;
|
|
13
13
|
--mg-comment-user: #0969da;
|
|
14
14
|
--mg-comment-assistant: #3fb950;
|
|
15
|
-
--mg-btn-primary: #
|
|
16
|
-
--mg-btn-primary-hover: #
|
|
15
|
+
--mg-btn-primary: #1f883d;
|
|
16
|
+
--mg-btn-primary-hover: #1c8139;
|
|
17
|
+
--mg-attention: #9a6700;
|
|
17
18
|
--mg-viewed-bg: #dafbe1;
|
|
18
19
|
--mg-viewed-border: #aceebb;
|
|
19
20
|
--mg-diff-del-line-bg: #ffebe9;
|
|
@@ -22,39 +23,81 @@
|
|
|
22
23
|
--mg-diff-ins-line-bg: #dafbe1;
|
|
23
24
|
--mg-diff-ins-gutter-bg: #aceebb;
|
|
24
25
|
--mg-diff-ins-word-bg: #aceebb;
|
|
25
|
-
--mg-diff-line-number-color:
|
|
26
|
+
--mg-diff-line-number-color: #59636e;
|
|
27
|
+
--mg-diff-changed-number-color: #1f2328;
|
|
28
|
+
--mg-diff-hunk-bg: #ddf4ff;
|
|
29
|
+
--mg-diff-hunk-gutter-bg: #b6e3ff;
|
|
26
30
|
--mg-diff-hunk-text: #59636e;
|
|
31
|
+
--mg-syntax-keyword: #cf222e;
|
|
32
|
+
--mg-syntax-function: #6639ba;
|
|
33
|
+
--mg-syntax-constant: #0550ae;
|
|
34
|
+
--mg-syntax-string: #0a3069;
|
|
35
|
+
--mg-syntax-variable: #953800;
|
|
36
|
+
--mg-syntax-comment: #59636e;
|
|
37
|
+
--mg-syntax-tag: #0550ae;
|
|
38
|
+
--mg-control-hover: rgba(129, 139, 152, 0.15);
|
|
39
|
+
--mg-btn-bg: #f6f8fa;
|
|
40
|
+
--mg-btn-hover-bg: #eff2f5;
|
|
41
|
+
--mg-btn-text: #25292e;
|
|
42
|
+
--mg-diffstat-add: #1a7f37;
|
|
43
|
+
--mg-diffstat-del: #d1242f;
|
|
44
|
+
--mg-diffstat-add-square: #1f883d;
|
|
45
|
+
--mg-diffstat-add-square-border: #1a7f37;
|
|
46
|
+
--mg-diffstat-del-square: #cf222e;
|
|
47
|
+
--mg-diffstat-neutral-square: rgba(129, 139, 152, 0.12);
|
|
27
48
|
--mg-permission-bg: #fff8c5;
|
|
28
49
|
--mg-permission-border: #d4a72c;
|
|
29
50
|
--mg-permission-text: #6f5200;
|
|
30
51
|
--mg-header-height: 40px;
|
|
31
52
|
--mg-footer-height: 44px;
|
|
53
|
+
--mg-sans: 'Mona Sans VF', -apple-system, system-ui, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
32
54
|
--mg-mono: 'Monaspace Neon', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
|
|
33
55
|
}
|
|
34
56
|
|
|
35
57
|
[data-theme="dark"] {
|
|
36
58
|
--mg-bg: #0d1117;
|
|
37
|
-
--mg-surface: #
|
|
38
|
-
--mg-border: #
|
|
59
|
+
--mg-surface: #151b23;
|
|
60
|
+
--mg-border: #3d444d;
|
|
39
61
|
--mg-border-light: #21262d;
|
|
40
|
-
--mg-accent: #
|
|
41
|
-
--mg-text: #
|
|
42
|
-
--mg-text-muted: #
|
|
62
|
+
--mg-accent: #4493f8;
|
|
63
|
+
--mg-text: #f0f6fc;
|
|
64
|
+
--mg-text-muted: #9198a1;
|
|
43
65
|
--mg-comment-bg: #161b22;
|
|
44
66
|
--mg-comment-user: #58a6ff;
|
|
45
67
|
--mg-comment-assistant: #3fb950;
|
|
46
68
|
--mg-btn-primary: #238636;
|
|
47
|
-
--mg-btn-primary-hover: #
|
|
69
|
+
--mg-btn-primary-hover: #29903b;
|
|
70
|
+
--mg-attention: #d29922;
|
|
48
71
|
--mg-viewed-bg: rgba(46, 160, 67, 0.15);
|
|
49
72
|
--mg-viewed-border: rgba(46, 160, 67, 0.4);
|
|
50
|
-
--mg-diff-del-line-bg: rgba(248, 81, 73, 0.
|
|
51
|
-
--mg-diff-del-gutter-bg: rgba(248, 81, 73, 0.
|
|
52
|
-
--mg-diff-del-word-bg: rgba(248, 81, 73, 0.
|
|
53
|
-
--mg-diff-ins-line-bg: rgba(46, 160, 67, 0.
|
|
54
|
-
--mg-diff-ins-gutter-bg: rgba(
|
|
55
|
-
--mg-diff-ins-word-bg: rgba(46, 160, 67, 0.
|
|
56
|
-
--mg-diff-line-number-color:
|
|
57
|
-
--mg-diff-
|
|
73
|
+
--mg-diff-del-line-bg: rgba(248, 81, 73, 0.1);
|
|
74
|
+
--mg-diff-del-gutter-bg: rgba(248, 81, 73, 0.3);
|
|
75
|
+
--mg-diff-del-word-bg: rgba(248, 81, 73, 0.4);
|
|
76
|
+
--mg-diff-ins-line-bg: rgba(46, 160, 67, 0.15);
|
|
77
|
+
--mg-diff-ins-gutter-bg: rgba(63, 185, 80, 0.3);
|
|
78
|
+
--mg-diff-ins-word-bg: rgba(46, 160, 67, 0.4);
|
|
79
|
+
--mg-diff-line-number-color: #9198a1;
|
|
80
|
+
--mg-diff-changed-number-color: #f0f6fc;
|
|
81
|
+
--mg-diff-hunk-bg: rgba(56, 139, 253, 0.1);
|
|
82
|
+
--mg-diff-hunk-gutter-bg: #0c2d6b;
|
|
83
|
+
--mg-diff-hunk-text: #9198a1;
|
|
84
|
+
--mg-syntax-keyword: #ff7b72;
|
|
85
|
+
--mg-syntax-function: #d2a8ff;
|
|
86
|
+
--mg-syntax-constant: #79c0ff;
|
|
87
|
+
--mg-syntax-string: #a5d6ff;
|
|
88
|
+
--mg-syntax-variable: #ffa657;
|
|
89
|
+
--mg-syntax-comment: #9198a1;
|
|
90
|
+
--mg-syntax-tag: #7ee787;
|
|
91
|
+
--mg-control-hover: rgba(101, 108, 118, 0.2);
|
|
92
|
+
--mg-btn-bg: #212830;
|
|
93
|
+
--mg-btn-hover-bg: #262c36;
|
|
94
|
+
--mg-btn-text: #f0f6fc;
|
|
95
|
+
--mg-diffstat-add: #3fb950;
|
|
96
|
+
--mg-diffstat-del: #f85149;
|
|
97
|
+
--mg-diffstat-add-square: #238636;
|
|
98
|
+
--mg-diffstat-add-square-border: #238636;
|
|
99
|
+
--mg-diffstat-del-square: #da3633;
|
|
100
|
+
--mg-diffstat-neutral-square: rgba(101, 108, 118, 0.2);
|
|
58
101
|
--mg-permission-bg: rgba(187, 128, 9, 0.15);
|
|
59
102
|
--mg-permission-border: #bb8009;
|
|
60
103
|
--mg-permission-text: #d29922;
|
|
@@ -67,7 +110,7 @@ html, body {
|
|
|
67
110
|
overflow: hidden;
|
|
68
111
|
background: var(--mg-bg);
|
|
69
112
|
color: var(--mg-text);
|
|
70
|
-
font-family:
|
|
113
|
+
font-family: var(--mg-sans);
|
|
71
114
|
font-size: 14px;
|
|
72
115
|
line-height: 1.5;
|
|
73
116
|
}
|
|
@@ -96,6 +139,8 @@ body { display: flex; flex-direction: column; }
|
|
|
96
139
|
|
|
97
140
|
#base { color: var(--mg-text-muted); user-select: none; }
|
|
98
141
|
#base-input {
|
|
142
|
+
max-width: 20ch;
|
|
143
|
+
text-overflow: ellipsis;
|
|
99
144
|
font-family: var(--mg-mono); font-size: 12px;
|
|
100
145
|
color: var(--mg-text); background: transparent;
|
|
101
146
|
border: 1px solid transparent; border-radius: 6px;
|
|
@@ -112,6 +157,19 @@ body { display: flex; flex-direction: column; }
|
|
|
112
157
|
#base-input.invalid { border-color: #cf222e; }
|
|
113
158
|
[data-theme="dark"] #base-input.invalid { border-color: #f85149; }
|
|
114
159
|
|
|
160
|
+
#comments-toggle {
|
|
161
|
+
display: inline-flex; align-items: center; gap: 4px;
|
|
162
|
+
height: 28px; padding: 0 8px;
|
|
163
|
+
font-family: inherit; font-size: 12px; font-weight: 600;
|
|
164
|
+
border: 1px solid var(--mg-border); border-radius: 6px;
|
|
165
|
+
background: var(--mg-btn-bg); color: var(--mg-text-muted);
|
|
166
|
+
cursor: pointer;
|
|
167
|
+
}
|
|
168
|
+
#comments-toggle:hover { background: var(--mg-btn-hover-bg); }
|
|
169
|
+
#comments-toggle[aria-pressed="true"], #minimize-toggle[aria-pressed="true"] { color: var(--mg-accent); background: var(--mg-control-hover); }
|
|
170
|
+
#comments-count { color: var(--mg-text); }
|
|
171
|
+
#comments-count:empty { display: none; }
|
|
172
|
+
|
|
115
173
|
#theme-toggle {
|
|
116
174
|
background: none; border: none; cursor: pointer;
|
|
117
175
|
color: var(--mg-text-muted); font-size: 16px; padding: 2px 4px;
|
|
@@ -119,48 +177,84 @@ body { display: flex; flex-direction: column; }
|
|
|
119
177
|
}
|
|
120
178
|
#theme-toggle:hover { color: var(--mg-text); }
|
|
121
179
|
|
|
180
|
+
/* Too long, the path loses its start rather than its end; bdi keeps the text left to right. */
|
|
181
|
+
#project-dir { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: rtl; text-align: left; }
|
|
182
|
+
#header > * { flex-shrink: 0; }
|
|
183
|
+
#header > #project-dir { flex-shrink: 1; }
|
|
184
|
+
|
|
185
|
+
/* A phone keeps the controls and the end of the project path. */
|
|
186
|
+
@media (max-width: 600px) {
|
|
187
|
+
#base-input { max-width: 10ch; }
|
|
188
|
+
#header { gap: 4px; padding: 0 8px; }
|
|
189
|
+
#header .brand, #header .sep, #header #status { display: none; }
|
|
190
|
+
#minimize-toggle { margin-left: auto; }
|
|
191
|
+
}
|
|
192
|
+
|
|
122
193
|
/* --- Diff container --- */
|
|
123
194
|
|
|
124
|
-
/* --- File
|
|
195
|
+
/* --- File tree --- */
|
|
125
196
|
|
|
126
|
-
#
|
|
127
|
-
flex
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
border-
|
|
131
|
-
background: var(--mg-
|
|
132
|
-
padding: 4px 0;
|
|
197
|
+
#file-tree {
|
|
198
|
+
flex: 0 0 296px;
|
|
199
|
+
display: flex; flex-direction: column;
|
|
200
|
+
min-height: 0;
|
|
201
|
+
border-right: 1px solid var(--mg-border);
|
|
202
|
+
background: var(--mg-bg);
|
|
133
203
|
}
|
|
204
|
+
#file-tree.hidden { display: none; }
|
|
134
205
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
padding: 3px 16px;
|
|
142
|
-
font-size: 14px;
|
|
143
|
-
font-family: inherit;
|
|
144
|
-
color: var(--mg-text);
|
|
145
|
-
cursor: pointer;
|
|
146
|
-
text-decoration: none;
|
|
206
|
+
.mg-tree-header { display: flex; align-items: center; gap: 4px; padding: 12px 16px 8px; font-size: 14px; }
|
|
207
|
+
.mg-tree-filter {
|
|
208
|
+
display: flex; align-items: center; gap: 6px;
|
|
209
|
+
margin: 0 16px 8px; padding: 0 8px; height: 32px;
|
|
210
|
+
border: 1px solid var(--mg-border); border-radius: 6px;
|
|
211
|
+
color: var(--mg-text-muted); background: var(--mg-bg);
|
|
147
212
|
}
|
|
148
|
-
|
|
149
|
-
.
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
.filenav-badge-deleted { background: rgba(248, 81, 73, 0.1); color: #cf222e; }
|
|
154
|
-
[data-theme="dark"] .filenav-badge-deleted { color: #f85149; }
|
|
155
|
-
.filenav-item.filenav-viewed { opacity: 0.5; }
|
|
156
|
-
|
|
157
|
-
#file-count {
|
|
158
|
-
background: none; border: none; cursor: pointer;
|
|
159
|
-
color: var(--mg-text); font-size: 14px; font-family: inherit; padding: 0;
|
|
213
|
+
.mg-tree-filter:focus-within { border-color: var(--mg-accent); box-shadow: inset 0 0 0 1px var(--mg-accent); }
|
|
214
|
+
.mg-tree-filter-icon { display: inline-flex; }
|
|
215
|
+
#tree-filter {
|
|
216
|
+
flex: 1; min-width: 0; border: none; outline: none; background: none;
|
|
217
|
+
font: inherit; font-size: 14px; color: var(--mg-text);
|
|
160
218
|
}
|
|
161
219
|
|
|
162
|
-
#
|
|
163
|
-
|
|
220
|
+
#tree-list { flex: 1; overflow-y: auto; list-style: none; padding: 0 8px 16px; }
|
|
221
|
+
.mg-tree-row {
|
|
222
|
+
position: relative;
|
|
223
|
+
display: flex; align-items: center; gap: 6px;
|
|
224
|
+
height: 32px; padding: 0 8px 0 calc(8px + var(--depth) * 16px);
|
|
225
|
+
border-radius: 6px;
|
|
226
|
+
font-size: 14px; color: var(--mg-text);
|
|
227
|
+
cursor: pointer; user-select: none;
|
|
228
|
+
}
|
|
229
|
+
.mg-tree-row:hover { background: var(--mg-control-hover); }
|
|
230
|
+
.mg-tree-file.active { background: var(--mg-control-hover); }
|
|
231
|
+
.mg-tree-file.active::before {
|
|
232
|
+
content: ''; position: absolute; left: -8px; top: 6px; bottom: 6px;
|
|
233
|
+
width: 4px; border-radius: 6px; background: var(--mg-accent);
|
|
234
|
+
}
|
|
235
|
+
.mg-tree-chevron { display: inline-flex; color: var(--mg-text-muted); transition: transform 0.1s; }
|
|
236
|
+
.mg-tree-dir[aria-expanded="false"] .mg-tree-chevron { transform: rotate(-90deg); }
|
|
237
|
+
.mg-tree-file .mg-tree-icon { margin-left: 22px; }
|
|
238
|
+
.mg-tree-icon { display: inline-flex; flex: none; color: var(--mg-text-muted); }
|
|
239
|
+
.mg-tree-dir .mg-tree-icon { color: #54aeff; }
|
|
240
|
+
[data-theme="dark"] .mg-tree-dir .mg-tree-icon { color: #4493f8; }
|
|
241
|
+
.mg-tree-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
242
|
+
.mg-tree-comments { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: var(--mg-text-muted); }
|
|
243
|
+
.mg-tree-comments svg { width: 14px; height: 14px; }
|
|
244
|
+
.mg-tree-status { display: inline-flex; flex: none; }
|
|
245
|
+
.mg-tree-added { color: var(--mg-diffstat-add); }
|
|
246
|
+
.mg-tree-deleted { color: var(--mg-diffstat-del); }
|
|
247
|
+
.mg-tree-changed, .mg-tree-moved { color: var(--mg-attention); }
|
|
248
|
+
.mg-tree-empty { padding: 16px; text-align: center; color: var(--mg-text-muted); }
|
|
249
|
+
|
|
250
|
+
@media (max-width: 1011px) {
|
|
251
|
+
#file-tree {
|
|
252
|
+
position: fixed; z-index: 5;
|
|
253
|
+
top: var(--mg-header-height); left: 0; bottom: var(--mg-footer-height);
|
|
254
|
+
width: min(320px, 100vw);
|
|
255
|
+
box-shadow: 8px 0 24px rgba(31, 35, 40, 0.12);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
164
258
|
|
|
165
259
|
/* --- Context snippets --- */
|
|
166
260
|
|
|
@@ -213,7 +307,8 @@ body { display: flex; flex-direction: column; }
|
|
|
213
307
|
|
|
214
308
|
/* --- Diff container --- */
|
|
215
309
|
|
|
216
|
-
#
|
|
310
|
+
#workspace { flex: 1; display: flex; min-height: 0; }
|
|
311
|
+
#diff-container { flex: 1; min-width: 0; overflow-y: auto; overflow-x: hidden; }
|
|
217
312
|
|
|
218
313
|
#loading-state, #empty-state {
|
|
219
314
|
display: flex;
|
|
@@ -246,7 +341,7 @@ body { display: flex; flex-direction: column; }
|
|
|
246
341
|
.d2h-diff-tbody tr .d2h-code-linenumber::after {
|
|
247
342
|
content: '+';
|
|
248
343
|
position: absolute;
|
|
249
|
-
right: -
|
|
344
|
+
right: -10px; top: 50%;
|
|
250
345
|
transform: translateY(-50%);
|
|
251
346
|
width: 20px; height: 20px; line-height: 20px;
|
|
252
347
|
text-align: center;
|
|
@@ -260,125 +355,299 @@ body { display: flex; flex-direction: column; }
|
|
|
260
355
|
z-index: 1;
|
|
261
356
|
}
|
|
262
357
|
|
|
263
|
-
.d2h-diff-tbody tr:hover .d2h-code-linenumber::after
|
|
358
|
+
.d2h-diff-tbody tr:hover .d2h-code-linenumber::after,
|
|
359
|
+
.d2h-diff-tbody tr.mg-range-edge .d2h-code-linenumber::after { opacity: 1; }
|
|
264
360
|
.d2h-diff-tbody tr.d2h-info:hover .d2h-code-linenumber::after { opacity: 0; }
|
|
265
|
-
.d2h-diff-tbody tr:hover .d2h-code-linenumber { background: rgba(9, 105, 218, 0.1) !important; }
|
|
266
|
-
.d2h-diff-tbody tr.d2h-info:hover .d2h-code-linenumber { background: inherit !important; }
|
|
267
361
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
362
|
+
/* Lines being commented on keep their colour and gain a bar under the +,
|
|
363
|
+
both centred on the border between line numbers and code, as on GitHub. */
|
|
364
|
+
.d2h-diff-tbody tr.mg-commenting td.d2h-code-linenumber::before,
|
|
365
|
+
.d2h-diff-tbody tr.mg-in-range td.d2h-code-linenumber::before {
|
|
366
|
+
content: '';
|
|
367
|
+
position: absolute;
|
|
368
|
+
top: 0; bottom: 0; right: -2px;
|
|
369
|
+
width: 4px;
|
|
370
|
+
background: var(--mg-accent);
|
|
371
|
+
z-index: 1;
|
|
271
372
|
}
|
|
272
373
|
|
|
273
|
-
/* ---
|
|
374
|
+
/* --- File header controls --- */
|
|
274
375
|
|
|
275
|
-
.mg-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
background: var(--mg-bg);
|
|
282
|
-
color: var(--mg-text-muted);
|
|
283
|
-
cursor: pointer;
|
|
284
|
-
user-select: none;
|
|
376
|
+
.mg-icon-btn {
|
|
377
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
378
|
+
width: 28px; height: 28px; padding: 0;
|
|
379
|
+
border: 1px solid transparent; border-radius: 6px;
|
|
380
|
+
background: transparent; color: var(--mg-text-muted);
|
|
381
|
+
cursor: pointer; user-select: none;
|
|
285
382
|
}
|
|
383
|
+
.mg-icon-btn:hover { background: var(--mg-control-hover); }
|
|
384
|
+
.mg-chevron svg { transition: transform 0.1s; }
|
|
385
|
+
.mg-chevron[aria-expanded="false"] svg { transform: rotate(-90deg); }
|
|
386
|
+
.mg-copy-path { margin-left: 4px; }
|
|
387
|
+
.mg-copy-path.mg-copied { color: var(--mg-btn-primary); }
|
|
388
|
+
|
|
389
|
+
.mg-diffstat { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 12px; font-weight: 600; }
|
|
390
|
+
.mg-diffstat-add { color: var(--mg-diffstat-add); }
|
|
391
|
+
.mg-diffstat-del { color: var(--mg-diffstat-del); }
|
|
392
|
+
.mg-diffstat-bar { display: inline-flex; gap: 1px; margin-left: 2px; }
|
|
393
|
+
.mg-diffstat-bar span { width: 8px; height: 8px; box-sizing: border-box; border-radius: 2px; border: 1px solid; }
|
|
394
|
+
.mg-diffstat-bar .mg-diffstat-add-square { background: var(--mg-diffstat-add-square); border-color: var(--mg-diffstat-add-square-border); }
|
|
395
|
+
.mg-diffstat-bar .mg-diffstat-del-square { background: var(--mg-diffstat-del-square); border-color: var(--mg-diffstat-del-square); }
|
|
396
|
+
.mg-diffstat-bar .mg-diffstat-neutral-square { background: var(--mg-diffstat-neutral-square); border-color: var(--mg-border); }
|
|
286
397
|
|
|
287
|
-
.mg-viewed-toggle
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
background: transparent;
|
|
295
|
-
color: var(--mg-text-muted);
|
|
296
|
-
cursor: pointer;
|
|
297
|
-
user-select: none;
|
|
298
|
-
margin-left: 6px;
|
|
299
|
-
display: inline-flex;
|
|
300
|
-
align-items: center;
|
|
398
|
+
.mg-viewed-toggle {
|
|
399
|
+
display: inline-flex; align-items: center; gap: 4px;
|
|
400
|
+
height: 28px; margin-left: 8px; padding: 0 8px;
|
|
401
|
+
font-family: inherit; font-size: 12px; font-weight: 500;
|
|
402
|
+
border: 1px solid var(--mg-border); border-radius: 6px;
|
|
403
|
+
background: var(--mg-btn-bg); color: var(--mg-btn-text);
|
|
404
|
+
cursor: pointer; user-select: none;
|
|
301
405
|
}
|
|
406
|
+
.mg-viewed-toggle svg { color: var(--mg-text-muted); }
|
|
407
|
+
.mg-viewed-toggle:hover { background: var(--mg-btn-hover-bg); }
|
|
408
|
+
.mg-viewed-toggle.viewed, .mg-viewed-toggle.viewed svg { color: var(--mg-accent); }
|
|
409
|
+
.mg-file-comment { margin-left: 8px; }
|
|
302
410
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
.mg-copy-path {
|
|
306
|
-
padding: 3px 6px;
|
|
307
|
-
border-radius: 6px;
|
|
308
|
-
border: 1px solid transparent;
|
|
309
|
-
background: transparent;
|
|
310
|
-
color: var(--mg-text-muted);
|
|
311
|
-
cursor: pointer;
|
|
312
|
-
user-select: none;
|
|
313
|
-
display: inline-flex;
|
|
314
|
-
align-items: center;
|
|
315
|
-
margin-left: 6px;
|
|
411
|
+
@media (max-width: 600px) {
|
|
412
|
+
.mg-diffstat-bar, .mg-viewed-toggle span { display: none; }
|
|
316
413
|
}
|
|
317
414
|
|
|
318
|
-
|
|
319
|
-
.mg-copy-path.mg-copied { color: var(--mg-comment-assistant); }
|
|
320
|
-
|
|
321
|
-
/* --- Inline comments --- */
|
|
415
|
+
/* --- Comment rows and thread cards --- */
|
|
322
416
|
|
|
323
|
-
.comment-
|
|
417
|
+
.mg-comment-row > td {
|
|
324
418
|
padding: 0 !important;
|
|
325
|
-
background: var(--mg-bg) !important;
|
|
326
419
|
border: none !important;
|
|
420
|
+
background: var(--mg-bg) !important;
|
|
327
421
|
}
|
|
422
|
+
.mg-comment-row > td.mg-row-gutter-ins { background: var(--mg-diff-ins-gutter-bg) !important; }
|
|
423
|
+
.mg-comment-row > td.mg-row-gutter-del { background: var(--mg-diff-del-gutter-bg) !important; }
|
|
328
424
|
|
|
329
|
-
.
|
|
330
|
-
|
|
425
|
+
.mg-thread {
|
|
426
|
+
max-width: 760px;
|
|
427
|
+
margin: 4px 16px 8px 6px;
|
|
428
|
+
background: var(--mg-bg);
|
|
331
429
|
border: 1px solid var(--mg-border);
|
|
332
430
|
border-radius: 6px;
|
|
333
|
-
|
|
334
|
-
|
|
431
|
+
box-shadow: 0 1px 1px rgba(31, 35, 40, 0.04);
|
|
432
|
+
font-family: var(--mg-sans); font-size: 14px; line-height: 1.5;
|
|
433
|
+
color: var(--mg-text);
|
|
434
|
+
white-space: normal;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.mg-thread-header {
|
|
438
|
+
display: flex; align-items: center; gap: 4px;
|
|
439
|
+
min-height: 36px; padding: 0 8px 0 4px;
|
|
440
|
+
font-size: 12px; color: var(--mg-text-muted);
|
|
441
|
+
}
|
|
442
|
+
.mg-thread-header strong { color: var(--mg-text); font-weight: 500; }
|
|
443
|
+
.mg-thread-minimize { margin-left: auto; }
|
|
444
|
+
.mg-label + .mg-thread-minimize { margin-left: 0; }
|
|
445
|
+
.mg-comment-form .mg-thread-header { padding-left: 12px; }
|
|
446
|
+
.mg-thread-body { border-top: 1px solid var(--mg-border); }
|
|
447
|
+
.mg-thread-collapsed .mg-thread-body, .mg-thread-collapsed .mg-thread-footer { display: none; }
|
|
448
|
+
|
|
449
|
+
.mg-label {
|
|
450
|
+
display: inline-block;
|
|
451
|
+
margin-left: 4px; padding: 0 7px;
|
|
452
|
+
font-size: 12px; font-weight: 500; line-height: 18px;
|
|
453
|
+
border: 1px solid var(--mg-border); border-radius: 2em;
|
|
454
|
+
color: var(--mg-text-muted);
|
|
455
|
+
}
|
|
456
|
+
.mg-label-outdated { color: var(--mg-attention); border-color: var(--mg-attention); }
|
|
457
|
+
|
|
458
|
+
.mg-thread-code {
|
|
459
|
+
margin: 0; padding: 4px 12px;
|
|
460
|
+
font-family: var(--mg-mono); font-size: 12px; line-height: 20px;
|
|
461
|
+
white-space: pre-wrap; overflow-wrap: anywhere;
|
|
462
|
+
background: var(--mg-surface); border-bottom: 1px solid var(--mg-border);
|
|
463
|
+
}
|
|
464
|
+
.mg-thread-code span { display: inline-block; min-width: 32px; color: var(--mg-text-muted); }
|
|
465
|
+
|
|
466
|
+
.mg-comment { padding: 12px 12px 8px; }
|
|
467
|
+
.mg-comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
|
|
468
|
+
.mg-comment-header strong { font-weight: 500; }
|
|
469
|
+
.mg-time { font-size: 12px; color: var(--mg-text-muted); }
|
|
470
|
+
.mg-avatar {
|
|
471
|
+
display: inline-flex; align-items: center; justify-content: center; flex: none;
|
|
472
|
+
width: 24px; height: 24px; border-radius: 50%;
|
|
473
|
+
font-size: 11px; font-weight: 600; color: #fff;
|
|
474
|
+
background: var(--mg-comment-user);
|
|
475
|
+
}
|
|
476
|
+
.mg-avatar-assistant { background: var(--mg-comment-assistant); }
|
|
477
|
+
.mg-comment-ephemeral { opacity: 0.6; font-style: italic; }
|
|
478
|
+
|
|
479
|
+
.mg-thread-reply { padding: 0 8px 8px; }
|
|
480
|
+
.mg-reply-trigger {
|
|
481
|
+
width: 100%; height: 32px; padding: 0 12px;
|
|
482
|
+
text-align: left; font-family: inherit; font-size: 14px;
|
|
483
|
+
border: 1px solid var(--mg-border); border-radius: 6px;
|
|
484
|
+
background: var(--mg-bg); color: var(--mg-text-muted);
|
|
485
|
+
cursor: text;
|
|
486
|
+
}
|
|
487
|
+
.mg-thread-footer { display: flex; gap: 8px; padding: 8px; border-top: 1px solid var(--mg-border); }
|
|
488
|
+
|
|
489
|
+
.mg-form-body { padding: 8px; }
|
|
490
|
+
.mg-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
|
|
491
|
+
.mg-tab {
|
|
492
|
+
height: 32px; padding: 0 12px;
|
|
493
|
+
font-family: inherit; font-size: 14px; font-weight: 500;
|
|
494
|
+
border: 1px solid transparent; border-radius: 6px;
|
|
495
|
+
background: none; color: var(--mg-text-muted);
|
|
496
|
+
cursor: pointer;
|
|
335
497
|
}
|
|
498
|
+
.mg-tab.selected { color: var(--mg-text); background: var(--mg-btn-bg); border-color: var(--mg-border); }
|
|
499
|
+
.mg-preview { min-height: 98px; padding: 8px 10px; border: 1px solid var(--mg-border); border-radius: 6px; }
|
|
500
|
+
.mg-preview.hidden, .mg-textarea.hidden { display: none; }
|
|
336
501
|
|
|
337
|
-
.comment-input-context { font-size: 12px; color: var(--mg-text-muted); margin-bottom: 6px; font-family: var(--mg-mono); }
|
|
338
502
|
.mg-textarea {
|
|
339
|
-
width: 100%;
|
|
503
|
+
display: block; width: 100%; box-sizing: border-box;
|
|
340
504
|
background: var(--mg-bg); color: var(--mg-text);
|
|
341
505
|
border: 1px solid var(--mg-border); border-radius: 6px;
|
|
342
506
|
padding: 8px 10px;
|
|
343
|
-
font-family: inherit; font-size:
|
|
507
|
+
font-family: inherit; font-size: 14px; line-height: 1.5;
|
|
344
508
|
resize: vertical; outline: none;
|
|
345
509
|
}
|
|
346
|
-
.mg-textarea:focus { border-color: var(--mg-accent); box-shadow: 0 0 0
|
|
347
|
-
.comment-input-actions { display: flex; gap:
|
|
510
|
+
.mg-textarea:focus { border-color: var(--mg-accent); box-shadow: inset 0 0 0 1px var(--mg-accent); }
|
|
511
|
+
.comment-input-actions { display: flex; gap: 8px; margin-top: 8px; justify-content: flex-end; }
|
|
512
|
+
|
|
513
|
+
.mg-btn {
|
|
514
|
+
height: 32px; padding: 0 12px;
|
|
515
|
+
font-family: inherit; font-size: 14px; font-weight: 500;
|
|
516
|
+
border: 1px solid var(--mg-border); border-radius: 6px;
|
|
517
|
+
background: var(--mg-btn-bg); color: var(--mg-btn-text);
|
|
518
|
+
cursor: pointer; white-space: nowrap;
|
|
519
|
+
}
|
|
520
|
+
.mg-btn:hover { background: var(--mg-btn-hover-bg); }
|
|
521
|
+
.mg-btn-primary { background: var(--mg-btn-primary); border-color: rgba(31, 35, 40, 0.15); color: #fff; }
|
|
522
|
+
.mg-btn-primary:hover { background: var(--mg-btn-primary-hover); }
|
|
348
523
|
|
|
349
|
-
.comment-message { padding: 2px 0; line-height: 1.3; font-size: 13px; }
|
|
350
|
-
.comment-message + .comment-message { margin-top: 3px; padding-top: 4px; border-top: 1px solid var(--mg-border-light); }
|
|
351
|
-
.comment-user > strong { color: var(--mg-comment-user); font-size: 12px; }
|
|
352
|
-
.comment-assistant > strong { color: var(--mg-comment-assistant); font-size: 12px; }
|
|
353
524
|
.comment-dismiss {
|
|
354
525
|
float: right;
|
|
355
526
|
background: none; border: none; cursor: pointer;
|
|
356
527
|
color: var(--mg-text-muted); font-size: 16px; line-height: 1;
|
|
357
528
|
padding: 0 2px;
|
|
358
529
|
}
|
|
359
|
-
|
|
360
530
|
.comment-dismiss:hover { color: var(--mg-text); }
|
|
361
531
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
532
|
+
/* --- Markdown --- */
|
|
533
|
+
|
|
534
|
+
/* Comment bodies, after GitHub's markdown-body. */
|
|
535
|
+
.mg-md { font-size: 14px; line-height: 1.5; color: var(--mg-text); overflow-wrap: break-word; }
|
|
536
|
+
.mg-md > :first-child { margin-top: 0; }
|
|
537
|
+
.mg-md > :last-child { margin-bottom: 0; }
|
|
538
|
+
.mg-md p, .mg-md ul, .mg-md ol, .mg-md blockquote, .mg-md pre, .mg-md table, .mg-md details { margin: 0 0 16px; }
|
|
539
|
+
.mg-md h1, .mg-md h2, .mg-md h3, .mg-md h4, .mg-md h5, .mg-md h6 { margin: 24px 0 16px; font-weight: 600; line-height: 1.25; }
|
|
540
|
+
.mg-md h1 { font-size: 2em; padding-bottom: 0.3em; border-bottom: 1px solid var(--mg-border-light); }
|
|
541
|
+
.mg-md h2 { font-size: 1.5em; padding-bottom: 0.3em; border-bottom: 1px solid var(--mg-border-light); }
|
|
542
|
+
.mg-md h3 { font-size: 1.25em; }
|
|
543
|
+
.mg-md h4 { font-size: 1em; }
|
|
544
|
+
.mg-md h5 { font-size: 0.875em; }
|
|
545
|
+
.mg-md h6 { font-size: 0.85em; color: var(--mg-text-muted); }
|
|
546
|
+
.mg-md strong { font-weight: 600; }
|
|
547
|
+
.mg-md a { color: var(--mg-accent); text-decoration: underline; text-underline-offset: 0.2rem; }
|
|
548
|
+
.mg-md ul, .mg-md ol { padding-left: 2em; }
|
|
549
|
+
.mg-md ul ul, .mg-md ul ol, .mg-md ol ol, .mg-md ol ul { margin: 0; }
|
|
550
|
+
.mg-md li + li, .mg-md li > p { margin-top: 0.25em; }
|
|
551
|
+
.mg-md li:has(> input[type="checkbox"]) { list-style: none; }
|
|
552
|
+
.mg-md li > input[type="checkbox"] { margin: 0 0.2em 0.25em -1.4em; vertical-align: middle; }
|
|
553
|
+
.mg-md blockquote { padding: 0 1em; color: var(--mg-text-muted); border-left: 0.25em solid var(--mg-border); }
|
|
554
|
+
.mg-md hr { height: 0.25em; margin: 24px 0; border: 0; background: var(--mg-border); }
|
|
555
|
+
.mg-md code {
|
|
556
|
+
padding: 0.2em 0.4em; border-radius: 6px;
|
|
557
|
+
font-family: var(--mg-mono); font-size: 85%; white-space: break-spaces;
|
|
558
|
+
background: var(--mg-control-hover);
|
|
365
559
|
}
|
|
560
|
+
.mg-md pre {
|
|
561
|
+
padding: 16px; border-radius: 6px; overflow: auto;
|
|
562
|
+
font-size: 85%; line-height: 1.45;
|
|
563
|
+
background: var(--mg-surface);
|
|
564
|
+
}
|
|
565
|
+
.mg-md pre code { padding: 0; font-size: 100%; white-space: pre; background: transparent; }
|
|
566
|
+
.mg-md table { display: block; width: max-content; max-width: 100%; overflow: auto; border-collapse: collapse; }
|
|
567
|
+
.mg-md th, .mg-md td { padding: 6px 13px; border: 1px solid var(--mg-border); }
|
|
568
|
+
.mg-md th { font-weight: 600; }
|
|
569
|
+
.mg-md tr:nth-child(2n) { background: var(--mg-surface); }
|
|
570
|
+
.mg-md img { max-width: 100%; }
|
|
571
|
+
|
|
572
|
+
/* --- Comments panel --- */
|
|
573
|
+
|
|
574
|
+
#comments-panel {
|
|
575
|
+
flex: 0 0 480px;
|
|
576
|
+
display: flex; flex-direction: column;
|
|
577
|
+
overflow-y: auto;
|
|
578
|
+
border-left: 1px solid var(--mg-border);
|
|
579
|
+
background: var(--mg-bg);
|
|
580
|
+
}
|
|
581
|
+
#comments-panel.hidden { display: none; }
|
|
366
582
|
|
|
583
|
+
.mg-panel-header {
|
|
584
|
+
position: sticky; top: 0; z-index: 1;
|
|
585
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
586
|
+
padding: 8px 8px 8px 16px;
|
|
587
|
+
background: var(--mg-bg);
|
|
588
|
+
}
|
|
367
589
|
|
|
590
|
+
.mg-panel-tabs {
|
|
591
|
+
display: inline-flex; align-self: flex-start;
|
|
592
|
+
margin: 0 16px; padding: 2px;
|
|
593
|
+
background: var(--mg-control-hover); border-radius: 6px;
|
|
594
|
+
}
|
|
595
|
+
.mg-segment {
|
|
596
|
+
height: 28px; padding: 0 12px;
|
|
597
|
+
font-family: inherit; font-size: 14px; font-weight: 500;
|
|
598
|
+
border: 1px solid transparent; border-radius: 6px;
|
|
599
|
+
background: none; color: var(--mg-text-muted);
|
|
600
|
+
cursor: pointer;
|
|
601
|
+
}
|
|
602
|
+
.mg-segment.selected { background: var(--mg-bg); border-color: var(--mg-border); color: var(--mg-text); font-weight: 600; }
|
|
603
|
+
.mg-counter { margin-left: 4px; padding: 0 6px; border-radius: 2em; font-size: 12px; background: var(--mg-control-hover); }
|
|
604
|
+
|
|
605
|
+
.mg-panel-summary { padding: 12px 16px; text-align: center; font-size: 12px; color: var(--mg-text-muted); }
|
|
606
|
+
.mg-panel-summary:empty { display: none; }
|
|
607
|
+
#comments-list { display: flex; flex-direction: column; gap: 12px; padding: 0 16px 16px; }
|
|
608
|
+
#comments-list .mg-thread { margin: 0; max-width: none; }
|
|
609
|
+
.mg-panel-empty { padding: 24px; text-align: center; color: var(--mg-text-muted); }
|
|
610
|
+
|
|
611
|
+
.mg-thread-title { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
|
|
612
|
+
.mg-thread-file {
|
|
613
|
+
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
614
|
+
padding: 0; border: none; background: none; cursor: pointer;
|
|
615
|
+
font-family: var(--mg-mono); font-size: 12px; color: var(--mg-text);
|
|
616
|
+
}
|
|
617
|
+
.mg-thread-file:hover { color: var(--mg-accent); text-decoration: underline; }
|
|
618
|
+
|
|
619
|
+
/* The diff keeps the room: where the tree and panel together would squeeze
|
|
620
|
+
it, the panel slides over the diff instead. */
|
|
621
|
+
@media (max-width: 1000px) {
|
|
622
|
+
#comments-panel {
|
|
623
|
+
position: fixed; z-index: 5;
|
|
624
|
+
top: var(--mg-header-height); right: 0; bottom: var(--mg-footer-height);
|
|
625
|
+
width: min(480px, 100vw);
|
|
626
|
+
box-shadow: -8px 0 24px rgba(31, 35, 40, 0.12);
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
@media (max-width: 1480px) {
|
|
630
|
+
#file-tree:not(.hidden) ~ #comments-panel {
|
|
631
|
+
position: fixed; z-index: 5;
|
|
632
|
+
top: var(--mg-header-height); right: 0; bottom: var(--mg-footer-height);
|
|
633
|
+
width: min(480px, 100vw);
|
|
634
|
+
box-shadow: -8px 0 24px rgba(31, 35, 40, 0.12);
|
|
635
|
+
}
|
|
636
|
+
}
|
|
368
637
|
|
|
369
|
-
/*
|
|
370
|
-
|
|
371
|
-
.mg-md { white-space: normal; line-height: 1.3; color: var(--mg-text) !important; }
|
|
372
|
-
.mg-md strong { color: var(--mg-text); }
|
|
373
|
-
.mg-md p { margin: 0.1em 0; }
|
|
374
|
-
.mg-md ul, .mg-md ol { padding-left: 1.4em; margin: 0; line-height: 1.2; }
|
|
375
|
-
.mg-md li { margin: 0; padding: 0; }
|
|
376
|
-
.mg-md li > p { margin: 0; display: inline; }
|
|
377
|
-
.mg-md code { background: var(--mg-surface); padding: 1px 3px; border-radius: 3px; font-family: var(--mg-mono); font-size: 13px; }
|
|
378
|
-
.mg-md pre { background: var(--mg-surface); padding: 4px 6px; border-radius: 4px; overflow-x: auto; margin: 2px 0; line-height: 1.2; }
|
|
379
|
-
.mg-md pre code { background: none; padding: 0; }
|
|
638
|
+
/* --- Minimized threads --- */
|
|
380
639
|
|
|
381
|
-
.
|
|
640
|
+
.mg-bubble {
|
|
641
|
+
flex: none; align-self: flex-start;
|
|
642
|
+
display: inline-flex; align-items: center; gap: 4px;
|
|
643
|
+
height: 20px; margin: 0 8px 0 auto; padding: 0 6px 0 2px;
|
|
644
|
+
font-family: var(--mg-sans); font-size: 12px; line-height: 1;
|
|
645
|
+
border: 1px solid transparent; border-radius: 2em;
|
|
646
|
+
background: transparent; color: var(--mg-text-muted);
|
|
647
|
+
cursor: pointer;
|
|
648
|
+
}
|
|
649
|
+
.mg-bubble:hover, .mg-bubble.pressed { border-color: var(--mg-border); background: var(--mg-bg); }
|
|
650
|
+
.mg-bubble .mg-avatar { width: 16px; height: 16px; font-size: 9px; }
|
|
382
651
|
|
|
383
652
|
/* --- Permission bar --- */
|
|
384
653
|
|
|
@@ -400,11 +669,9 @@ body { display: flex; flex-direction: column; }
|
|
|
400
669
|
|
|
401
670
|
#chat-toggle {
|
|
402
671
|
display: flex; align-items: center; gap: 8px;
|
|
403
|
-
padding: 6px 16px; height: var(--mg-footer-height);
|
|
672
|
+
padding: 6px 16px; height: var(--mg-footer-height);
|
|
404
673
|
}
|
|
405
674
|
|
|
406
|
-
#chat-indicator { color: var(--mg-text-muted); font-weight: 700; width: 16px; text-align: center; user-select: none; }
|
|
407
|
-
|
|
408
675
|
#general-input {
|
|
409
676
|
flex: 1;
|
|
410
677
|
background: var(--mg-bg); color: var(--mg-text);
|
|
@@ -415,12 +682,6 @@ body { display: flex; flex-direction: column; }
|
|
|
415
682
|
|
|
416
683
|
#general-input:focus { border-color: var(--mg-accent); box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15); }
|
|
417
684
|
|
|
418
|
-
#chat-history { max-height: 200px; overflow-y: auto; padding: 8px 16px; border-top: 1px solid var(--mg-border); }
|
|
419
|
-
#chat-history.hidden { display: none; }
|
|
420
|
-
|
|
421
|
-
.chat-message { padding: 3px 0; line-height: 1.3; font-size: 13px; }
|
|
422
|
-
.chat-you > strong { color: var(--mg-comment-user); }
|
|
423
|
-
.chat-assistant > strong { color: var(--mg-comment-assistant); }
|
|
424
685
|
|
|
425
686
|
/* --- Buttons --- */
|
|
426
687
|
|