@deepseek-ai/dsh-experimental-client-ui-forge 0.2.3-alpha.3 → 0.2.3-alpha.4
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.i18n.yaml +10 -10
- package/README.md +16 -15
- package/README.zh.md +16 -15
- package/lib/client.js +18 -18
- package/lib/client.js.map +1 -1
- package/lib/index.js +67 -18
- package/lib/typert.host.js +89 -45
- package/lib/typert.remote-client.d.ts +7 -7
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +48 -36
- package/lib/types/client/BranchPicker.d.ts.map +1 -1
- package/lib/types/client/BranchPicker.js.map +1 -1
- package/lib/types/client/ChangeRequestCard.d.ts +10 -1
- package/lib/types/client/ChangeRequestCard.d.ts.map +1 -1
- package/lib/types/client/ChangeRequestCard.js.map +1 -1
- package/lib/types/client/ChangeRequestOverview.d.ts +16 -0
- package/lib/types/client/ChangeRequestOverview.d.ts.map +1 -1
- package/lib/types/client/ChangeRequestOverview.js.map +1 -1
- package/lib/types/client/ChangeRequestsSection.d.ts.map +1 -1
- package/lib/types/client/ChangeRequestsSection.js.map +1 -1
- package/lib/types/client/ChangeStatus.d.ts +41 -0
- package/lib/types/client/ChangeStatus.d.ts.map +1 -0
- package/lib/types/client/ChangeStatus.js.map +1 -0
- package/lib/types/client/ChangedFiles.d.ts.map +1 -1
- package/lib/types/client/ChangedFiles.js.map +1 -1
- package/lib/types/client/ChangesTab.d.ts +23 -8
- package/lib/types/client/ChangesTab.d.ts.map +1 -1
- package/lib/types/client/ChangesTab.js.map +1 -1
- package/lib/types/client/CommitMenu.d.ts +8 -5
- package/lib/types/client/CommitMenu.d.ts.map +1 -1
- package/lib/types/client/CommitMenu.js.map +1 -1
- package/lib/types/client/CopyCommandButton.d.ts +19 -0
- package/lib/types/client/CopyCommandButton.d.ts.map +1 -0
- package/lib/types/client/CopyCommandButton.js.map +1 -0
- package/lib/types/client/DiffFile.d.ts +20 -3
- package/lib/types/client/DiffFile.d.ts.map +1 -1
- package/lib/types/client/DiffFile.js.map +1 -1
- package/lib/types/client/EnvironmentRows.d.ts.map +1 -1
- package/lib/types/client/EnvironmentRows.js.map +1 -1
- package/lib/types/client/FileLabel.d.ts +5 -5
- package/lib/types/client/FileLabel.d.ts.map +1 -1
- package/lib/types/client/FileLabel.js.map +1 -1
- package/lib/types/client/HostSettings.d.ts.map +1 -1
- package/lib/types/client/HostSettings.js.map +1 -1
- package/lib/types/client/LensFilter.d.ts.map +1 -1
- package/lib/types/client/LensFilter.js.map +1 -1
- package/lib/types/client/ReviewComposer.d.ts.map +1 -1
- package/lib/types/client/ReviewComposer.js.map +1 -1
- package/lib/types/client/ReviewControls.d.ts.map +1 -1
- package/lib/types/client/ReviewControls.js.map +1 -1
- package/lib/types/client/ReviewThread.d.ts.map +1 -1
- package/lib/types/client/ReviewThread.js.map +1 -1
- package/lib/types/client/ReviewThreads.d.ts +17 -2
- package/lib/types/client/ReviewThreads.d.ts.map +1 -1
- package/lib/types/client/ReviewThreads.js.map +1 -1
- package/lib/types/client/SubmitReview.d.ts.map +1 -1
- package/lib/types/client/SubmitReview.js.map +1 -1
- package/lib/types/client/ThreadList.d.ts.map +1 -1
- package/lib/types/client/ThreadList.js.map +1 -1
- package/lib/types/client/ViewOptionsMenu.d.ts.map +1 -1
- package/lib/types/client/ViewOptionsMenu.js.map +1 -1
- package/lib/types/client/WorktreeNameDialog.d.ts.map +1 -1
- package/lib/types/client/WorktreeNameDialog.js.map +1 -1
- package/lib/types/client/WorktreeProgress.d.ts.map +1 -1
- package/lib/types/client/WorktreeProgress.js.map +1 -1
- package/lib/types/client/WorktreeSettings.d.ts.map +1 -1
- package/lib/types/client/WorktreeSettings.js.map +1 -1
- package/lib/types/client/WorktreeToggle.d.ts.map +1 -1
- package/lib/types/client/WorktreeToggle.js.map +1 -1
- package/lib/types/client/changes-store.d.ts +7 -4
- package/lib/types/client/changes-store.d.ts.map +1 -1
- package/lib/types/client/changes-store.js.map +1 -1
- package/lib/types/client/glyphs.d.ts +14 -1
- package/lib/types/client/glyphs.d.ts.map +1 -1
- package/lib/types/client/glyphs.js.map +1 -1
- package/lib/types/client/index.d.ts +1 -2
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/index.js.map +1 -1
- package/lib/types/client/locales.d.ts +5 -4
- package/lib/types/client/locales.d.ts.map +1 -1
- package/lib/types/client/locales.js.map +1 -1
- package/lib/types/client/minute-clock.d.ts +7 -0
- package/lib/types/client/minute-clock.d.ts.map +1 -0
- package/lib/types/client/minute-clock.js.map +1 -0
- package/lib/types/client/mount.d.ts.map +1 -1
- package/lib/types/client/mount.js.map +1 -1
- package/lib/types/client/review-page/ReviewActivity.d.ts.map +1 -1
- package/lib/types/client/review-page/ReviewActivity.js.map +1 -1
- package/lib/types/client/review-page/ReviewChat.d.ts.map +1 -1
- package/lib/types/client/review-page/ReviewChat.js.map +1 -1
- package/lib/types/client/review-page/ReviewDetail.d.ts +4 -1
- package/lib/types/client/review-page/ReviewDetail.d.ts.map +1 -1
- package/lib/types/client/review-page/ReviewDetail.js.map +1 -1
- package/lib/types/client/review-page/ReviewList.d.ts.map +1 -1
- package/lib/types/client/review-page/ReviewList.js.map +1 -1
- package/lib/types/client/review-page/ReviewPage.d.ts +2 -2
- package/lib/types/client/review-page/ReviewPage.d.ts.map +1 -1
- package/lib/types/client/review-page/ReviewPage.js.map +1 -1
- package/lib/types/client/review-page/ReviewStatus.d.ts +17 -13
- package/lib/types/client/review-page/ReviewStatus.d.ts.map +1 -1
- package/lib/types/client/review-page/ReviewStatus.js.map +1 -1
- package/lib/types/client/review-page/review-store.d.ts +1 -1
- package/lib/types/client/review-threads.d.ts +14 -7
- package/lib/types/client/review-threads.d.ts.map +1 -1
- package/lib/types/client/review-threads.js.map +1 -1
- package/lib/types/client/status.d.ts +0 -6
- package/lib/types/client/status.d.ts.map +1 -1
- package/lib/types/client/status.js.map +1 -1
- package/lib/types/client/thread-state.d.ts +2 -2
- package/lib/types/client/thread-state.d.ts.map +1 -1
- package/lib/types/client/thread-state.js.map +1 -1
- package/lib/types/client/toolbar-fold.d.ts +16 -6
- package/lib/types/client/toolbar-fold.d.ts.map +1 -1
- package/lib/types/client/toolbar-fold.js.map +1 -1
- package/lib/types/index.d.ts +25 -12
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js.map +1 -1
- package/lib/types/panel.js.map +1 -1
- package/lib/types/types.d.ts +22 -5
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types/worktree.js.map +1 -1
- package/package.json +60 -58
- package/src/client/BaseMenu.module.css +6 -3
- package/src/client/BranchPicker.tsx +28 -19
- package/src/client/ChangeRequestCard.tsx +71 -41
- package/src/client/ChangeRequestOverview.tsx +174 -74
- package/src/client/ChangeRequestsSection.tsx +33 -8
- package/src/client/ChangeStatus.module.css +70 -0
- package/src/client/ChangeStatus.tsx +104 -0
- package/src/client/ChangedFiles.tsx +20 -7
- package/src/client/ChangesTab.module.css +89 -20
- package/src/client/ChangesTab.tsx +332 -134
- package/src/client/CommitMenu.tsx +77 -38
- package/src/client/CopyCommandButton.tsx +25 -0
- package/src/client/DiffFile.tsx +83 -21
- package/src/client/EnvironmentRows.tsx +13 -11
- package/src/client/FileLabel.module.css +16 -18
- package/src/client/FileLabel.tsx +15 -31
- package/src/client/Forge.module.css +3 -10
- package/src/client/HostSettings.tsx +10 -8
- package/src/client/LensFilter.tsx +11 -9
- package/src/client/ReviewComposer.tsx +29 -17
- package/src/client/ReviewControls.tsx +8 -6
- package/src/client/ReviewThread.tsx +63 -21
- package/src/client/ReviewThreads.tsx +126 -34
- package/src/client/SubmitReview.tsx +5 -3
- package/src/client/ThreadList.module.css +4 -3
- package/src/client/ThreadList.tsx +5 -5
- package/src/client/ViewOptionsMenu.tsx +10 -8
- package/src/client/WorktreeNameDialog.tsx +15 -11
- package/src/client/WorktreeProgress.tsx +11 -9
- package/src/client/WorktreeSettings.tsx +4 -3
- package/src/client/WorktreeToggle.tsx +65 -35
- package/src/client/changes-store.ts +8 -5
- package/src/client/glyphs.tsx +23 -1
- package/src/client/index.ts +1 -2
- package/src/client/locales.ts +40 -32
- package/src/client/minute-clock.ts +19 -0
- package/src/client/mount.ts +66 -51
- package/src/client/review-page/ReviewActivity.tsx +5 -4
- package/src/client/review-page/ReviewChat.tsx +46 -17
- package/src/client/review-page/ReviewDetail.tsx +62 -31
- package/src/client/review-page/ReviewList.tsx +23 -18
- package/src/client/review-page/ReviewPage.module.css +81 -10
- package/src/client/review-page/ReviewPage.tsx +43 -35
- package/src/client/review-page/ReviewStatus.tsx +64 -39
- package/src/client/review-threads.ts +23 -11
- package/src/client/status.ts +0 -9
- package/src/client/thread-state.ts +8 -7
- package/src/client/toolbar-fold.ts +59 -14
- package/src/index.ts +78 -20
- package/src/panel.ts +1 -1
- package/src/types.ts +24 -5
- package/src/worktree.ts +1 -1
- package/lib/types/client/AttentionIndicator.d.ts +0 -22
- package/lib/types/client/AttentionIndicator.d.ts.map +0 -1
- package/lib/types/client/AttentionIndicator.js.map +0 -1
- package/src/client/AttentionIndicator.tsx +0 -37
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** New Session option: start the Session in a new worktree, on a chosen or generated branch, from a local or remote branch. */
|
|
2
2
|
|
|
3
|
-
import { useState, type ReactNode } from 'react'
|
|
3
|
+
import { useCallback, useState, type ReactNode } from 'react'
|
|
4
4
|
import clsx from 'clsx'
|
|
5
5
|
import {
|
|
6
6
|
IconBranchOutlineRegular, IconCheckOutlineRegular, IconChevronDownOutlineRegular, IconEditOutlineRegular, IconPlusOutlineRegular,
|
|
@@ -79,28 +79,39 @@ function nameParts(branch: ForgeBaseBranch, remote: string | undefined): { reado
|
|
|
79
79
|
/** Id of the footer row that opens the naming dialog. */
|
|
80
80
|
const NAME_ENTRY = 'name'
|
|
81
81
|
|
|
82
|
+
/** One branch row of the worktree menu: the branch with its remote prefix and tag, choosing it as the request's base. */
|
|
83
|
+
function BranchRowButton({ branch, remote, tag, selected, onPick }: {
|
|
84
|
+
readonly branch: ForgeBaseBranch
|
|
85
|
+
readonly remote: string | undefined
|
|
86
|
+
readonly tag: string | undefined
|
|
87
|
+
readonly selected: boolean
|
|
88
|
+
readonly onPick: (ref: string) => void
|
|
89
|
+
}) {
|
|
90
|
+
const parts = nameParts(branch, remote)
|
|
91
|
+
const ref = branch.ref
|
|
92
|
+
const pick = useCallback((): void => { onPick(ref) }, [onPick, ref])
|
|
93
|
+
return (
|
|
94
|
+
<MenuItemButton icon={<IconBranchOutlineRegular size={14} />} current={selected} onSelect={pick}>
|
|
95
|
+
<span className={css.option} data-forge-worktree-base={ref}>
|
|
96
|
+
<span className={css.optionName}>
|
|
97
|
+
{parts.prefix !== '' && <span className={css.remotePrefix}>{parts.prefix}</span>}
|
|
98
|
+
{parts.rest}
|
|
99
|
+
</span>
|
|
100
|
+
{tag !== undefined && <span className={css.tag}>{tag}</span>}
|
|
101
|
+
{selected && <IconCheckOutlineRegular size={14} className={css.check} />}
|
|
102
|
+
</span>
|
|
103
|
+
</MenuItemButton>
|
|
104
|
+
)
|
|
105
|
+
}
|
|
106
|
+
|
|
82
107
|
function BranchRows({ rows, chosen, pick }: {
|
|
83
108
|
readonly rows: readonly BaseRow[]
|
|
84
109
|
readonly chosen: string | null
|
|
85
110
|
readonly pick: (ref: string) => void
|
|
86
111
|
}): ReactNode {
|
|
87
|
-
return rows.map(({ branch, remote, tag }) =>
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
return (
|
|
91
|
-
<MenuItemButton key={branch.ref} icon={<IconBranchOutlineRegular size={14} />} current={selected}
|
|
92
|
-
onSelect={() => { pick(branch.ref) }}>
|
|
93
|
-
<span className={css.option} data-forge-worktree-base={branch.ref}>
|
|
94
|
-
<span className={css.optionName}>
|
|
95
|
-
{parts.prefix !== '' && <span className={css.remotePrefix}>{parts.prefix}</span>}
|
|
96
|
-
{parts.rest}
|
|
97
|
-
</span>
|
|
98
|
-
{tag !== undefined && <span className={css.tag}>{tag}</span>}
|
|
99
|
-
{selected && <IconCheckOutlineRegular size={14} className={css.check} />}
|
|
100
|
-
</span>
|
|
101
|
-
</MenuItemButton>
|
|
102
|
-
)
|
|
103
|
-
})
|
|
112
|
+
return rows.map(({ branch, remote, tag }) => (
|
|
113
|
+
<BranchRowButton key={branch.ref} branch={branch} remote={remote} tag={tag} selected={branch.ref === chosen} onPick={pick} />
|
|
114
|
+
))
|
|
104
115
|
}
|
|
105
116
|
|
|
106
117
|
function WorktreeMenu({ from, name, held, bases, choose, nameBranch, t }: {
|
|
@@ -116,14 +127,18 @@ function WorktreeMenu({ from, name, held, bases, choose, nameBranch, t }: {
|
|
|
116
127
|
const [open, setOpen] = useState(false)
|
|
117
128
|
const { query, setQuery, listing, retry, reset } = useBranchSearch(open, bases)
|
|
118
129
|
const chosen = refOf(from)
|
|
119
|
-
const close = (): void => {
|
|
130
|
+
const close = useCallback((): void => {
|
|
120
131
|
setOpen(false)
|
|
121
132
|
reset()
|
|
122
|
-
}
|
|
123
|
-
const pick = (ref: string): void => {
|
|
133
|
+
}, [reset])
|
|
134
|
+
const pick = useCallback((ref: string): void => {
|
|
124
135
|
close()
|
|
125
136
|
if (ref !== chosen) choose(ref)
|
|
126
|
-
}
|
|
137
|
+
}, [choose, chosen, close])
|
|
138
|
+
const openNaming = useCallback((): void => {
|
|
139
|
+
close()
|
|
140
|
+
nameBranch()
|
|
141
|
+
}, [close, nameBranch])
|
|
127
142
|
const value = listing?.ok === true ? listing.value : null
|
|
128
143
|
const needle = query.trim().toLowerCase()
|
|
129
144
|
const matches = (branch: ForgeBaseBranch): boolean => branch.name.toLowerCase().includes(needle)
|
|
@@ -180,7 +195,7 @@ function WorktreeMenu({ from, name, held, bases, choose, nameBranch, t }: {
|
|
|
180
195
|
</span>
|
|
181
196
|
),
|
|
182
197
|
}]}
|
|
183
|
-
onSelect={
|
|
198
|
+
onSelect={openNaming}
|
|
184
199
|
anchor={
|
|
185
200
|
<Tooltip label={label} side="bottom" portal delayMs={500}>
|
|
186
201
|
<button type="button" className={clsx(css.base, name !== null && css.named)} aria-haspopup="menu" aria-expanded={open} aria-label={label}
|
|
@@ -200,6 +215,23 @@ function WorktreeMenu({ from, name, held, bases, choose, nameBranch, t }: {
|
|
|
200
215
|
)
|
|
201
216
|
}
|
|
202
217
|
|
|
218
|
+
/** The branch the option shows while no worktree is requested, or the base a request would start from. */
|
|
219
|
+
function CurrentBranchButton({ tip, text, requested }: {
|
|
220
|
+
readonly tip: string
|
|
221
|
+
readonly text: string
|
|
222
|
+
readonly requested: boolean
|
|
223
|
+
}) {
|
|
224
|
+
return (
|
|
225
|
+
<Tooltip label={tip} side="bottom" portal openOnClick>
|
|
226
|
+
<button type="button" className={css.current} aria-label={tip}
|
|
227
|
+
data-forge-current-branch={requested ? undefined : ''} data-forge-base-branch={requested ? '' : undefined}>
|
|
228
|
+
<IconBranchOutlineRegular size={14} />
|
|
229
|
+
<span className={css.baseLabel}>{text}</span>
|
|
230
|
+
</button>
|
|
231
|
+
</Tooltip>
|
|
232
|
+
)
|
|
233
|
+
}
|
|
234
|
+
|
|
203
235
|
/** What the option shows for a panel state, or undefined while it stays hidden. */
|
|
204
236
|
function optionOf(state: ForgePanelState | null): {
|
|
205
237
|
readonly blocker: Exclude<ForgeWorktreeBlocker, 'not-git'> | null
|
|
@@ -231,15 +263,19 @@ export function WorktreeToggle({ usePanel, request, cancel, bases, t }: Worktree
|
|
|
231
263
|
const [pending, setPending] = useState<boolean | null>(null)
|
|
232
264
|
const [naming, setNaming] = useState(false)
|
|
233
265
|
const option = optionOf(state)
|
|
266
|
+
const currentRef = option === undefined || option.current === null ? null : `${LOCAL_REF_PREFIX}${option.current}`
|
|
267
|
+
const from = state === null || state.worktree.request === null ? currentRef : state.worktree.request.from
|
|
268
|
+
const name = state?.worktree.request?.name ?? null
|
|
269
|
+
const submitName = useCallback((next: string | null): Promise<WorktreeRequestResult> => request(from, next), [from, request])
|
|
270
|
+
const closeNaming = useCallback((): void => { setNaming(false) }, [])
|
|
271
|
+
const chooseBase = useCallback((ref: string): void => { void request(ref, name) }, [name, request])
|
|
272
|
+
const openNaming = useCallback((): void => { setNaming(true) }, [])
|
|
234
273
|
if (state === null || option === undefined) return null
|
|
235
274
|
const held = state.worktree.creation !== null
|
|
236
275
|
const requested = pending ?? state.worktree.request !== null
|
|
237
276
|
const usable = option.blocker === null
|
|
238
277
|
const disabled = held || pending !== null || (!usable && !requested)
|
|
239
|
-
const currentRef = option.current === null ? null : `${LOCAL_REF_PREFIX}${option.current}`
|
|
240
278
|
const current = option.current ?? (option.commit === null ? t('checkout.detached') : t('worktree.detachedTip', { commit: option.commit }))
|
|
241
|
-
const from = state.worktree.request === null ? currentRef : state.worktree.request.from
|
|
242
|
-
const name = state.worktree.request?.name ?? null
|
|
243
279
|
const requestedText = name === null ? baseTextOf(from, t) : namedTipOf(name, from, t)
|
|
244
280
|
const branchText = requested ? requestedText : current
|
|
245
281
|
const branchTip = requested || option.current === null ? branchText : t('worktree.currentBranchTip', { branch: option.current })
|
|
@@ -251,15 +287,9 @@ export function WorktreeToggle({ usePanel, request, cancel, bases, t }: Worktree
|
|
|
251
287
|
<span className={css.root} data-forge-worktree="">
|
|
252
288
|
{requested && usable ? (
|
|
253
289
|
<WorktreeMenu from={from} name={name} held={held} bases={bases} t={t}
|
|
254
|
-
choose={
|
|
290
|
+
choose={chooseBase} nameBranch={openNaming} />
|
|
255
291
|
) : (
|
|
256
|
-
<
|
|
257
|
-
<button type="button" className={css.current} aria-label={branchTip}
|
|
258
|
-
data-forge-current-branch={requested ? undefined : ''} data-forge-base-branch={requested ? '' : undefined}>
|
|
259
|
-
<IconBranchOutlineRegular size={14} />
|
|
260
|
-
<span className={css.baseLabel}>{branchText}</span>
|
|
261
|
-
</button>
|
|
262
|
-
</Tooltip>
|
|
292
|
+
<CurrentBranchButton tip={branchTip} text={branchText} requested={requested} />
|
|
263
293
|
)}
|
|
264
294
|
<Tooltip label={option.blocker === null ? t('worktree.hint') : t(`worktree.blocked.${option.blocker}`)} side="bottom" delayMs={500}>
|
|
265
295
|
<label className={css.toggle} data-disabled={disabled ? '' : undefined}>
|
|
@@ -275,7 +305,7 @@ export function WorktreeToggle({ usePanel, request, cancel, bases, t }: Worktree
|
|
|
275
305
|
</Tooltip>
|
|
276
306
|
{naming && requested && (
|
|
277
307
|
<WorktreeNameDialog mode="name" initial={name ?? state.worktree.namePrefix} prefix={state.worktree.namePrefix} from={from}
|
|
278
|
-
named={name !== null} submit={
|
|
308
|
+
named={name !== null} submit={submitName} close={closeNaming} t={t} />
|
|
279
309
|
)}
|
|
280
310
|
</span>
|
|
281
311
|
)
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { defineStore, type EngineStoreHandle } from '@deepseek-ai/dsh-client-store'
|
|
10
|
-
import type { ForgeBaseBranch,
|
|
10
|
+
import type { ForgeBaseBranch, ForgeChangeCommits, ForgeFileLayer, ForgeLocalScope } from '../types.ts'
|
|
11
11
|
|
|
12
12
|
/** The branch local changes show in place of the Session's checked-out one. */
|
|
13
13
|
export interface ChangesHead {
|
|
@@ -33,8 +33,11 @@ export interface ChangesTabState {
|
|
|
33
33
|
head: ChangesHead | null
|
|
34
34
|
/** Branch the `branch` scope compares with, or null for the automatic fork point; other scopes keep it. */
|
|
35
35
|
base: ForgeBaseBranch | null
|
|
36
|
-
/**
|
|
37
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Commits shown instead of the whole change request or `branch` scope, or null for all of them. Only a change request
|
|
38
|
+
* view holds changes up to one commit.
|
|
39
|
+
*/
|
|
40
|
+
commits: ForgeChangeCommits | null
|
|
38
41
|
/** Review layer whose files show. */
|
|
39
42
|
lens: ChangesLens
|
|
40
43
|
/** Identity of the Host filter lens that keeps some of the shown files, or null for none. */
|
|
@@ -67,7 +70,7 @@ export type ChangesActions = {
|
|
|
67
70
|
headed: (draft: ChangesState, tabId: string, head: ChangesHead | null) => void
|
|
68
71
|
rooted: (draft: ChangesState, tabId: string, worktree: string | null) => void
|
|
69
72
|
based: (draft: ChangesState, tabId: string, base: ForgeBaseBranch | null) => void
|
|
70
|
-
committed: (draft: ChangesState, tabId: string, commits:
|
|
73
|
+
committed: (draft: ChangesState, tabId: string, commits: ForgeChangeCommits | null) => void
|
|
71
74
|
lensed: (draft: ChangesState, tabId: string, lens: ChangesLens) => void
|
|
72
75
|
filtered: (draft: ChangesState, tabId: string, lens: string | null) => void
|
|
73
76
|
toggledTests: (draft: ChangesState, tabId: string) => void
|
|
@@ -148,7 +151,7 @@ export const changesActions: ChangesActions = {
|
|
|
148
151
|
* @param tabId - the tab being drawn.
|
|
149
152
|
* @param commits - the commits, or null for all of them.
|
|
150
153
|
*/
|
|
151
|
-
committed: (d, tabId: string, commits:
|
|
154
|
+
committed: (d, tabId: string, commits: ForgeChangeCommits | null) => { bucket(d, tabId).commits = commits },
|
|
152
155
|
/**
|
|
153
156
|
* Show the files of another review layer.
|
|
154
157
|
* @param d - draft state.
|
package/src/client/glyphs.tsx
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Lifecycle glyphs of change requests, outcome glyphs of their checks, the marks of their code hosts, the marks of file
|
|
3
|
+
* headers, and the mark of the review page's list column.
|
|
4
|
+
*/
|
|
2
5
|
|
|
3
6
|
import type { ReactNode } from 'react'
|
|
4
7
|
import clsx from 'clsx'
|
|
@@ -193,3 +196,22 @@ export function FileMarkGlyph({ mark }: { readonly mark: FileMark }): ReactNode
|
|
|
193
196
|
</svg>
|
|
194
197
|
)
|
|
195
198
|
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Draw the decorative mark of the review page's list column, for the control that hides and shows it: the outline of
|
|
202
|
+
* the shared panel icon with three rows in its leading half, at the weight of the shared Regular icons. The rows tell
|
|
203
|
+
* it from the plain panel icon of the application sidebar's toggle, which can sit beside it.
|
|
204
|
+
* @param props.size - width and height in pixels, 16 by default.
|
|
205
|
+
* @returns the glyph.
|
|
206
|
+
*/
|
|
207
|
+
export function ListPanelGlyph({ size = 16 }: { readonly size?: number | undefined }): ReactNode {
|
|
208
|
+
return (
|
|
209
|
+
<svg width={size} height={size} viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth={1} strokeLinecap="round"
|
|
210
|
+
aria-hidden="true" data-forge-list-panel="">
|
|
211
|
+
<path vectorEffect="non-scaling-stroke"
|
|
212
|
+
d="M13.5 1.5H2.5C1.94772 1.5 1.5 1.94772 1.5 2.5V13.5C1.5 14.0523 1.94772 14.5 2.5 14.5H13.5C14.0523 14.5 14.5 14.0523 14.5 13.5V2.5C14.5 1.94772 14.0523 1.5 13.5 1.5Z" />
|
|
213
|
+
<path vectorEffect="non-scaling-stroke" d="M8 1.5V14.5" />
|
|
214
|
+
<path vectorEffect="non-scaling-stroke" d="M3.8 5H5.7M3.8 8H5.7M3.8 11H5.7" />
|
|
215
|
+
</svg>
|
|
216
|
+
)
|
|
217
|
+
}
|
package/src/client/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Browser entry of the forge panel: the Session panel's change requests
|
|
3
|
-
* section
|
|
3
|
+
* section and Environment rows, the changes view, the
|
|
4
4
|
* worktree option and creation card, and their Remote.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -27,7 +27,6 @@ export type {
|
|
|
27
27
|
export type { ChangesTabInjected, ChangesTabProps } from './ChangesTab.tsx'
|
|
28
28
|
export type { ChangesTabTitleProps } from './ChangesTabTitle.tsx'
|
|
29
29
|
export type { DiffFileAction, DiffFileProps, DiffFileText } from './DiffFile.tsx'
|
|
30
|
-
export type { AttentionIndicatorInjected, AttentionIndicatorProps } from './AttentionIndicator.tsx'
|
|
31
30
|
export type {
|
|
32
31
|
ChangeRequestsActionsInjected, ChangeRequestsActionsProps, ChangeRequestsSectionInjected, ChangeRequestsSectionProps,
|
|
33
32
|
} from './ChangeRequestsSection.tsx'
|