@agimon-ai/doompi-file-edit 0.0.1-alpha.65 → 0.0.1-alpha.68
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/package.json +10 -9
- package/src/web/components/CommentDraft.tsx +6 -6
- package/src/web/components/DiffView.tsx +3 -3
- package/src/web/components/FilePanel.tsx +25 -25
- package/src/web/components/FilePreviewPanel.tsx +7 -7
- package/src/web/components/FilesActivitySection.tsx +2 -2
- package/src/web/components/FilesBrowser.tsx +11 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/doompi-file-edit",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.68",
|
|
4
4
|
"description": "Pi extension for session-scoped file-change timelines and external editor workflows.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
"src/types/domain.ts",
|
|
33
33
|
"src/types/webFiles.ts",
|
|
34
34
|
"src/types/fileEditsApi.ts",
|
|
35
|
-
"LICENSE"
|
|
35
|
+
"LICENSE",
|
|
36
|
+
"!src/web/**/*.stories.tsx"
|
|
36
37
|
],
|
|
37
38
|
"type": "module",
|
|
38
39
|
"main": "./dist/index.cjs",
|
|
@@ -70,13 +71,13 @@
|
|
|
70
71
|
"cross-spawn": "7.0.6",
|
|
71
72
|
"hono": "4.13.5",
|
|
72
73
|
"ignore": "7.0.8",
|
|
73
|
-
"@agimon-ai/doompi-config": "0.0.1-alpha.
|
|
74
|
-
"@agimon-ai/doompi-
|
|
75
|
-
"@agimon-ai/doompi-
|
|
76
|
-
"@agimon-ai/doompi-ui": "0.0.1-alpha.
|
|
77
|
-
"@agimon-ai/doompi-web-components": "0.0.1-alpha.
|
|
78
|
-
"@agimon-ai/doompi-web-contracts": "0.0.1-alpha.
|
|
79
|
-
"@agimon-ai/doompi-web-security": "0.0.1-alpha.
|
|
74
|
+
"@agimon-ai/doompi-config": "0.0.1-alpha.67",
|
|
75
|
+
"@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.67",
|
|
76
|
+
"@agimon-ai/doompi-telemetry": "0.0.1-alpha.66",
|
|
77
|
+
"@agimon-ai/doompi-ui": "0.0.1-alpha.68",
|
|
78
|
+
"@agimon-ai/doompi-web-components": "0.0.1-alpha.27",
|
|
79
|
+
"@agimon-ai/doompi-web-contracts": "0.0.1-alpha.30",
|
|
80
|
+
"@agimon-ai/doompi-web-security": "0.0.1-alpha.29"
|
|
80
81
|
},
|
|
81
82
|
"devDependencies": {
|
|
82
83
|
"@earendil-works/pi-coding-agent": "0.85.1",
|
|
@@ -29,8 +29,8 @@ export function CommentDraft({ snippet, startLine, endLine, onSubmit, onCancel }
|
|
|
29
29
|
|
|
30
30
|
return (
|
|
31
31
|
<div data-testid="files-comment-draft" className="flex flex-col gap-1.5 border-t border-doom-border p-2">
|
|
32
|
-
<p className="text-
|
|
33
|
-
<pre className="max-h-24 overflow-y-auto whitespace-pre-wrap break-words rounded border border-doom-border-soft bg-doom-deep p-1.5 font-mono text-
|
|
32
|
+
<p className="text-2xs text-doom-faint">{range}</p>
|
|
33
|
+
<pre className="max-h-24 overflow-y-auto whitespace-pre-wrap break-words rounded border border-doom-border-soft bg-doom-deep p-1.5 font-mono text-xs text-doom-dim">
|
|
34
34
|
{trimSnippet(snippet, 8, 600)}
|
|
35
35
|
</pre>
|
|
36
36
|
<Textarea
|
|
@@ -46,7 +46,7 @@ export function CommentDraft({ snippet, startLine, endLine, onSubmit, onCancel }
|
|
|
46
46
|
event.preventDefault();
|
|
47
47
|
if (body.trim() !== '') onSubmit(body);
|
|
48
48
|
}}
|
|
49
|
-
className="text-
|
|
49
|
+
className="text-sm"
|
|
50
50
|
/>
|
|
51
51
|
<div className="flex items-center gap-1.5">
|
|
52
52
|
<Button
|
|
@@ -55,14 +55,14 @@ export function CommentDraft({ snippet, startLine, endLine, onSubmit, onCancel }
|
|
|
55
55
|
data-testid="files-comment-add"
|
|
56
56
|
disabled={body.trim() === ''}
|
|
57
57
|
onClick={() => onSubmit(body)}
|
|
58
|
-
className="text-
|
|
58
|
+
className="text-2xs"
|
|
59
59
|
>
|
|
60
60
|
add comment
|
|
61
61
|
</Button>
|
|
62
|
-
<Button variant="ghost" size="xs" data-testid="files-comment-cancel" onClick={onCancel} className="text-
|
|
62
|
+
<Button variant="ghost" size="xs" data-testid="files-comment-cancel" onClick={onCancel} className="text-2xs">
|
|
63
63
|
cancel
|
|
64
64
|
</Button>
|
|
65
|
-
<span className="text-
|
|
65
|
+
<span className="text-2xs text-doom-faint">⌘⏎ to add</span>
|
|
66
66
|
</div>
|
|
67
67
|
</div>
|
|
68
68
|
);
|
|
@@ -49,7 +49,7 @@ export function DiffView({ hunks, testId, onSelect }: DiffViewProps) {
|
|
|
49
49
|
|
|
50
50
|
if (hunks.length === 0) {
|
|
51
51
|
return (
|
|
52
|
-
<p data-testid={`${testId}-empty`} className="px-2 py-1 text-
|
|
52
|
+
<p data-testid={`${testId}-empty`} className="px-2 py-1 text-xs text-doom-faint">
|
|
53
53
|
no lines changed
|
|
54
54
|
</p>
|
|
55
55
|
);
|
|
@@ -60,12 +60,12 @@ export function DiffView({ hunks, testId, onSelect }: DiffViewProps) {
|
|
|
60
60
|
data-testid={testId}
|
|
61
61
|
data-diff-surface={testId}
|
|
62
62
|
onMouseUp={handleSelect}
|
|
63
|
-
className="overflow-x-auto font-mono text-
|
|
63
|
+
className="overflow-x-auto font-mono text-sm leading-normal"
|
|
64
64
|
>
|
|
65
65
|
{hunks.map((hunk, position) => (
|
|
66
66
|
<div key={`${hunk.start}-${position}`}>
|
|
67
67
|
{position > 0 ? (
|
|
68
|
-
<div className="flex items-center gap-2 px-2 py-0.5 text-
|
|
68
|
+
<div className="flex items-center gap-2 px-2 py-0.5 text-2xs text-doom-faint">
|
|
69
69
|
<span className="h-px flex-1 bg-doom-border-soft" />
|
|
70
70
|
<span>⋯</span>
|
|
71
71
|
<span className="h-px flex-1 bg-doom-border-soft" />
|
|
@@ -193,12 +193,12 @@ export function FilePanel({ filePath, relPath, sessionId, sendSessionFrame, clos
|
|
|
193
193
|
{/* Edit is not one of the header's two toggles, so with neither lit the
|
|
194
194
|
mode needs saying; picking either toggle leaves it. */}
|
|
195
195
|
{view === 'edit' ? (
|
|
196
|
-
<Badge tone="neutral" data-testid="files-editing" className="shrink-0 text-
|
|
196
|
+
<Badge tone="neutral" data-testid="files-editing" className="shrink-0 text-2xs">
|
|
197
197
|
editing
|
|
198
198
|
</Badge>
|
|
199
199
|
) : null}
|
|
200
200
|
{detail === undefined ? null : (
|
|
201
|
-
<span className="shrink-0 text-
|
|
201
|
+
<span className="shrink-0 text-2xs text-doom-faint">
|
|
202
202
|
+{detail.cumulative.additions} -{detail.cumulative.removals}
|
|
203
203
|
</span>
|
|
204
204
|
)}
|
|
@@ -213,7 +213,7 @@ export function FilePanel({ filePath, relPath, sessionId, sendSessionFrame, clos
|
|
|
213
213
|
size="xs"
|
|
214
214
|
data-testid={`files-view-${entry}`}
|
|
215
215
|
onClick={() => setView(entry)}
|
|
216
|
-
className="text-
|
|
216
|
+
className="text-2xs"
|
|
217
217
|
>
|
|
218
218
|
{entry}
|
|
219
219
|
</Button>
|
|
@@ -262,12 +262,12 @@ export function FilePanel({ filePath, relPath, sessionId, sendSessionFrame, clos
|
|
|
262
262
|
/>
|
|
263
263
|
|
|
264
264
|
{loading && detail === undefined ? (
|
|
265
|
-
<p data-testid="files-loading" className="px-4 py-3 text-
|
|
265
|
+
<p data-testid="files-loading" className="px-4 py-3 text-sm text-doom-faint">
|
|
266
266
|
reading this file's history…
|
|
267
267
|
</p>
|
|
268
268
|
) : null}
|
|
269
269
|
{error === undefined ? null : (
|
|
270
|
-
<p data-testid="files-error" className="px-4 py-3 text-
|
|
270
|
+
<p data-testid="files-error" className="px-4 py-3 text-sm text-doom-red">
|
|
271
271
|
{error}
|
|
272
272
|
</p>
|
|
273
273
|
)}
|
|
@@ -276,7 +276,7 @@ export function FilePanel({ filePath, relPath, sessionId, sendSessionFrame, clos
|
|
|
276
276
|
{detail === undefined ? null : view === 'diff' ? (
|
|
277
277
|
<div className="flex flex-col">
|
|
278
278
|
{detail.cumulative.note === undefined ? null : (
|
|
279
|
-
<p data-testid="files-cumulative-note" className="px-4 py-2 text-
|
|
279
|
+
<p data-testid="files-cumulative-note" className="px-4 py-2 text-xs text-doom-yellow">
|
|
280
280
|
{detail.cumulative.note}
|
|
281
281
|
</p>
|
|
282
282
|
)}
|
|
@@ -288,7 +288,7 @@ export function FilePanel({ filePath, relPath, sessionId, sendSessionFrame, clos
|
|
|
288
288
|
/>
|
|
289
289
|
)}
|
|
290
290
|
<section className="mt-2 border-t border-doom-border">
|
|
291
|
-
<h2 className="px-4 py-2 text-
|
|
291
|
+
<h2 className="px-4 py-2 text-xs font-bold tracking-wide text-doom-faint uppercase">
|
|
292
292
|
{detail.versions.length} {detail.versions.length === 1 ? 'change' : 'changes'} this session
|
|
293
293
|
</h2>
|
|
294
294
|
{detail.versions.map((version) => (
|
|
@@ -301,22 +301,22 @@ export function FilePanel({ filePath, relPath, sessionId, sendSessionFrame, clos
|
|
|
301
301
|
className="w-full gap-2 rounded-none px-4 py-1.5 hover:bg-doom-panel"
|
|
302
302
|
>
|
|
303
303
|
<span className="flex w-full min-w-0 items-center gap-2">
|
|
304
|
-
<span className="shrink-0 text-
|
|
305
|
-
<span className="min-w-0 flex-1 truncate text-left text-
|
|
304
|
+
<span className="shrink-0 text-2xs text-doom-faint">#{version.index}</span>
|
|
305
|
+
<span className="min-w-0 flex-1 truncate text-left text-xs text-doom-text">
|
|
306
306
|
{versionSummary(version)}
|
|
307
307
|
</span>
|
|
308
308
|
{version.origin === 'scan' ? (
|
|
309
|
-
<Badge tone="neutral" className="shrink-0 text-
|
|
309
|
+
<Badge tone="neutral" className="shrink-0 text-2xs">
|
|
310
310
|
no baseline
|
|
311
311
|
</Badge>
|
|
312
312
|
) : null}
|
|
313
|
-
<span className="shrink-0 text-
|
|
313
|
+
<span className="shrink-0 text-2xs text-doom-faint">
|
|
314
314
|
{expanded === version.index ? '▾' : '▸'}
|
|
315
315
|
</span>
|
|
316
316
|
</span>
|
|
317
317
|
</Button>
|
|
318
318
|
{expanded !== version.index ? null : version.hunks === undefined ? (
|
|
319
|
-
<p className="px-4 py-1.5 text-
|
|
319
|
+
<p className="px-4 py-1.5 text-xs text-doom-faint">{version.note ?? 'nothing to show'}</p>
|
|
320
320
|
) : (
|
|
321
321
|
<DiffView
|
|
322
322
|
hunks={version.hunks}
|
|
@@ -331,7 +331,7 @@ export function FilePanel({ filePath, relPath, sessionId, sendSessionFrame, clos
|
|
|
331
331
|
) : view === 'edit' ? (
|
|
332
332
|
<div className="flex h-full flex-col gap-2 p-3">
|
|
333
333
|
{working?.unavailable === true ? (
|
|
334
|
-
<p data-testid="files-source-unavailable" className="text-
|
|
334
|
+
<p data-testid="files-source-unavailable" className="text-sm text-doom-faint">
|
|
335
335
|
{working.reason ?? 'this file cannot be shown'}
|
|
336
336
|
</p>
|
|
337
337
|
) : (
|
|
@@ -365,7 +365,7 @@ export function FilePanel({ filePath, relPath, sessionId, sendSessionFrame, clos
|
|
|
365
365
|
loading={saving}
|
|
366
366
|
disabled={source === undefined || saving}
|
|
367
367
|
onClick={() => void save()}
|
|
368
|
-
className="text-
|
|
368
|
+
className="text-2xs"
|
|
369
369
|
>
|
|
370
370
|
save to disk
|
|
371
371
|
</Button>
|
|
@@ -375,7 +375,7 @@ export function FilePanel({ filePath, relPath, sessionId, sendSessionFrame, clos
|
|
|
375
375
|
size="xs"
|
|
376
376
|
data-testid="files-revert"
|
|
377
377
|
onClick={() => setSource(undefined)}
|
|
378
|
-
className="text-
|
|
378
|
+
className="text-2xs"
|
|
379
379
|
>
|
|
380
380
|
discard edits
|
|
381
381
|
</Button>
|
|
@@ -383,7 +383,7 @@ export function FilePanel({ filePath, relPath, sessionId, sendSessionFrame, clos
|
|
|
383
383
|
{saveNote === undefined ? null : (
|
|
384
384
|
<span
|
|
385
385
|
data-testid="files-save-note"
|
|
386
|
-
className={saveNote === 'saved' ? 'text-
|
|
386
|
+
className={saveNote === 'saved' ? 'text-2xs text-doom-green' : 'text-2xs text-doom-red'}
|
|
387
387
|
>
|
|
388
388
|
{saveNote}
|
|
389
389
|
</span>
|
|
@@ -398,8 +398,8 @@ export function FilePanel({ filePath, relPath, sessionId, sendSessionFrame, clos
|
|
|
398
398
|
data-mode={previewMode}
|
|
399
399
|
className={
|
|
400
400
|
previewMode === 'code'
|
|
401
|
-
? 'flex h-full flex-col gap-2 p-4 text-
|
|
402
|
-
: 'flex flex-col gap-2 p-4 text-
|
|
401
|
+
? 'flex h-full flex-col gap-2 p-4 text-sm text-doom-text'
|
|
402
|
+
: 'flex flex-col gap-2 p-4 text-sm text-doom-text'
|
|
403
403
|
}
|
|
404
404
|
onMouseUp={() => {
|
|
405
405
|
// Highlighted source knows which lines were picked, so a note on
|
|
@@ -417,7 +417,7 @@ export function FilePanel({ filePath, relPath, sessionId, sendSessionFrame, clos
|
|
|
417
417
|
{/* A file the editor cannot hold is still a file the reader came
|
|
418
418
|
to see, so the reason is said and the bytes are shown anyway. */}
|
|
419
419
|
{previewMode === 'unavailable' ? (
|
|
420
|
-
<p data-testid="files-preview-unavailable" className="text-
|
|
420
|
+
<p data-testid="files-preview-unavailable" className="text-sm text-doom-faint">
|
|
421
421
|
{working?.reason ?? 'this file cannot be shown'}
|
|
422
422
|
</p>
|
|
423
423
|
) : null}
|
|
@@ -453,7 +453,7 @@ export function FilePanel({ filePath, relPath, sessionId, sendSessionFrame, clos
|
|
|
453
453
|
// reading view rather than an empty pane.
|
|
454
454
|
<pre
|
|
455
455
|
data-testid="files-preview-text"
|
|
456
|
-
className="whitespace-pre-wrap break-words font-mono text-
|
|
456
|
+
className="whitespace-pre-wrap break-words font-mono text-sm leading-normal text-doom-text"
|
|
457
457
|
>
|
|
458
458
|
{content}
|
|
459
459
|
</pre>
|
|
@@ -475,7 +475,7 @@ export function FilePanel({ filePath, relPath, sessionId, sendSessionFrame, clos
|
|
|
475
475
|
{comments.length === 0 ? null : (
|
|
476
476
|
<footer data-testid="files-review" className="shrink-0 border-t border-doom-border px-3 py-2">
|
|
477
477
|
<div className="flex items-center gap-2 pb-1">
|
|
478
|
-
<span className="flex-1 text-
|
|
478
|
+
<span className="flex-1 text-xs font-bold text-doom-hi">
|
|
479
479
|
{comments.length} {comments.length === 1 ? 'comment' : 'comments'}
|
|
480
480
|
</span>
|
|
481
481
|
<Button
|
|
@@ -483,15 +483,15 @@ export function FilePanel({ filePath, relPath, sessionId, sendSessionFrame, clos
|
|
|
483
483
|
size="xs"
|
|
484
484
|
data-testid="files-send-review"
|
|
485
485
|
onClick={sendReview}
|
|
486
|
-
className="text-
|
|
486
|
+
className="text-2xs"
|
|
487
487
|
>
|
|
488
488
|
send review
|
|
489
489
|
</Button>
|
|
490
490
|
</div>
|
|
491
491
|
{comments.map((comment) => (
|
|
492
492
|
<div key={comment.id} data-testid="files-review-comment" className="flex items-start gap-2 py-0.5">
|
|
493
|
-
<span className="shrink-0 text-
|
|
494
|
-
<span className="min-w-0 flex-1 truncate text-
|
|
493
|
+
<span className="shrink-0 text-2xs text-doom-faint">{commentAnchor(comment)}</span>
|
|
494
|
+
<span className="min-w-0 flex-1 truncate text-xs text-doom-text">{comment.body}</span>
|
|
495
495
|
<Button
|
|
496
496
|
variant="ghost"
|
|
497
497
|
size="xs"
|
|
@@ -499,7 +499,7 @@ export function FilePanel({ filePath, relPath, sessionId, sendSessionFrame, clos
|
|
|
499
499
|
onClick={() => {
|
|
500
500
|
if (sessionId !== null) removeComment(sessionId, comment.id);
|
|
501
501
|
}}
|
|
502
|
-
className="shrink-0 text-
|
|
502
|
+
className="shrink-0 text-2xs"
|
|
503
503
|
>
|
|
504
504
|
remove
|
|
505
505
|
</Button>
|
|
@@ -62,25 +62,25 @@ export function FilePreviewPanel({ filePath, sessionId, closeTransientTab }: Fil
|
|
|
62
62
|
<div data-testid="files-preview-panel" className="flex min-h-0 flex-1 flex-col">
|
|
63
63
|
<header className="flex shrink-0 items-center gap-2 border-b border-doom-border px-4 py-2">
|
|
64
64
|
<Breadcrumb path={relPath} data-testid="files-preview-breadcrumb" className="min-w-0 flex-1" />
|
|
65
|
-
<span className="shrink-0 text-
|
|
65
|
+
<span className="shrink-0 text-2xs text-doom-faint">unchanged</span>
|
|
66
66
|
<Button
|
|
67
67
|
variant="ghost"
|
|
68
68
|
size="xs"
|
|
69
69
|
data-testid="files-preview-close"
|
|
70
70
|
onClick={() => closeTransientTab(filePreviewTabId(filePath))}
|
|
71
|
-
className="shrink-0 text-
|
|
71
|
+
className="shrink-0 text-2xs"
|
|
72
72
|
>
|
|
73
73
|
close
|
|
74
74
|
</Button>
|
|
75
75
|
</header>
|
|
76
76
|
|
|
77
77
|
{error === undefined ? null : (
|
|
78
|
-
<p data-testid="files-preview-error" className="px-4 py-3 text-
|
|
78
|
+
<p data-testid="files-preview-error" className="px-4 py-3 text-sm text-doom-red">
|
|
79
79
|
{error}
|
|
80
80
|
</p>
|
|
81
81
|
)}
|
|
82
82
|
{preview === undefined && error === undefined ? (
|
|
83
|
-
<p data-testid="files-preview-loading" className="px-4 py-3 text-
|
|
83
|
+
<p data-testid="files-preview-loading" className="px-4 py-3 text-sm text-doom-faint">
|
|
84
84
|
reading this file…
|
|
85
85
|
</p>
|
|
86
86
|
) : null}
|
|
@@ -90,10 +90,10 @@ export function FilePreviewPanel({ filePath, sessionId, closeTransientTab }: Fil
|
|
|
90
90
|
<div
|
|
91
91
|
data-testid="files-preview"
|
|
92
92
|
data-mode={previewMode}
|
|
93
|
-
className="flex h-full flex-col gap-2 p-4 text-
|
|
93
|
+
className="flex h-full flex-col gap-2 p-4 text-sm text-doom-text"
|
|
94
94
|
>
|
|
95
95
|
{previewMode === 'unavailable' ? (
|
|
96
|
-
<p data-testid="files-preview-unavailable" className="text-
|
|
96
|
+
<p data-testid="files-preview-unavailable" className="text-sm text-doom-faint">
|
|
97
97
|
{working?.reason ?? 'this file cannot be shown'}
|
|
98
98
|
</p>
|
|
99
99
|
) : null}
|
|
@@ -120,7 +120,7 @@ export function FilePreviewPanel({ filePath, sessionId, closeTransientTab }: Fil
|
|
|
120
120
|
) : (
|
|
121
121
|
<pre
|
|
122
122
|
data-testid="files-preview-text"
|
|
123
|
-
className="whitespace-pre-wrap break-words font-mono text-
|
|
123
|
+
className="whitespace-pre-wrap break-words font-mono text-sm leading-normal text-doom-text"
|
|
124
124
|
>
|
|
125
125
|
{content}
|
|
126
126
|
</pre>
|
|
@@ -30,7 +30,7 @@ export function FilesActivitySection({ sessionId, openTransientTab }: WebPluginS
|
|
|
30
30
|
};
|
|
31
31
|
if (items.length === 0) {
|
|
32
32
|
return (
|
|
33
|
-
<p data-testid="activity-summary-files" className="px-1 text-
|
|
33
|
+
<p data-testid="activity-summary-files" className="px-1 text-xs text-doom-faint">
|
|
34
34
|
nothing changed yet
|
|
35
35
|
</p>
|
|
36
36
|
);
|
|
@@ -49,7 +49,7 @@ export function FilesActivitySection({ sessionId, openTransientTab }: WebPluginS
|
|
|
49
49
|
size="xs"
|
|
50
50
|
data-testid="activity-files-show-all"
|
|
51
51
|
aria-label={`show all ${items.length} changed files`}
|
|
52
|
-
className="self-start px-1 pt-0.5 text-
|
|
52
|
+
className="self-start px-1 pt-0.5 text-2xs text-doom-faint"
|
|
53
53
|
onClick={() => setBrowserOpen(true)}
|
|
54
54
|
>
|
|
55
55
|
show all {items.length} files
|
|
@@ -9,16 +9,14 @@ function FileMetadata({ item, label, recent = false }: { item: FilesItemView; la
|
|
|
9
9
|
<span className="flex min-w-0 w-full items-center gap-1.5">
|
|
10
10
|
{/* The dock passes no label and keeps the whole path; the drawer's tree
|
|
11
11
|
passes what its group header has not already said. */}
|
|
12
|
-
<span className="min-w-0 flex-1 truncate text-left text-
|
|
13
|
-
{label ?? item.relPath}
|
|
14
|
-
</span>
|
|
12
|
+
<span className="min-w-0 flex-1 truncate text-left text-xs font-bold text-doom-hi">{label ?? item.relPath}</span>
|
|
15
13
|
{recent ? (
|
|
16
|
-
<span data-recent="true" title="most recent change" className="shrink-0 text-
|
|
14
|
+
<span data-recent="true" title="most recent change" className="shrink-0 text-2xs text-doom-blue">
|
|
17
15
|
●
|
|
18
16
|
</span>
|
|
19
17
|
) : null}
|
|
20
|
-
{item.count > 1 ? <span className="shrink-0 text-
|
|
21
|
-
<span className={`shrink-0 text-
|
|
18
|
+
{item.count > 1 ? <span className="shrink-0 text-2xs text-doom-faint">{item.count}×</span> : null}
|
|
19
|
+
<span className={`shrink-0 text-2xs ${item.diffable ? 'text-doom-faint' : 'text-doom-yellow'}`}>
|
|
22
20
|
{TOOL_LABEL[item.tool] ?? item.tool}
|
|
23
21
|
</span>
|
|
24
22
|
</span>
|
|
@@ -34,7 +32,7 @@ export function FileActivityRow({ item, onOpen }: { item: FilesItemView; onOpen:
|
|
|
34
32
|
data-file-diffable={item.diffable}
|
|
35
33
|
title={item.diffable ? item.path : `${item.path} (changed by a command, so no diff was captured)`}
|
|
36
34
|
onClick={onOpen}
|
|
37
|
-
className="min-w-0 gap-0.5 rounded-
|
|
35
|
+
className="min-w-0 gap-0.5 rounded-md px-1 py-1 hover:bg-doom-panel"
|
|
38
36
|
>
|
|
39
37
|
<FileMetadata item={item} />
|
|
40
38
|
</Button>
|
|
@@ -52,7 +50,7 @@ function FileGroupHeader({ prefix }: { prefix: string }) {
|
|
|
52
50
|
return (
|
|
53
51
|
<div
|
|
54
52
|
data-testid={`files-browser-group-${prefix}`}
|
|
55
|
-
className="truncate px-4 pt-2 pb-1 text-
|
|
53
|
+
className="truncate px-4 pt-2 pb-1 text-2xs font-bold tracking-wide text-doom-faint"
|
|
56
54
|
>
|
|
57
55
|
{prefix}
|
|
58
56
|
</div>
|
|
@@ -170,8 +168,8 @@ export function FilesBrowser({
|
|
|
170
168
|
className="fixed inset-y-0 right-0 z-50 flex w-[min(440px,calc(100vw-24px))] flex-col overflow-hidden border-l border-doom-border bg-doom-rail outline-none"
|
|
171
169
|
>
|
|
172
170
|
<div className="flex h-11 shrink-0 items-center gap-2.5 border-b border-doom-border px-4">
|
|
173
|
-
<span className="text-
|
|
174
|
-
<span data-testid="files-browser-total" className="text-
|
|
171
|
+
<span className="text-base font-bold text-doom-hi"># files</span>
|
|
172
|
+
<span data-testid="files-browser-total" className="text-2xs text-doom-faint">
|
|
175
173
|
{items.length} changed
|
|
176
174
|
</span>
|
|
177
175
|
<span className="min-w-0 flex-1" />
|
|
@@ -215,7 +213,7 @@ export function FilesBrowser({
|
|
|
215
213
|
</Button>
|
|
216
214
|
) : null}
|
|
217
215
|
</div>
|
|
218
|
-
<p data-testid="files-browser-matches" className="shrink-0 px-4 pb-2 text-
|
|
216
|
+
<p data-testid="files-browser-matches" className="shrink-0 px-4 pb-2 text-2xs text-doom-faint">
|
|
219
217
|
{shown.length} matches · {grouped === undefined ? 'newest change first' : 'by path'}
|
|
220
218
|
</p>
|
|
221
219
|
<div
|
|
@@ -224,7 +222,7 @@ export function FilesBrowser({
|
|
|
224
222
|
aria-label="changed files"
|
|
225
223
|
className="flex min-h-0 flex-1 flex-col overflow-y-auto pb-2"
|
|
226
224
|
>
|
|
227
|
-
{shown.length === 0 ? <p className="px-4 py-3 text-
|
|
225
|
+
{shown.length === 0 ? <p className="px-4 py-3 text-xs text-doom-faint">nothing matches the path</p> : null}
|
|
228
226
|
{grouped === undefined
|
|
229
227
|
? shown.map((item) => (
|
|
230
228
|
<BrowserFileRow
|
|
@@ -256,7 +254,7 @@ export function FilesBrowser({
|
|
|
256
254
|
))}
|
|
257
255
|
</div>
|
|
258
256
|
<div className="flex h-8 shrink-0 items-center border-t border-doom-border-soft bg-doom-deep px-4">
|
|
259
|
-
<span className="text-
|
|
257
|
+
<span className="text-2xs text-doom-faint">↑↓ choose · enter open · esc close</span>
|
|
260
258
|
</div>
|
|
261
259
|
</aside>
|
|
262
260
|
);
|