@agimon-ai/po-git 0.0.0-alpha.0 → 0.0.0-alpha.10
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/dist/apiContracts.cjs +4 -4
- package/dist/apiContracts.cjs.map +1 -1
- package/dist/apiContracts.mjs +4 -4
- package/dist/apiContracts.mjs.map +1 -1
- package/dist/extensions/native.mjs +1079 -0
- package/dist/extensions/native.mjs.map +1 -0
- package/dist/extensions/server.cjs +13 -13
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.d.mts +1 -1
- package/dist/extensions/server.mjs +14 -14
- package/dist/extensions/server.mjs.map +1 -1
- package/dist/extensions/web.mjs +121 -135
- package/dist/extensions/web.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{worktreeOperations-CaqwGsD_.mjs → worktreeOperations-BSeyxUai.mjs} +50 -51
- package/dist/worktreeOperations-BSeyxUai.mjs.map +1 -0
- package/dist/{worktreeOperations-MgIVDDu3.cjs → worktreeOperations-DGUbUnYU.cjs} +61 -62
- package/dist/worktreeOperations-DGUbUnYU.cjs.map +1 -0
- package/package.json +35 -17
- package/dist/worktreeOperations-CaqwGsD_.mjs.map +0 -1
- package/dist/worktreeOperations-MgIVDDu3.cjs.map +0 -1
package/dist/extensions/web.mjs
CHANGED
|
@@ -1,64 +1,50 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createApiClient, defineActivityGroup, defineChannelFile, defineFill, defineGlobalStore, defineLeaderBinding, defineRepositorySettingsPanel, defineSessionStore, defineToolRenderer, defineWebLifecycle, defineWebPlugin, sessionApiAddress } from "@agimon-ai/po-core/web";
|
|
2
2
|
import { AlertIcon, ArrowRightIcon, BranchIcon, Button, CheckIcon, ChevronDownIcon, ChevronRightIcon, CloseIcon, Dialog, DialogBody, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DiffView, Dot, DropdownMenuItem, EmptyState, Input, MessageIcon, MessageItem, MessageItemBody, MessageItemHeader, OptionRow, RadioGroup, RadioGroupCard, ReviewCommentDraft, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, SettingsActions, SettingsCard, SettingsField, SettingsNote, SettingsRow, SettingsRowDescription, SettingsRowText, SettingsRowTitle, SettingsSection, SettingsSectionDescription, SettingsSectionHeader, SettingsSectionTitle, ShieldIcon, Spinner, StatusBadge, buildReviewPrompt, reviewCommentAnchor, toolTone } from "@agimon-ai/po-web-components";
|
|
3
3
|
import { createElement, useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
4
4
|
import { sealedTransport } from "@agimon-ai/po-web-security/browser";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { useStore } from "@tanstack/react-store";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* The routes the page calls, as data.
|
|
10
|
-
*
|
|
11
|
-
* No scope and no base path: the build reads both off
|
|
12
|
-
* `src/extensions/(backend)/api/git/`, which mounts at global scope and so
|
|
13
|
-
* answers workspace and session requests too. Each route answers only where it
|
|
14
|
-
* belongs (auth on a workspace mount, the review on a session mount), so a
|
|
15
|
-
* client accessor on the wrong scope gets a 404 rather than a second way in.
|
|
16
|
-
*
|
|
17
|
-
* Only what the browser calls is listed. The worktree routes stay HTTP for
|
|
18
|
-
* other callers, but the dock drives worktrees over its channel.
|
|
19
|
-
*/
|
|
20
|
-
var apiRoutes_default = defineApiRoutes({
|
|
7
|
+
const api = createApiClient({
|
|
21
8
|
/** Workspace: the new-session dialog's branch list. */
|
|
22
9
|
branches: {
|
|
23
10
|
method: "GET",
|
|
24
11
|
path: "/branches",
|
|
25
|
-
response:
|
|
12
|
+
response: void 0
|
|
26
13
|
},
|
|
27
14
|
/** Workspace: a top-level worktree session on an existing or new branch. */
|
|
28
15
|
createSession: {
|
|
29
16
|
method: "POST",
|
|
30
17
|
path: "/sessions",
|
|
31
|
-
response:
|
|
18
|
+
response: void 0
|
|
32
19
|
},
|
|
33
20
|
/** Workspace: that workspace's saved remote auth, never the token itself. */
|
|
34
21
|
auth: {
|
|
35
22
|
method: "GET",
|
|
36
23
|
path: "/auth",
|
|
37
24
|
query: ["repositoryId"],
|
|
38
|
-
response:
|
|
25
|
+
response: void 0
|
|
39
26
|
},
|
|
40
27
|
/** Workspace: replaces that workspace's remote auth. Passkey step-up gated for remote devices. */
|
|
41
28
|
saveAuth: {
|
|
42
29
|
method: "PUT",
|
|
43
30
|
path: "/auth",
|
|
44
31
|
query: ["repositoryId"],
|
|
45
|
-
response:
|
|
32
|
+
response: void 0
|
|
46
33
|
},
|
|
47
34
|
/** Session: the files this session's checkout changed against its base. */
|
|
48
35
|
review: {
|
|
49
36
|
method: "GET",
|
|
50
37
|
path: "/review",
|
|
51
|
-
response:
|
|
38
|
+
response: void 0
|
|
52
39
|
},
|
|
53
40
|
/** Session: one changed file's hunks. */
|
|
54
41
|
reviewFile: {
|
|
55
42
|
method: "GET",
|
|
56
43
|
path: "/review/file",
|
|
57
44
|
query: ["path"],
|
|
58
|
-
response:
|
|
45
|
+
response: void 0
|
|
59
46
|
}
|
|
60
|
-
}
|
|
61
|
-
const api = createApiClient(apiRoutes_default, {
|
|
47
|
+
}, {
|
|
62
48
|
scopes: [
|
|
63
49
|
"global",
|
|
64
50
|
"workspace",
|
|
@@ -232,7 +218,7 @@ function GitNewSessionDialog({ newSession }) {
|
|
|
232
218
|
"aria-describedby": void 0,
|
|
233
219
|
children: [/* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: "new session" }) }), /* @__PURE__ */ jsxs(DialogBody, { children: [
|
|
234
220
|
/* @__PURE__ */ jsx("p", {
|
|
235
|
-
className: "truncate text-sm text-
|
|
221
|
+
className: "truncate text-sm text-po-dim",
|
|
236
222
|
title: newSession.workspaceRoot,
|
|
237
223
|
children: newSession.workspaceRoot
|
|
238
224
|
}),
|
|
@@ -247,16 +233,16 @@ function GitNewSessionDialog({ newSession }) {
|
|
|
247
233
|
size: "sm",
|
|
248
234
|
"data-testid": `git-new-session-mode-${entry.mode}`,
|
|
249
235
|
disabled: busy,
|
|
250
|
-
className: mode === entry.mode ? "border-
|
|
236
|
+
className: mode === entry.mode ? "border-po-blue/60 text-po-hi" : void 0,
|
|
251
237
|
onClick: () => update({ mode: entry.mode }),
|
|
252
238
|
children: entry.label
|
|
253
239
|
}, entry.mode))
|
|
254
240
|
}) : branches === null && loadError === "" ? /* @__PURE__ */ jsx("p", {
|
|
255
|
-
className: "text-sm text-
|
|
241
|
+
className: "text-sm text-po-dim",
|
|
256
242
|
children: "reading branches…"
|
|
257
243
|
}) : /* @__PURE__ */ jsx("p", {
|
|
258
244
|
"data-testid": "git-new-session-plain-note",
|
|
259
|
-
className: "text-sm text-
|
|
245
|
+
className: "text-sm text-po-dim",
|
|
260
246
|
children: loadError || "This workspace is not a git checkout, so the session starts in its folder."
|
|
261
247
|
}),
|
|
262
248
|
mode === "existing" && gitReady ? /* @__PURE__ */ jsxs("div", {
|
|
@@ -272,9 +258,9 @@ function GitNewSessionDialog({ newSession }) {
|
|
|
272
258
|
}), /* @__PURE__ */ jsxs("div", {
|
|
273
259
|
role: "listbox",
|
|
274
260
|
"aria-label": "branches",
|
|
275
|
-
className: "max-h-48 overflow-y-auto rounded border border-
|
|
261
|
+
className: "max-h-48 overflow-y-auto rounded border border-po-border bg-po-deep p-1",
|
|
276
262
|
children: [options.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
277
|
-
className: "px-2 py-1 text-sm text-
|
|
263
|
+
className: "px-2 py-1 text-sm text-po-dim",
|
|
278
264
|
children: "no matching branches"
|
|
279
265
|
}) : null, options.map((option) => /* @__PURE__ */ jsxs(OptionRow, {
|
|
280
266
|
density: "compact",
|
|
@@ -289,7 +275,7 @@ function GitNewSessionDialog({ newSession }) {
|
|
|
289
275
|
className: "min-w-0 flex-1 truncate",
|
|
290
276
|
children: option.remote === void 0 ? option.name : `${option.remote}/${option.name}`
|
|
291
277
|
}), /* @__PURE__ */ jsx("span", {
|
|
292
|
-
className: "shrink-0 text-sm text-
|
|
278
|
+
className: "shrink-0 text-sm text-po-dim",
|
|
293
279
|
children: option.current && option.busyAt !== void 0 ? "current · checked out" : option.current ? "current" : option.busyAt !== void 0 ? "checked out" : option.remote !== void 0 ? "remote" : ""
|
|
294
280
|
})]
|
|
295
281
|
}, option.key))]
|
|
@@ -301,7 +287,7 @@ function GitNewSessionDialog({ newSession }) {
|
|
|
301
287
|
htmlFor: "git-new-session-new-branch",
|
|
302
288
|
className: "flex flex-col gap-1",
|
|
303
289
|
children: [/* @__PURE__ */ jsx("span", {
|
|
304
|
-
className: "text-sm text-
|
|
290
|
+
className: "text-sm text-po-dim",
|
|
305
291
|
children: "new branch"
|
|
306
292
|
}), /* @__PURE__ */ jsx(Input, {
|
|
307
293
|
id: "git-new-session-new-branch",
|
|
@@ -315,7 +301,7 @@ function GitNewSessionDialog({ newSession }) {
|
|
|
315
301
|
}), /* @__PURE__ */ jsxs("span", {
|
|
316
302
|
className: "flex flex-col gap-1",
|
|
317
303
|
children: [/* @__PURE__ */ jsx("span", {
|
|
318
|
-
className: "text-sm text-
|
|
304
|
+
className: "text-sm text-po-dim",
|
|
319
305
|
children: "from"
|
|
320
306
|
}), /* @__PURE__ */ jsxs(Select, {
|
|
321
307
|
value: form.baseRef,
|
|
@@ -336,9 +322,9 @@ function GitNewSessionDialog({ newSession }) {
|
|
|
336
322
|
htmlFor: "new-session-name",
|
|
337
323
|
className: "flex flex-col gap-1",
|
|
338
324
|
children: [/* @__PURE__ */ jsxs("span", {
|
|
339
|
-
className: "text-sm text-
|
|
325
|
+
className: "text-sm text-po-dim",
|
|
340
326
|
children: ["name ", /* @__PURE__ */ jsxs("span", {
|
|
341
|
-
className: "text-
|
|
327
|
+
className: "text-po-dim",
|
|
342
328
|
children: [
|
|
343
329
|
"(optional",
|
|
344
330
|
mode === "plain" ? "" : "; defaults to the branch",
|
|
@@ -360,7 +346,7 @@ function GitNewSessionDialog({ newSession }) {
|
|
|
360
346
|
}),
|
|
361
347
|
error ? /* @__PURE__ */ jsx("pre", {
|
|
362
348
|
"data-testid": "new-session-error",
|
|
363
|
-
className: "max-h-28 overflow-y-auto rounded border border-
|
|
349
|
+
className: "max-h-28 overflow-y-auto rounded border border-po-edge-red bg-po-tint-red/40 px-2.5 py-2 text-sm whitespace-pre-wrap text-po-red",
|
|
364
350
|
children: error
|
|
365
351
|
}) : null,
|
|
366
352
|
/* @__PURE__ */ jsxs(DialogFooter, { children: [/* @__PURE__ */ jsx(Button, {
|
|
@@ -502,13 +488,13 @@ function GitAuthForm({ saved, saving, saveError, savedNotice = false, onSave })
|
|
|
502
488
|
children: [/* @__PURE__ */ jsxs("span", {
|
|
503
489
|
className: "flex min-w-0 flex-1 flex-col gap-1",
|
|
504
490
|
children: [/* @__PURE__ */ jsx("span", {
|
|
505
|
-
className: "text-base font-medium text-
|
|
491
|
+
className: "text-base font-medium text-po-hi",
|
|
506
492
|
children: choice.title
|
|
507
493
|
}), /* @__PURE__ */ jsx("span", {
|
|
508
|
-
className: "text-sm leading-relaxed text-
|
|
494
|
+
className: "text-sm leading-relaxed text-po-dim",
|
|
509
495
|
children: choice.detail
|
|
510
496
|
})]
|
|
511
|
-
}), form.method === choice.method ? /* @__PURE__ */ jsx(CheckIcon, { className: "size-4 shrink-0 text-
|
|
497
|
+
}), form.method === choice.method ? /* @__PURE__ */ jsx(CheckIcon, { className: "size-4 shrink-0 text-po-green" }) : null]
|
|
512
498
|
}, choice.method))
|
|
513
499
|
}),
|
|
514
500
|
form.method === "ssh" ? /* @__PURE__ */ jsx(SettingsCard, { children: /* @__PURE__ */ jsx(SettingsField, {
|
|
@@ -565,7 +551,7 @@ function GitAuthForm({ saved, saving, saveError, savedNotice = false, onSave })
|
|
|
565
551
|
description: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
566
552
|
tokenSaved ? /* @__PURE__ */ jsxs("span", {
|
|
567
553
|
"data-testid": "git-auth-token-saved",
|
|
568
|
-
className: "text-
|
|
554
|
+
className: "text-po-green",
|
|
569
555
|
children: ["A token is saved.", " "]
|
|
570
556
|
}) : null,
|
|
571
557
|
"Sent only to ",
|
|
@@ -597,16 +583,16 @@ function GitAuthForm({ saved, saving, saveError, savedNotice = false, onSave })
|
|
|
597
583
|
children: "Save connection"
|
|
598
584
|
}), problem !== void 0 ? /* @__PURE__ */ jsx(SettingsNote, {
|
|
599
585
|
"data-testid": "git-auth-problem",
|
|
600
|
-
className: "text-
|
|
586
|
+
className: "text-po-dim",
|
|
601
587
|
children: problem
|
|
602
588
|
}) : saveError !== void 0 ? /* @__PURE__ */ jsx(SettingsNote, {
|
|
603
589
|
role: "alert",
|
|
604
590
|
"data-testid": "git-auth-error",
|
|
605
|
-
className: "text-
|
|
591
|
+
className: "text-po-red",
|
|
606
592
|
children: saveError
|
|
607
593
|
}) : savedNotice ? /* @__PURE__ */ jsx(SettingsNote, {
|
|
608
594
|
"data-testid": "git-auth-saved",
|
|
609
|
-
className: "text-
|
|
595
|
+
className: "text-po-green",
|
|
610
596
|
children: "Saved."
|
|
611
597
|
}) : null]
|
|
612
598
|
}),
|
|
@@ -744,7 +730,7 @@ function GitAuthPanel({ repository, request, requestWithStepUp }) {
|
|
|
744
730
|
children: /* @__PURE__ */ jsxs("span", {
|
|
745
731
|
className: "inline-flex items-center gap-2",
|
|
746
732
|
children: [/* @__PURE__ */ jsx(Spinner, {
|
|
747
|
-
className: "size-3 text-
|
|
733
|
+
className: "size-3 text-po-faint",
|
|
748
734
|
label: "Loading git settings"
|
|
749
735
|
}), "This takes a moment."]
|
|
750
736
|
})
|
|
@@ -928,8 +914,8 @@ function requestWorktreeClose(sessionId, id) {
|
|
|
928
914
|
*
|
|
929
915
|
* AVOID:
|
|
930
916
|
* - Deriving form state from refreshed store data instead of the user's input.
|
|
931
|
-
* - Colour classes outside the token set. `
|
|
932
|
-
* `
|
|
917
|
+
* - Colour classes outside the token set. `po-error`, `po-line` and
|
|
918
|
+
* `po-bright` are not tokens: they compile to nothing and the row silently
|
|
933
919
|
* loses its border.
|
|
934
920
|
*/
|
|
935
921
|
const WORKTREES_TAB_ID = "git-worktrees";
|
|
@@ -962,15 +948,15 @@ function WorktreesPanel({ sessionId, sessionReservationId }) {
|
|
|
962
948
|
className: "flex min-h-0 flex-1 flex-col overflow-auto",
|
|
963
949
|
children: [
|
|
964
950
|
/* @__PURE__ */ jsxs("div", {
|
|
965
|
-
className: "flex min-h-11 shrink-0 items-center gap-2.5 border-b border-
|
|
951
|
+
className: "flex min-h-11 shrink-0 items-center gap-2.5 border-b border-po-border-soft px-3 sm:px-[26px]",
|
|
966
952
|
children: [
|
|
967
953
|
/* @__PURE__ */ jsx("span", {
|
|
968
|
-
className: "text-lg font-semibold text-
|
|
954
|
+
className: "text-lg font-semibold text-po-hi",
|
|
969
955
|
children: "worktrees"
|
|
970
956
|
}),
|
|
971
957
|
/* @__PURE__ */ jsx("span", {
|
|
972
958
|
"data-testid": "git-worktrees-count",
|
|
973
|
-
className: "text-sm text-
|
|
959
|
+
className: "text-sm text-po-dim",
|
|
974
960
|
children: session.worktrees.length === 0 ? "none yet" : `${String(session.worktrees.length)} open`
|
|
975
961
|
}),
|
|
976
962
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1" }),
|
|
@@ -978,17 +964,17 @@ function WorktreesPanel({ sessionId, sessionReservationId }) {
|
|
|
978
964
|
"data-testid": "git-worktree-pending",
|
|
979
965
|
className: "flex min-w-0 items-center gap-1.5",
|
|
980
966
|
children: [/* @__PURE__ */ jsx(Spinner, {
|
|
981
|
-
className: "h-3 w-3 shrink-0 text-
|
|
967
|
+
className: "h-3 w-3 shrink-0 text-po-faint",
|
|
982
968
|
label: session.pending
|
|
983
969
|
}), /* @__PURE__ */ jsx("span", {
|
|
984
|
-
className: "min-w-0 truncate text-sm text-
|
|
970
|
+
className: "min-w-0 truncate text-sm text-po-dim",
|
|
985
971
|
children: session.pending
|
|
986
972
|
})]
|
|
987
973
|
})
|
|
988
974
|
]
|
|
989
975
|
}),
|
|
990
976
|
/* @__PURE__ */ jsxs("div", {
|
|
991
|
-
className: "flex shrink-0 flex-col gap-1.5 border-b border-
|
|
977
|
+
className: "flex shrink-0 flex-col gap-1.5 border-b border-po-border-soft px-3 py-2.5 sm:px-[26px]",
|
|
992
978
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
993
979
|
className: "flex items-center gap-2",
|
|
994
980
|
children: [
|
|
@@ -1022,19 +1008,19 @@ function WorktreesPanel({ sessionId, sessionReservationId }) {
|
|
|
1022
1008
|
})
|
|
1023
1009
|
]
|
|
1024
1010
|
}), createError === void 0 ? /* @__PURE__ */ jsx("p", {
|
|
1025
|
-
className: "text-sm text-
|
|
1011
|
+
className: "text-sm text-po-dim",
|
|
1026
1012
|
children: "Creates the worktree outside the repository and starts a session nested under this one."
|
|
1027
1013
|
}) : /* @__PURE__ */ jsx("p", {
|
|
1028
1014
|
role: "alert",
|
|
1029
1015
|
"data-testid": "git-worktree-error",
|
|
1030
|
-
className: "text-sm text-
|
|
1016
|
+
className: "text-sm text-po-red",
|
|
1031
1017
|
children: createError
|
|
1032
1018
|
})]
|
|
1033
1019
|
}),
|
|
1034
1020
|
panelError ? /* @__PURE__ */ jsx("p", {
|
|
1035
1021
|
role: "alert",
|
|
1036
1022
|
"data-testid": "git-worktree-error",
|
|
1037
|
-
className: "px-3 pt-2 text-sm text-
|
|
1023
|
+
className: "px-3 pt-2 text-sm text-po-red sm:px-[26px]",
|
|
1038
1024
|
children: session.error
|
|
1039
1025
|
}) : null,
|
|
1040
1026
|
session.worktrees.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
|
|
@@ -1059,14 +1045,14 @@ function WorktreesPanel({ sessionId, sessionReservationId }) {
|
|
|
1059
1045
|
function WorktreeCard({ worktree, sessionId, busy, error }) {
|
|
1060
1046
|
return /* @__PURE__ */ jsxs("li", {
|
|
1061
1047
|
"data-testid": `git-worktree-${worktree.id}`,
|
|
1062
|
-
className: "flex min-w-0 flex-col gap-1.5 rounded-md border border-
|
|
1048
|
+
className: "flex min-w-0 flex-col gap-1.5 rounded-md border border-po-border-soft bg-po-panel p-2.5",
|
|
1063
1049
|
children: [
|
|
1064
1050
|
/* @__PURE__ */ jsxs("div", {
|
|
1065
1051
|
className: "flex min-w-0 items-center gap-1.5",
|
|
1066
1052
|
children: [
|
|
1067
1053
|
/* @__PURE__ */ jsx(Dot, { tone: worktree.orphaned ? "red" : worktree.sessionId === null ? "muted" : "blue" }),
|
|
1068
1054
|
/* @__PURE__ */ jsx("span", {
|
|
1069
|
-
className: "min-w-0 flex-1 truncate text-base font-semibold text-
|
|
1055
|
+
className: "min-w-0 flex-1 truncate text-base font-semibold text-po-hi",
|
|
1070
1056
|
children: worktree.branch
|
|
1071
1057
|
}),
|
|
1072
1058
|
worktree.orphaned ? /* @__PURE__ */ jsx(StatusBadge, {
|
|
@@ -1082,7 +1068,7 @@ function WorktreeCard({ worktree, sessionId, busy, error }) {
|
|
|
1082
1068
|
]
|
|
1083
1069
|
}),
|
|
1084
1070
|
/* @__PURE__ */ jsx("span", {
|
|
1085
|
-
className: "min-w-0 truncate text-sm text-
|
|
1071
|
+
className: "min-w-0 truncate text-sm text-po-dim",
|
|
1086
1072
|
children: worktree.path
|
|
1087
1073
|
}),
|
|
1088
1074
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -1100,7 +1086,7 @@ function WorktreeCard({ worktree, sessionId, busy, error }) {
|
|
|
1100
1086
|
error === void 0 ? null : /* @__PURE__ */ jsx("p", {
|
|
1101
1087
|
role: "alert",
|
|
1102
1088
|
"data-testid": "git-worktree-error",
|
|
1103
|
-
className: "text-sm text-
|
|
1089
|
+
className: "text-sm text-po-red",
|
|
1104
1090
|
children: error
|
|
1105
1091
|
})
|
|
1106
1092
|
]
|
|
@@ -1521,27 +1507,27 @@ function flattenTree(files, isOpen) {
|
|
|
1521
1507
|
const STATUS_MARK = {
|
|
1522
1508
|
added: {
|
|
1523
1509
|
letter: "A",
|
|
1524
|
-
tone: "text-
|
|
1510
|
+
tone: "text-po-green",
|
|
1525
1511
|
label: "added"
|
|
1526
1512
|
},
|
|
1527
1513
|
modified: {
|
|
1528
1514
|
letter: "M",
|
|
1529
|
-
tone: "text-
|
|
1515
|
+
tone: "text-po-yellow",
|
|
1530
1516
|
label: "modified"
|
|
1531
1517
|
},
|
|
1532
1518
|
deleted: {
|
|
1533
1519
|
letter: "D",
|
|
1534
|
-
tone: "text-
|
|
1520
|
+
tone: "text-po-red",
|
|
1535
1521
|
label: "deleted"
|
|
1536
1522
|
},
|
|
1537
1523
|
untracked: {
|
|
1538
1524
|
letter: "U",
|
|
1539
|
-
tone: "text-
|
|
1525
|
+
tone: "text-po-blue",
|
|
1540
1526
|
label: "untracked"
|
|
1541
1527
|
},
|
|
1542
1528
|
conflicted: {
|
|
1543
1529
|
letter: "C",
|
|
1544
|
-
tone: "text-
|
|
1530
|
+
tone: "text-po-red",
|
|
1545
1531
|
label: "conflicted"
|
|
1546
1532
|
}
|
|
1547
1533
|
};
|
|
@@ -1584,7 +1570,7 @@ function GitReviewBrowser({ files, activePath, commentCounts, onPick }) {
|
|
|
1584
1570
|
return /* @__PURE__ */ jsxs("nav", {
|
|
1585
1571
|
"data-testid": "git-review-browser",
|
|
1586
1572
|
"aria-label": "changed files",
|
|
1587
|
-
className: "flex min-h-0 w-64 shrink-0 flex-col border-r border-
|
|
1573
|
+
className: "flex min-h-0 w-64 shrink-0 flex-col border-r border-po-border-soft",
|
|
1588
1574
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
1589
1575
|
className: "flex shrink-0 flex-col gap-1 px-3 pt-2.5 pb-1.5",
|
|
1590
1576
|
children: [/* @__PURE__ */ jsx(Input, {
|
|
@@ -1597,7 +1583,7 @@ function GitReviewBrowser({ files, activePath, commentCounts, onPick }) {
|
|
|
1597
1583
|
}), /* @__PURE__ */ jsxs("div", {
|
|
1598
1584
|
className: "flex items-center justify-between gap-2",
|
|
1599
1585
|
children: [/* @__PURE__ */ jsx("span", {
|
|
1600
|
-
className: "text-sm text-
|
|
1586
|
+
className: "text-sm text-po-dim",
|
|
1601
1587
|
children: needle === "" ? `${String(files.length)} changed` : `${String(shown.length)} of ${String(files.length)} match`
|
|
1602
1588
|
}), needle === "" ? /* @__PURE__ */ jsx(Button, {
|
|
1603
1589
|
variant: "link",
|
|
@@ -1623,12 +1609,12 @@ function GitReviewBrowser({ files, activePath, commentCounts, onPick }) {
|
|
|
1623
1609
|
title: row.path,
|
|
1624
1610
|
onClick: () => toggle(row.path),
|
|
1625
1611
|
style: indent(row.depth),
|
|
1626
|
-
className: "min-w-0 flex-row items-center gap-1 rounded-none border-l-2 border-transparent py-1 pr-3 hover:bg-
|
|
1612
|
+
className: "min-w-0 flex-row items-center gap-1 rounded-none border-l-2 border-transparent py-1 pr-3 hover:bg-po-panel/60",
|
|
1627
1613
|
children: [/* @__PURE__ */ jsx(Chevron, {
|
|
1628
1614
|
"aria-hidden": true,
|
|
1629
|
-
className: "h-3 w-3 shrink-0 text-
|
|
1615
|
+
className: "h-3 w-3 shrink-0 text-po-faint"
|
|
1630
1616
|
}), /* @__PURE__ */ jsx("span", {
|
|
1631
|
-
className: "min-w-0 flex-1 truncate text-base text-
|
|
1617
|
+
className: "min-w-0 flex-1 truncate text-base text-po-dim",
|
|
1632
1618
|
children: row.name
|
|
1633
1619
|
})]
|
|
1634
1620
|
}, `dir:${row.path}`);
|
|
@@ -1648,7 +1634,7 @@ function GitReviewBrowser({ files, activePath, commentCounts, onPick }) {
|
|
|
1648
1634
|
onClick: () => onPick(file.path),
|
|
1649
1635
|
onKeyDown,
|
|
1650
1636
|
style: indent(row.depth),
|
|
1651
|
-
className: `min-w-0 flex-row items-center gap-1.5 rounded-none border-l-2 py-1 pr-3 ${active ? "border-
|
|
1637
|
+
className: `min-w-0 flex-row items-center gap-1.5 rounded-none border-l-2 py-1 pr-3 ${active ? "border-po-blue bg-po-panel" : "border-transparent hover:bg-po-panel/60"}`,
|
|
1652
1638
|
children: [
|
|
1653
1639
|
/* @__PURE__ */ jsx("span", {
|
|
1654
1640
|
"aria-label": mark.label,
|
|
@@ -1656,11 +1642,11 @@ function GitReviewBrowser({ files, activePath, commentCounts, onPick }) {
|
|
|
1656
1642
|
children: mark.letter
|
|
1657
1643
|
}),
|
|
1658
1644
|
/* @__PURE__ */ jsx("span", {
|
|
1659
|
-
className: `min-w-0 flex-1 truncate text-base text-
|
|
1645
|
+
className: `min-w-0 flex-1 truncate text-base text-po-hi ${active ? "font-semibold" : ""} ${file.status === "deleted" ? "line-through opacity-70" : ""}`,
|
|
1660
1646
|
children: baseName(file.path)
|
|
1661
1647
|
}),
|
|
1662
1648
|
comments === 0 ? null : /* @__PURE__ */ jsxs("span", {
|
|
1663
|
-
className: "flex shrink-0 items-center gap-0.5 text-sm text-
|
|
1649
|
+
className: "flex shrink-0 items-center gap-0.5 text-sm text-po-blue",
|
|
1664
1650
|
title: `${String(comments)} comments`,
|
|
1665
1651
|
children: [/* @__PURE__ */ jsx(MessageIcon, {
|
|
1666
1652
|
"aria-hidden": true,
|
|
@@ -1668,18 +1654,18 @@ function GitReviewBrowser({ files, activePath, commentCounts, onPick }) {
|
|
|
1668
1654
|
}), comments]
|
|
1669
1655
|
}),
|
|
1670
1656
|
file.binary ? /* @__PURE__ */ jsx("span", {
|
|
1671
|
-
className: "shrink-0 text-sm text-
|
|
1657
|
+
className: "shrink-0 text-sm text-po-dim",
|
|
1672
1658
|
children: "binary"
|
|
1673
1659
|
}) : /* @__PURE__ */ jsxs("span", {
|
|
1674
1660
|
className: "shrink-0 text-2xs",
|
|
1675
1661
|
children: [
|
|
1676
1662
|
/* @__PURE__ */ jsxs("span", {
|
|
1677
|
-
className: "text-
|
|
1663
|
+
className: "text-po-green",
|
|
1678
1664
|
children: ["+", file.added]
|
|
1679
1665
|
}),
|
|
1680
1666
|
" ",
|
|
1681
1667
|
/* @__PURE__ */ jsxs("span", {
|
|
1682
|
-
className: "text-
|
|
1668
|
+
className: "text-po-red",
|
|
1683
1669
|
children: ["-", file.removed]
|
|
1684
1670
|
})
|
|
1685
1671
|
]
|
|
@@ -1687,7 +1673,7 @@ function GitReviewBrowser({ files, activePath, commentCounts, onPick }) {
|
|
|
1687
1673
|
]
|
|
1688
1674
|
}, file.path);
|
|
1689
1675
|
}), ordered.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
1690
|
-
className: "px-3 py-2 text-sm text-
|
|
1676
|
+
className: "px-3 py-2 text-sm text-po-dim",
|
|
1691
1677
|
children: "no path matches"
|
|
1692
1678
|
}) : null]
|
|
1693
1679
|
})]
|
|
@@ -1720,7 +1706,7 @@ function GitSyncBar({ changes, mergeBase, pending, error, errorTarget, onSync, o
|
|
|
1720
1706
|
const upstream = changes?.upstream;
|
|
1721
1707
|
return /* @__PURE__ */ jsxs("div", {
|
|
1722
1708
|
"data-testid": "git-sync-bar",
|
|
1723
|
-
className: "flex shrink-0 flex-col gap-2 border-b border-
|
|
1709
|
+
className: "flex shrink-0 flex-col gap-2 border-b border-po-border-soft px-3 py-2.5 sm:px-[26px]",
|
|
1724
1710
|
children: [
|
|
1725
1711
|
/* @__PURE__ */ jsxs("div", {
|
|
1726
1712
|
className: "flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1.5",
|
|
@@ -1730,19 +1716,19 @@ function GitSyncBar({ changes, mergeBase, pending, error, errorTarget, onSync, o
|
|
|
1730
1716
|
children: [
|
|
1731
1717
|
/* @__PURE__ */ jsx(BranchIcon, {
|
|
1732
1718
|
"aria-hidden": true,
|
|
1733
|
-
className: "h-3.5 w-3.5 shrink-0 text-
|
|
1719
|
+
className: "h-3.5 w-3.5 shrink-0 text-po-faint"
|
|
1734
1720
|
}),
|
|
1735
1721
|
/* @__PURE__ */ jsx("span", {
|
|
1736
1722
|
"data-testid": "git-review-branch",
|
|
1737
|
-
className: "truncate text-base font-semibold text-
|
|
1723
|
+
className: "truncate text-base font-semibold text-po-hi",
|
|
1738
1724
|
children: changes?.branch ?? "detached HEAD"
|
|
1739
1725
|
}),
|
|
1740
1726
|
/* @__PURE__ */ jsx("span", {
|
|
1741
|
-
className: "shrink-0 text-sm text-
|
|
1727
|
+
className: "shrink-0 text-sm text-po-dim",
|
|
1742
1728
|
children: changes?.base === void 0 ? "uncommitted changes" : `vs ${changes.base}`
|
|
1743
1729
|
}),
|
|
1744
1730
|
mergeBase === void 0 ? null : /* @__PURE__ */ jsxs("span", {
|
|
1745
|
-
className: "shrink-0 text-sm text-
|
|
1731
|
+
className: "shrink-0 text-sm text-po-dim",
|
|
1746
1732
|
children: ["from ", mergeBase]
|
|
1747
1733
|
})
|
|
1748
1734
|
]
|
|
@@ -1752,15 +1738,15 @@ function GitSyncBar({ changes, mergeBase, pending, error, errorTarget, onSync, o
|
|
|
1752
1738
|
className: "flex shrink-0 items-center gap-1.5 text-sm",
|
|
1753
1739
|
children: [
|
|
1754
1740
|
/* @__PURE__ */ jsxs("span", {
|
|
1755
|
-
className: "font-semibold text-
|
|
1741
|
+
className: "font-semibold text-po-green",
|
|
1756
1742
|
children: ["+", changes.added]
|
|
1757
1743
|
}),
|
|
1758
1744
|
/* @__PURE__ */ jsxs("span", {
|
|
1759
|
-
className: "font-semibold text-
|
|
1745
|
+
className: "font-semibold text-po-red",
|
|
1760
1746
|
children: ["-", changes.removed]
|
|
1761
1747
|
}),
|
|
1762
1748
|
/* @__PURE__ */ jsxs("span", {
|
|
1763
|
-
className: "text-
|
|
1749
|
+
className: "text-po-dim",
|
|
1764
1750
|
children: [
|
|
1765
1751
|
changes.files,
|
|
1766
1752
|
changes.truncated ? "+" : "",
|
|
@@ -1772,10 +1758,10 @@ function GitSyncBar({ changes, mergeBase, pending, error, errorTarget, onSync, o
|
|
|
1772
1758
|
}),
|
|
1773
1759
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1" }),
|
|
1774
1760
|
upstream === void 0 ? /* @__PURE__ */ jsx("span", {
|
|
1775
|
-
className: "shrink-0 text-sm text-
|
|
1761
|
+
className: "shrink-0 text-sm text-po-dim",
|
|
1776
1762
|
children: "no upstream yet"
|
|
1777
1763
|
}) : /* @__PURE__ */ jsxs("span", {
|
|
1778
|
-
className: "shrink-0 text-sm text-
|
|
1764
|
+
className: "shrink-0 text-sm text-po-dim",
|
|
1779
1765
|
title: upstream.ref,
|
|
1780
1766
|
children: [
|
|
1781
1767
|
"↑",
|
|
@@ -1821,17 +1807,17 @@ function GitSyncBar({ changes, mergeBase, pending, error, errorTarget, onSync, o
|
|
|
1821
1807
|
"data-testid": "git-sync-pending",
|
|
1822
1808
|
className: "flex min-w-0 items-center gap-1.5",
|
|
1823
1809
|
children: [/* @__PURE__ */ jsx(Spinner, {
|
|
1824
|
-
className: "h-3 w-3 shrink-0 text-
|
|
1810
|
+
className: "h-3 w-3 shrink-0 text-po-faint",
|
|
1825
1811
|
label: pending
|
|
1826
1812
|
}), /* @__PURE__ */ jsx("span", {
|
|
1827
|
-
className: "min-w-0 truncate text-sm text-
|
|
1813
|
+
className: "min-w-0 truncate text-sm text-po-dim",
|
|
1828
1814
|
children: pending
|
|
1829
1815
|
})]
|
|
1830
1816
|
}),
|
|
1831
1817
|
syncError === void 0 ? null : /* @__PURE__ */ jsxs("div", {
|
|
1832
1818
|
role: "alert",
|
|
1833
1819
|
"data-testid": "git-sync-error",
|
|
1834
|
-
className: "flex min-w-0 items-start gap-1.5 text-sm text-
|
|
1820
|
+
className: "flex min-w-0 items-start gap-1.5 text-sm text-po-red",
|
|
1835
1821
|
children: [
|
|
1836
1822
|
/* @__PURE__ */ jsx(AlertIcon, {
|
|
1837
1823
|
"aria-hidden": true,
|
|
@@ -1852,10 +1838,10 @@ function GitSyncBar({ changes, mergeBase, pending, error, errorTarget, onSync, o
|
|
|
1852
1838
|
}),
|
|
1853
1839
|
forceRequired ? /* @__PURE__ */ jsxs("div", {
|
|
1854
1840
|
"data-testid": "git-push-force-confirm",
|
|
1855
|
-
className: "flex min-w-0 flex-wrap items-center gap-2 rounded-md border border-
|
|
1841
|
+
className: "flex min-w-0 flex-wrap items-center gap-2 rounded-md border border-po-edge-yellow bg-po-tint-yellow px-2.5 py-2",
|
|
1856
1842
|
children: [
|
|
1857
1843
|
/* @__PURE__ */ jsx("span", {
|
|
1858
|
-
className: "min-w-0 flex-1 text-base text-
|
|
1844
|
+
className: "min-w-0 flex-1 text-base text-po-hi",
|
|
1859
1845
|
children: "The remote branch has commits yours replaced, usually after a rebase. Force push with lease? It is refused if the remote holds commits you never fetched and integrated."
|
|
1860
1846
|
}),
|
|
1861
1847
|
/* @__PURE__ */ jsx(Button, {
|
|
@@ -1877,7 +1863,7 @@ function GitSyncBar({ changes, mergeBase, pending, error, errorTarget, onSync, o
|
|
|
1877
1863
|
}) : null,
|
|
1878
1864
|
changes?.rebase === void 0 ? null : /* @__PURE__ */ jsxs("div", {
|
|
1879
1865
|
"data-testid": "git-rebase-banner",
|
|
1880
|
-
className: "flex min-w-0 flex-col gap-1.5 rounded-md border border-
|
|
1866
|
+
className: "flex min-w-0 flex-col gap-1.5 rounded-md border border-po-edge-red bg-po-tint-red px-2.5 py-2",
|
|
1881
1867
|
children: [
|
|
1882
1868
|
/* @__PURE__ */ jsxs("span", {
|
|
1883
1869
|
className: "flex min-w-0 items-center gap-1.5",
|
|
@@ -1886,14 +1872,14 @@ function GitSyncBar({ changes, mergeBase, pending, error, errorTarget, onSync, o
|
|
|
1886
1872
|
size: "xs",
|
|
1887
1873
|
children: "rebase paused"
|
|
1888
1874
|
}), /* @__PURE__ */ jsx("span", {
|
|
1889
|
-
className: "text-base text-
|
|
1875
|
+
className: "text-base text-po-hi",
|
|
1890
1876
|
children: changes.rebase.conflicts.length === 0 ? "git stopped the rebase" : `conflicts in ${String(changes.rebase.conflicts.length)} ${changes.rebase.conflicts.length === 1 ? "file" : "files"}`
|
|
1891
1877
|
})]
|
|
1892
1878
|
}),
|
|
1893
1879
|
changes.rebase.conflicts.length === 0 ? null : /* @__PURE__ */ jsx("ul", {
|
|
1894
1880
|
className: "flex flex-col gap-0.5 pl-1",
|
|
1895
1881
|
children: changes.rebase.conflicts.map((file) => /* @__PURE__ */ jsx("li", {
|
|
1896
|
-
className: "truncate font-mono text-sm text-
|
|
1882
|
+
className: "truncate font-mono text-sm text-po-dim",
|
|
1897
1883
|
children: file
|
|
1898
1884
|
}, file))
|
|
1899
1885
|
}),
|
|
@@ -1917,7 +1903,7 @@ function GitSyncBar({ changes, mergeBase, pending, error, errorTarget, onSync, o
|
|
|
1917
1903
|
children: "abort rebase"
|
|
1918
1904
|
}),
|
|
1919
1905
|
/* @__PURE__ */ jsx("span", {
|
|
1920
|
-
className: "text-sm text-
|
|
1906
|
+
className: "text-sm text-po-dim",
|
|
1921
1907
|
children: "abort discards any conflict resolution in progress"
|
|
1922
1908
|
})
|
|
1923
1909
|
]
|
|
@@ -2102,16 +2088,16 @@ function GitReviewView({ sync, summary, files, comments, onLoadFile, onAddCommen
|
|
|
2102
2088
|
"data-testid": "git-review-loading",
|
|
2103
2089
|
className: "flex flex-1 items-start gap-2 px-4 py-6",
|
|
2104
2090
|
children: [/* @__PURE__ */ jsx(Spinner, {
|
|
2105
|
-
className: "h-3 w-3 text-
|
|
2091
|
+
className: "h-3 w-3 text-po-faint",
|
|
2106
2092
|
label: "reading changes"
|
|
2107
2093
|
}), /* @__PURE__ */ jsx("span", {
|
|
2108
|
-
className: "text-sm text-
|
|
2094
|
+
className: "text-sm text-po-dim",
|
|
2109
2095
|
children: "reading changes…"
|
|
2110
2096
|
})]
|
|
2111
2097
|
}) : summary.state === "error" ? /* @__PURE__ */ jsx("p", {
|
|
2112
2098
|
role: "alert",
|
|
2113
2099
|
"data-testid": "git-review-error",
|
|
2114
|
-
className: "flex-1 px-4 py-6 text-sm text-
|
|
2100
|
+
className: "flex-1 px-4 py-6 text-sm text-po-red",
|
|
2115
2101
|
children: summary.error
|
|
2116
2102
|
}) : !summary.summary.repository ? /* @__PURE__ */ jsx(EmptyState, {
|
|
2117
2103
|
"data-testid": "git-review-no-repository",
|
|
@@ -2135,7 +2121,7 @@ function GitReviewView({ sync, summary, files, comments, onLoadFile, onAddCommen
|
|
|
2135
2121
|
"data-testid": "git-review-diffs",
|
|
2136
2122
|
className: "min-h-0 min-w-0 flex-1 overflow-y-auto",
|
|
2137
2123
|
children: [summary.summary.truncated ? /* @__PURE__ */ jsx("p", {
|
|
2138
|
-
className: "px-4 pt-2 text-sm text-
|
|
2124
|
+
className: "px-4 pt-2 text-sm text-po-dim",
|
|
2139
2125
|
children: "more files changed than the review lists; the rest are left out."
|
|
2140
2126
|
}) : null, entries.map((file, index) => /* @__PURE__ */ jsx(FileSection, {
|
|
2141
2127
|
id: sectionId(index),
|
|
@@ -2167,22 +2153,22 @@ function GitReviewView({ sync, summary, files, comments, onLoadFile, onAddCommen
|
|
|
2167
2153
|
}),
|
|
2168
2154
|
/* @__PURE__ */ jsxs("div", {
|
|
2169
2155
|
"data-testid": "git-review-footer",
|
|
2170
|
-
className: "flex shrink-0 flex-wrap items-center gap-2 border-t border-
|
|
2156
|
+
className: "flex shrink-0 flex-wrap items-center gap-2 border-t border-po-border-soft bg-po-panel px-3 py-2 sm:px-[26px]",
|
|
2171
2157
|
children: [
|
|
2172
2158
|
/* @__PURE__ */ jsx(MessageIcon, {
|
|
2173
2159
|
"aria-hidden": true,
|
|
2174
|
-
className: "h-3 w-3 text-
|
|
2160
|
+
className: "h-3 w-3 text-po-faint"
|
|
2175
2161
|
}),
|
|
2176
2162
|
/* @__PURE__ */ jsx("span", {
|
|
2177
2163
|
"data-testid": "git-review-comment-count",
|
|
2178
|
-
className: "text-sm text-
|
|
2164
|
+
className: "text-sm text-po-dim",
|
|
2179
2165
|
children: comments.length === 0 ? "no comments yet: select lines or click a line number" : `${String(comments.length)} ${comments.length === 1 ? "comment" : "comments"}`
|
|
2180
2166
|
}),
|
|
2181
2167
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1" }),
|
|
2182
2168
|
sendError === void 0 ? null : /* @__PURE__ */ jsx("span", {
|
|
2183
2169
|
role: "alert",
|
|
2184
2170
|
"data-testid": "git-review-send-error",
|
|
2185
|
-
className: "min-w-0 truncate text-sm text-
|
|
2171
|
+
className: "min-w-0 truncate text-sm text-po-red",
|
|
2186
2172
|
children: sendError
|
|
2187
2173
|
}),
|
|
2188
2174
|
/* @__PURE__ */ jsx(Button, {
|
|
@@ -2221,22 +2207,22 @@ function FileSection({ id, entry, state, collapsed, mounted, placeholderHeight,
|
|
|
2221
2207
|
const drafting = draft !== void 0 && draft.side === side && draft.endLine === row.line;
|
|
2222
2208
|
if (here.length === 0 && !drafting) return null;
|
|
2223
2209
|
return /* @__PURE__ */ jsxs("div", {
|
|
2224
|
-
className: "flex flex-col gap-1.5 border-y border-
|
|
2210
|
+
className: "flex flex-col gap-1.5 border-y border-po-border-soft bg-po-bg px-2 py-1.5 font-sans whitespace-normal",
|
|
2225
2211
|
children: [here.map((comment) => /* @__PURE__ */ jsxs("div", {
|
|
2226
2212
|
"data-testid": `git-review-comment-${comment.id}`,
|
|
2227
|
-
className: "flex min-w-0 items-start gap-2 rounded-md border border-
|
|
2213
|
+
className: "flex min-w-0 items-start gap-2 rounded-md border border-po-border-soft bg-po-panel px-2 py-1.5",
|
|
2228
2214
|
children: [
|
|
2229
2215
|
/* @__PURE__ */ jsx(MessageIcon, {
|
|
2230
2216
|
"aria-hidden": true,
|
|
2231
|
-
className: "mt-0.5 h-3 w-3 shrink-0 text-
|
|
2217
|
+
className: "mt-0.5 h-3 w-3 shrink-0 text-po-blue"
|
|
2232
2218
|
}),
|
|
2233
2219
|
/* @__PURE__ */ jsxs("span", {
|
|
2234
2220
|
className: "flex min-w-0 flex-1 flex-col gap-0.5",
|
|
2235
2221
|
children: [/* @__PURE__ */ jsx("span", {
|
|
2236
|
-
className: "font-mono text-sm text-
|
|
2222
|
+
className: "font-mono text-sm text-po-dim",
|
|
2237
2223
|
children: reviewCommentAnchor(comment)
|
|
2238
2224
|
}), /* @__PURE__ */ jsx("span", {
|
|
2239
|
-
className: "text-base whitespace-pre-wrap text-
|
|
2225
|
+
className: "text-base whitespace-pre-wrap text-po-text",
|
|
2240
2226
|
children: comment.body
|
|
2241
2227
|
})]
|
|
2242
2228
|
}),
|
|
@@ -2250,7 +2236,7 @@ function FileSection({ id, entry, state, collapsed, mounted, placeholderHeight,
|
|
|
2250
2236
|
})
|
|
2251
2237
|
]
|
|
2252
2238
|
}, comment.id)), drafting ? /* @__PURE__ */ jsx("div", {
|
|
2253
|
-
className: "rounded-md border border-
|
|
2239
|
+
className: "rounded-md border border-po-border bg-po-panel",
|
|
2254
2240
|
children: /* @__PURE__ */ jsx(ReviewCommentDraft, {
|
|
2255
2241
|
snippet: draft.snippet,
|
|
2256
2242
|
startLine: draft.startLine,
|
|
@@ -2267,31 +2253,31 @@ function FileSection({ id, entry, state, collapsed, mounted, placeholderHeight,
|
|
|
2267
2253
|
id,
|
|
2268
2254
|
"data-review-path": entry.path,
|
|
2269
2255
|
"data-testid": `git-review-file-${entry.path}`,
|
|
2270
|
-
className: "border-b border-
|
|
2256
|
+
className: "border-b border-po-border-soft",
|
|
2271
2257
|
children: [/* @__PURE__ */ jsxs(Button, {
|
|
2272
2258
|
variant: "ghost",
|
|
2273
2259
|
size: "card",
|
|
2274
2260
|
"aria-expanded": !collapsed,
|
|
2275
2261
|
onClick: onToggle,
|
|
2276
|
-
className: "sticky top-0 z-10 flex-row items-center gap-1.5 rounded-none border-b border-
|
|
2262
|
+
className: "sticky top-0 z-10 flex-row items-center gap-1.5 rounded-none border-b border-po-border-soft bg-po-rail px-3 py-1.5 hover:bg-po-panel sm:px-4",
|
|
2277
2263
|
children: [
|
|
2278
2264
|
collapsed ? /* @__PURE__ */ jsx(ChevronRightIcon, {
|
|
2279
2265
|
"aria-hidden": true,
|
|
2280
|
-
className: "h-3 w-3 shrink-0 text-
|
|
2266
|
+
className: "h-3 w-3 shrink-0 text-po-faint"
|
|
2281
2267
|
}) : /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
2282
2268
|
"aria-hidden": true,
|
|
2283
|
-
className: "h-3 w-3 shrink-0 text-
|
|
2269
|
+
className: "h-3 w-3 shrink-0 text-po-faint"
|
|
2284
2270
|
}),
|
|
2285
2271
|
/* @__PURE__ */ jsx("span", {
|
|
2286
|
-
className: "min-w-0 flex-1 truncate font-mono text-base font-semibold text-
|
|
2272
|
+
className: "min-w-0 flex-1 truncate font-mono text-base font-semibold text-po-hi",
|
|
2287
2273
|
children: entry.path
|
|
2288
2274
|
}),
|
|
2289
2275
|
/* @__PURE__ */ jsx("span", {
|
|
2290
|
-
className: "shrink-0 text-sm font-semibold text-
|
|
2276
|
+
className: "shrink-0 text-sm font-semibold text-po-dim",
|
|
2291
2277
|
children: STATUS_WORD[entry.status]
|
|
2292
2278
|
}),
|
|
2293
2279
|
comments.length === 0 ? null : /* @__PURE__ */ jsxs("span", {
|
|
2294
|
-
className: "flex shrink-0 items-center gap-0.5 text-sm text-
|
|
2280
|
+
className: "flex shrink-0 items-center gap-0.5 text-sm text-po-blue",
|
|
2295
2281
|
children: [/* @__PURE__ */ jsx(MessageIcon, {
|
|
2296
2282
|
"aria-hidden": true,
|
|
2297
2283
|
className: "h-2.5 w-2.5"
|
|
@@ -2301,12 +2287,12 @@ function FileSection({ id, entry, state, collapsed, mounted, placeholderHeight,
|
|
|
2301
2287
|
className: "shrink-0 text-2xs",
|
|
2302
2288
|
children: [
|
|
2303
2289
|
/* @__PURE__ */ jsxs("span", {
|
|
2304
|
-
className: "text-
|
|
2290
|
+
className: "text-po-green",
|
|
2305
2291
|
children: ["+", entry.added]
|
|
2306
2292
|
}),
|
|
2307
2293
|
" ",
|
|
2308
2294
|
/* @__PURE__ */ jsxs("span", {
|
|
2309
|
-
className: "text-
|
|
2295
|
+
className: "text-po-red",
|
|
2310
2296
|
children: ["-", entry.removed]
|
|
2311
2297
|
})
|
|
2312
2298
|
]
|
|
@@ -2321,17 +2307,17 @@ function FileSection({ id, entry, state, collapsed, mounted, placeholderHeight,
|
|
|
2321
2307
|
children: state === void 0 || state.state === "loading" ? /* @__PURE__ */ jsxs("div", {
|
|
2322
2308
|
className: "flex items-center gap-2 px-4 py-3",
|
|
2323
2309
|
children: [/* @__PURE__ */ jsx(Spinner, {
|
|
2324
|
-
className: "h-3 w-3 text-
|
|
2310
|
+
className: "h-3 w-3 text-po-faint",
|
|
2325
2311
|
label: `loading ${entry.path}`
|
|
2326
2312
|
}), /* @__PURE__ */ jsx("span", {
|
|
2327
|
-
className: "text-sm text-
|
|
2313
|
+
className: "text-sm text-po-dim",
|
|
2328
2314
|
children: "loading diff…"
|
|
2329
2315
|
})]
|
|
2330
2316
|
}) : state.state === "error" ? /* @__PURE__ */ jsxs("div", {
|
|
2331
2317
|
className: "flex items-center gap-2 px-4 py-3",
|
|
2332
2318
|
children: [/* @__PURE__ */ jsx("span", {
|
|
2333
2319
|
role: "alert",
|
|
2334
|
-
className: "text-sm text-
|
|
2320
|
+
className: "text-sm text-po-red",
|
|
2335
2321
|
children: state.error
|
|
2336
2322
|
}), /* @__PURE__ */ jsx(Button, {
|
|
2337
2323
|
variant: "ghost",
|
|
@@ -2340,10 +2326,10 @@ function FileSection({ id, entry, state, collapsed, mounted, placeholderHeight,
|
|
|
2340
2326
|
children: "retry"
|
|
2341
2327
|
})]
|
|
2342
2328
|
}) : state.diff.binary ? /* @__PURE__ */ jsx("p", {
|
|
2343
|
-
className: "px-4 py-3 text-sm text-
|
|
2329
|
+
className: "px-4 py-3 text-sm text-po-dim",
|
|
2344
2330
|
children: "binary file, not drawn"
|
|
2345
2331
|
}) : state.diff.tooLarge ? /* @__PURE__ */ jsx("p", {
|
|
2346
|
-
className: "px-4 py-3 text-sm text-
|
|
2332
|
+
className: "px-4 py-3 text-sm text-po-dim",
|
|
2347
2333
|
children: "this diff is too large to draw here"
|
|
2348
2334
|
}) : /* @__PURE__ */ jsx(DiffView, {
|
|
2349
2335
|
hunks: state.diff.hunks,
|
|
@@ -2533,29 +2519,29 @@ function DiffActivitySection({ sessionId, openTransientTab }) {
|
|
|
2533
2519
|
"data-testid": "activity-diff-changes",
|
|
2534
2520
|
"aria-label": `review ${changes.branch ?? "detached HEAD"} changes: ${String(changes.added)} added, ${String(changes.removed)} removed ${against}`,
|
|
2535
2521
|
title: `${String(changes.files)} ${changes.files === 1 ? "file" : "files"} ${against}`,
|
|
2536
|
-
className: `h-auto min-w-0 flex-1 shrink gap-2 px-0 py-0.5 hover:bg-transparent ${zero ? "text-
|
|
2522
|
+
className: `h-auto min-w-0 flex-1 shrink gap-2 px-0 py-0.5 hover:bg-transparent ${zero ? "text-po-faint" : ""}`,
|
|
2537
2523
|
onClick: () => openTransientTab(reviewTab()),
|
|
2538
2524
|
children: [
|
|
2539
2525
|
/* @__PURE__ */ jsx("span", {
|
|
2540
|
-
className: "min-w-0 flex-1 truncate text-left font-mono font-semibold text-
|
|
2526
|
+
className: "min-w-0 flex-1 truncate text-left font-mono font-semibold text-po-hi",
|
|
2541
2527
|
children: changes.branch ?? "detached HEAD"
|
|
2542
2528
|
}),
|
|
2543
2529
|
/* @__PURE__ */ jsxs("span", {
|
|
2544
|
-
className: zero ? "" : "text-
|
|
2530
|
+
className: zero ? "" : "text-po-green",
|
|
2545
2531
|
children: ["+", changes.added]
|
|
2546
2532
|
}),
|
|
2547
2533
|
/* @__PURE__ */ jsxs("span", {
|
|
2548
|
-
className: zero ? "" : "text-
|
|
2534
|
+
className: zero ? "" : "text-po-red",
|
|
2549
2535
|
children: ["-", changes.removed]
|
|
2550
2536
|
})
|
|
2551
2537
|
]
|
|
2552
2538
|
}), session.pending === void 0 ? null : /* @__PURE__ */ jsxs("span", {
|
|
2553
2539
|
className: "flex min-w-0 items-center gap-1.5",
|
|
2554
2540
|
children: [/* @__PURE__ */ jsx(Spinner, {
|
|
2555
|
-
className: "h-3 w-3 shrink-0 text-
|
|
2541
|
+
className: "h-3 w-3 shrink-0 text-po-faint",
|
|
2556
2542
|
label: session.pending
|
|
2557
2543
|
}), /* @__PURE__ */ jsx("span", {
|
|
2558
|
-
className: "min-w-0 truncate text-sm text-
|
|
2544
|
+
className: "min-w-0 truncate text-sm text-po-dim",
|
|
2559
2545
|
children: session.pending
|
|
2560
2546
|
})]
|
|
2561
2547
|
})]
|
|
@@ -2591,13 +2577,13 @@ function WorktreesSummary({ sessionId, openTransientTab }) {
|
|
|
2591
2577
|
className: "flex flex-wrap items-center gap-x-4 gap-y-1",
|
|
2592
2578
|
children: [/* @__PURE__ */ jsx("p", {
|
|
2593
2579
|
"data-testid": "activity-summary-git",
|
|
2594
|
-
className: "text-sm text-
|
|
2580
|
+
className: "text-sm text-po-dim",
|
|
2595
2581
|
children: "Idle"
|
|
2596
2582
|
}), sessionId === null ? null : /* @__PURE__ */ jsxs(Button, {
|
|
2597
2583
|
variant: "link",
|
|
2598
2584
|
size: "sm",
|
|
2599
2585
|
"data-testid": "activity-git-create",
|
|
2600
|
-
className: "h-auto gap-1 px-0 text-
|
|
2586
|
+
className: "h-auto gap-1 px-0 text-po-green",
|
|
2601
2587
|
onClick: () => openTransientTab(worktreesTab()),
|
|
2602
2588
|
children: ["Create a worktree", /* @__PURE__ */ jsx(ArrowRightIcon, {
|
|
2603
2589
|
"aria-hidden": true,
|
|
@@ -2611,10 +2597,10 @@ function WorktreesSummary({ sessionId, openTransientTab }) {
|
|
|
2611
2597
|
children: [session.pending === void 0 ? null : /* @__PURE__ */ jsxs("span", {
|
|
2612
2598
|
className: "flex min-w-0 items-center gap-1.5 px-1",
|
|
2613
2599
|
children: [/* @__PURE__ */ jsx(Spinner, {
|
|
2614
|
-
className: "h-3 w-3 shrink-0 text-
|
|
2600
|
+
className: "h-3 w-3 shrink-0 text-po-faint",
|
|
2615
2601
|
label: session.pending
|
|
2616
2602
|
}), /* @__PURE__ */ jsx("span", {
|
|
2617
|
-
className: "min-w-0 truncate text-sm text-
|
|
2603
|
+
className: "min-w-0 truncate text-sm text-po-dim",
|
|
2618
2604
|
children: session.pending
|
|
2619
2605
|
})]
|
|
2620
2606
|
}), worktrees.map((worktree) => /* @__PURE__ */ jsx(Button, {
|
|
@@ -2628,7 +2614,7 @@ function WorktreesSummary({ sessionId, openTransientTab }) {
|
|
|
2628
2614
|
children: [
|
|
2629
2615
|
/* @__PURE__ */ jsx(Dot, { tone: worktree.orphaned ? "red" : worktree.sessionId === null ? "muted" : "blue" }),
|
|
2630
2616
|
/* @__PURE__ */ jsx("span", {
|
|
2631
|
-
className: "min-w-0 flex-1 truncate text-left text-base font-semibold text-
|
|
2617
|
+
className: "min-w-0 flex-1 truncate text-left text-base font-semibold text-po-hi",
|
|
2632
2618
|
children: worktree.branch
|
|
2633
2619
|
}),
|
|
2634
2620
|
worktree.orphaned ? /* @__PURE__ */ jsx(StatusBadge, {
|
|
@@ -2714,11 +2700,11 @@ function RunWorktreeToolMessage({ args, output, running, isError }) {
|
|
|
2714
2700
|
children: [/* @__PURE__ */ jsx(MessageItemHeader, {
|
|
2715
2701
|
title: ACTION_LABEL[action] ?? "Worktree",
|
|
2716
2702
|
children: subject === "" ? null : /* @__PURE__ */ jsx("span", {
|
|
2717
|
-
className: "min-w-0 truncate font-mono text-
|
|
2703
|
+
className: "min-w-0 truncate font-mono text-po-dim",
|
|
2718
2704
|
children: subject
|
|
2719
2705
|
})
|
|
2720
2706
|
}), output === "" ? null : /* @__PURE__ */ jsx(MessageItemBody, { children: /* @__PURE__ */ jsx("pre", {
|
|
2721
|
-
className: `whitespace-pre-wrap font-mono text-sm ${isError ? "text-
|
|
2707
|
+
className: `whitespace-pre-wrap font-mono text-sm ${isError ? "text-po-red" : "text-po-dim"}`,
|
|
2722
2708
|
children: output
|
|
2723
2709
|
}) })]
|
|
2724
2710
|
});
|