@buffcore/admin-shell 0.8.47 → 0.8.48
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/workbench/app/ServedComp.js +1 -1
- package/dist/workbench/app/ServedWork.js +4 -20
- package/dist/workbench/app/WorkFooter.d.ts +14 -0
- package/dist/workbench/app/WorkFooter.js +19 -0
- package/dist/workbench/app/WorkMerge.d.ts +2 -1
- package/dist/workbench/app/WorkMerge.js +11 -2
- package/dist/workbench/app/actions.d.ts +2 -0
- package/dist/workbench/app/actions.js +1 -0
- package/dist/workbench/app/prototype-comp.d.ts +1 -0
- package/dist/workbench/app/studio-post.js +7 -3
- package/dist/workbench/app/test/loop-fixture.d.ts +2 -0
- package/dist/workbench/app/useStudio.d.ts +1 -0
- package/dist/workbench/app/work.d.ts +2 -0
- package/dist/workbench/app/work.js +2 -0
- package/dist/workbench/studio/i18n/work.en.d.ts +1 -0
- package/dist/workbench/studio/i18n/work.en.js +1 -0
- package/dist/workbench/studio/i18n/work.es.json +1 -0
- package/dist/workbench/studio/loop/PrototypeComp.d.ts +2 -0
- package/dist/workbench/studio/loop/PrototypeComp.js +2 -2
- package/dist/workbench/studio/work/MergePreview.d.ts +3 -1
- package/dist/workbench/studio/work/MergePreview.js +2 -2
- package/dist/workbench/studio/work/work-test-data.d.ts +1 -0
- package/package.json +6 -6
|
@@ -21,7 +21,7 @@ export function useServedComp(reads, needsRight) {
|
|
|
21
21
|
title: screen.title,
|
|
22
22
|
light: screen.light && pictures[screen.light],
|
|
23
23
|
dark: screen.dark && pictures[screen.dark],
|
|
24
|
-
})), references: reply.references.map((name) => (name ? pictures[name] : undefined)), approved: reply.approved, approvedBy: reply.approval?.signatures[0]?.by, needsRight: needsRight, result: signing.result, onApprove: reply.fingerprint
|
|
24
|
+
})), references: reply.references.map((name) => (name ? pictures[name] : undefined)), approved: reply.approved, approvedBy: reply.approval?.signatures[0]?.by, why: reply.approvalRefusal, needsRight: needsRight, result: signing.result, onApprove: reply.fingerprint
|
|
25
25
|
? () => void signing.approve(async () => {
|
|
26
26
|
const answer = await reads.approve(reply.fingerprint);
|
|
27
27
|
reload();
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
import { useT } from '@buffcore/i18n/react';
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
2
|
import { useLayoutEffect, useRef, useState } from 'react';
|
|
4
|
-
import { ClashWarning, OneAtATime, OtherWorktrees, Worktrees } from '../studio/work/FirstBuild.js';
|
|
5
|
-
import { Stack } from '../studio/work/parts.js';
|
|
6
|
-
import { Waiting } from '../studio/work/Waiting.js';
|
|
7
3
|
import { WorkPage } from '../studio/work/WorkPage.js';
|
|
8
4
|
import { WorkApproval } from './WorkApproval.js';
|
|
9
5
|
import { WorkBuildActions } from './WorkBuildActions.js';
|
|
6
|
+
import { WorkFooter } from './WorkFooter.js';
|
|
10
7
|
import { MergeHold, WorkMerge } from './WorkMerge.js';
|
|
11
8
|
import { WorkPlacesApproval } from './WorkPlacesApproval.js';
|
|
12
9
|
import { WorkPreparation } from './WorkPreparation.js';
|
|
13
10
|
import { WorkRetry } from './WorkRetry.js';
|
|
14
|
-
import { canBuildChange, codingPrerequisite, workCallbacks, workView } from './work.js';
|
|
11
|
+
import { canBuildChange, codingPrerequisite, withdrawable, workCallbacks, workView, } from './work.js';
|
|
15
12
|
import { workPlan } from './work-plan.js';
|
|
16
13
|
export function ServedWork({ state, actions, ui, onUi, position, change, onChange, onStep, }) {
|
|
17
14
|
const scroll = useRef(null);
|
|
@@ -95,7 +92,7 @@ export function ServedWork({ state, actions, ui, onUi, position, change, onChang
|
|
|
95
92
|
held,
|
|
96
93
|
work.merging,
|
|
97
94
|
work.merges?.find((entry) => entry.change === change),
|
|
98
|
-
]), read: readPreview, merge: selected?.card.canMerge ? actions.merge : undefined })) : undefined, onSend: onStep &&
|
|
95
|
+
]), read: readPreview, merge: selected?.card.canMerge ? actions.merge : undefined, withdraw: mayBuild && withdrawable(state, change) ? actions.withdrawMerge : undefined })) : undefined, onSend: onStep &&
|
|
99
96
|
((text) => {
|
|
100
97
|
if (!canBuild)
|
|
101
98
|
return false;
|
|
@@ -110,16 +107,3 @@ export function ServedWork({ state, actions, ui, onUi, position, change, onChang
|
|
|
110
107
|
setComposer(codingPrerequisite(state, id).status === 'ready');
|
|
111
108
|
} }) }));
|
|
112
109
|
}
|
|
113
|
-
function WorkFooter({ view, waiting, hold, onRelease, onPrototype, onChange, onClash, cards, }) {
|
|
114
|
-
const t = useT();
|
|
115
|
-
const first = view.first;
|
|
116
|
-
if (!hold &&
|
|
117
|
-
!waiting.length &&
|
|
118
|
-
!cards?.length &&
|
|
119
|
-
!first?.queue &&
|
|
120
|
-
!first?.clashes?.length &&
|
|
121
|
-
!first?.worktrees.length &&
|
|
122
|
-
!first?.others?.length)
|
|
123
|
-
return null;
|
|
124
|
-
return (_jsxs(Stack, { children: [hold, _jsx(Waiting, { list: waiting, onAction: onRelease, onPrototype: onPrototype, onChange: onChange, cards: cards }), first?.queue && _jsx(OneAtATime, { q: first.queue }), first?.clashes?.map((clash) => (_jsx(ClashWarning, { onBoth: onClash, clash: clash }, `${clash.a}/${clash.b}`))), !!first?.worktrees.length && (_jsxs("details", { children: [_jsx("summary", { style: { minBlockSize: 'var(--target)', cursor: 'pointer' }, children: t('studio.later.wt.title') }), _jsx(Worktrees, { list: first.worktrees, where: t('studio.frame.rail.computerShort') })] })), !!first?.others?.length && (_jsxs("details", { children: [_jsx("summary", { style: { minBlockSize: 'var(--target)', cursor: 'pointer' }, children: t('studio.later.wt.others') }), _jsx(OtherWorktrees, { list: first.others })] }))] }));
|
|
125
|
-
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Wait } from '../studio/work/types.ts';
|
|
3
|
+
import type { workView } from './work.ts';
|
|
4
|
+
/** Under the work page: the hold, waits, the one-at-a-time queue, clashes and worktrees. */
|
|
5
|
+
export declare function WorkFooter({ view, waiting, hold, onRelease, onPrototype, onChange, onClash, cards, }: {
|
|
6
|
+
view: ReturnType<typeof workView>;
|
|
7
|
+
waiting: readonly Wait[];
|
|
8
|
+
hold?: ReactNode;
|
|
9
|
+
onRelease?: () => void;
|
|
10
|
+
onPrototype?: (change: string, version?: number) => void;
|
|
11
|
+
onChange?: (change: string) => void;
|
|
12
|
+
onClash: (id: string) => void;
|
|
13
|
+
cards?: ReactNode[];
|
|
14
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useT } from '@buffcore/i18n/react';
|
|
3
|
+
import { ClashWarning, OneAtATime, OtherWorktrees, Worktrees } from '../studio/work/FirstBuild.js';
|
|
4
|
+
import { Stack } from '../studio/work/parts.js';
|
|
5
|
+
import { Waiting } from '../studio/work/Waiting.js';
|
|
6
|
+
/** Under the work page: the hold, waits, the one-at-a-time queue, clashes and worktrees. */
|
|
7
|
+
export function WorkFooter({ view, waiting, hold, onRelease, onPrototype, onChange, onClash, cards, }) {
|
|
8
|
+
const t = useT();
|
|
9
|
+
const first = view.first;
|
|
10
|
+
if (!hold &&
|
|
11
|
+
!waiting.length &&
|
|
12
|
+
!cards?.length &&
|
|
13
|
+
!first?.queue &&
|
|
14
|
+
!first?.clashes?.length &&
|
|
15
|
+
!first?.worktrees.length &&
|
|
16
|
+
!first?.others?.length)
|
|
17
|
+
return null;
|
|
18
|
+
return (_jsxs(Stack, { children: [hold, _jsx(Waiting, { list: waiting, onAction: onRelease, onPrototype: onPrototype, onChange: onChange, cards: cards }), first?.queue && _jsx(OneAtATime, { q: first.queue }), first?.clashes?.map((clash) => (_jsx(ClashWarning, { onBoth: onClash, clash: clash }, `${clash.a}/${clash.b}`))), !!first?.worktrees.length && (_jsxs("details", { children: [_jsx("summary", { style: { minBlockSize: 'var(--target)', cursor: 'pointer' }, children: t('studio.later.wt.title') }), _jsx(Worktrees, { list: first.worktrees, where: t('studio.frame.rail.computerShort') })] })), !!first?.others?.length && (_jsxs("details", { children: [_jsx("summary", { style: { minBlockSize: 'var(--target)', cursor: 'pointer' }, children: t('studio.later.wt.others') }), _jsx(OtherWorktrees, { list: first.others })] }))] }));
|
|
19
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { StudioActions } from './actions.ts';
|
|
2
|
-
export declare function WorkMerge({ change, revision, read, merge, }: {
|
|
2
|
+
export declare function WorkMerge({ change, revision, read, merge, withdraw, }: {
|
|
3
3
|
change: string;
|
|
4
4
|
revision: string;
|
|
5
5
|
read: NonNullable<StudioActions['previewMerge']>;
|
|
6
6
|
merge?: StudioActions['merge'];
|
|
7
|
+
withdraw?: StudioActions['withdrawMerge'];
|
|
7
8
|
}): import("react").JSX.Element;
|
|
8
9
|
/**
|
|
9
10
|
* The switch takes the server's answer at once. The answer holds until a poll shows a different
|
|
@@ -3,7 +3,7 @@ import { useT } from '@buffcore/i18n/react';
|
|
|
3
3
|
import { useEffect, useRef, useState } from 'react';
|
|
4
4
|
import { Switch } from '../../components/Switch.js';
|
|
5
5
|
import { MergePreviewPanel } from '../studio/work/MergePreview.js';
|
|
6
|
-
export function WorkMerge({ change, revision, read, merge, }) {
|
|
6
|
+
export function WorkMerge({ change, revision, read, merge, withdraw, }) {
|
|
7
7
|
const [shown, show] = useState();
|
|
8
8
|
const [merging, setMerging] = useState(false);
|
|
9
9
|
useEffect(() => {
|
|
@@ -23,7 +23,16 @@ export function WorkMerge({ change, revision, read, merge, }) {
|
|
|
23
23
|
setMerging(false);
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
|
|
26
|
+
const end = async () => {
|
|
27
|
+
setMerging(true);
|
|
28
|
+
try {
|
|
29
|
+
await withdraw?.(change);
|
|
30
|
+
}
|
|
31
|
+
finally {
|
|
32
|
+
setMerging(false);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
return (_jsx(MergePreviewPanel, { preview: shown?.preview, stale: shown !== undefined && shown.revision !== revision, merging: merging, onMerge: merge && confirm, onWithdraw: withdraw && end }));
|
|
27
36
|
}
|
|
28
37
|
/**
|
|
29
38
|
* The switch takes the server's answer at once. The answer holds until a poll shows a different
|
|
@@ -79,6 +79,8 @@ export interface StudioActions {
|
|
|
79
79
|
/** Sends a stopped turn's last message again, as the panel's Retry does. */
|
|
80
80
|
retryTurn?: (chat: string) => Promise<unknown>;
|
|
81
81
|
holdMerges?: (held: boolean) => Promise<unknown>;
|
|
82
|
+
/** Ends a wait the host never answered (a person's own choice). */
|
|
83
|
+
withdrawMerge?: (change: string) => Promise<unknown>;
|
|
82
84
|
removeWorktree: (change: string) => Promise<unknown>;
|
|
83
85
|
/** A fresh agent's turns: the review before Save and the critique (fresh.ts). */
|
|
84
86
|
fresh?: FreshActions;
|
|
@@ -126,6 +126,7 @@ export function studioActions(post, prototypeScenes, prototypeHome, previewMerge
|
|
|
126
126
|
}
|
|
127
127
|
: undefined,
|
|
128
128
|
holdMerges: (held) => post(workbenchApi.mergeHold, { held }),
|
|
129
|
+
withdrawMerge: (change) => post('/api/merge/withdraw', { change }),
|
|
129
130
|
removeWorktree: (change) => post('/api/worktree', { change, action: 'remove' }),
|
|
130
131
|
save: async (step, fingerprint, files, change) => {
|
|
131
132
|
const answer = await post('/api/save', {
|
|
@@ -80,7 +80,8 @@ export function studioPost(fetch, headers, read, setDetail, setTrouble, offline)
|
|
|
80
80
|
await read();
|
|
81
81
|
return result;
|
|
82
82
|
}
|
|
83
|
-
|
|
83
|
+
const mergeDoor = path === '/api/merge' || path === '/api/merge/withdraw';
|
|
84
|
+
if (mergeDoor && res.status === 409 && typeof result.detail === 'string') {
|
|
84
85
|
await read();
|
|
85
86
|
return result;
|
|
86
87
|
}
|
|
@@ -117,7 +118,8 @@ export function studioPost(fetch, headers, read, setDetail, setTrouble, offline)
|
|
|
117
118
|
}
|
|
118
119
|
function successfulNotice(path, result, status, setDetail) {
|
|
119
120
|
const sent = /^\/api\/chats\/([^/]+)\/send$/.exec(path)?.[1];
|
|
120
|
-
if (path === '/api/merge'
|
|
121
|
+
if ((path === '/api/merge' || path === '/api/merge/withdraw') &&
|
|
122
|
+
typeof result.detail === 'string')
|
|
121
123
|
setDetail(() => ({
|
|
122
124
|
text: result.detail,
|
|
123
125
|
merge: status === 202 ? 'waiting' : 'outcome',
|
|
@@ -140,7 +142,9 @@ function failureNotice(path, result, status, offline) {
|
|
|
140
142
|
text,
|
|
141
143
|
chat: chatNotice(path),
|
|
142
144
|
busy: path.endsWith('/send') && status === 409,
|
|
143
|
-
...(path === '/api/merge'
|
|
145
|
+
...((path === '/api/merge' || path === '/api/merge/withdraw') && status === 409
|
|
146
|
+
? { merge: 'outcome' }
|
|
147
|
+
: {}),
|
|
144
148
|
};
|
|
145
149
|
}
|
|
146
150
|
function designAnswer(path, body) {
|
|
@@ -348,6 +348,7 @@ export declare function loopApi(initial?: {
|
|
|
348
348
|
head: string;
|
|
349
349
|
kind: "merged" | "refused" | "waiting";
|
|
350
350
|
again?: true | undefined;
|
|
351
|
+
automatic?: true | undefined;
|
|
351
352
|
at: string;
|
|
352
353
|
detail: string;
|
|
353
354
|
}[] | undefined;
|
|
@@ -844,6 +845,7 @@ export declare function loopApi(initial?: {
|
|
|
844
845
|
head: string;
|
|
845
846
|
kind: "merged" | "refused" | "waiting";
|
|
846
847
|
again?: true | undefined;
|
|
848
|
+
automatic?: true | undefined;
|
|
847
849
|
at: string;
|
|
848
850
|
detail: string;
|
|
849
851
|
}[] | undefined;
|
|
@@ -52,6 +52,7 @@ export declare function useStudio({ token, fetch, every }: StudioAppProps): {
|
|
|
52
52
|
previewMerge?: (change: string, signal: AbortSignal) => Promise<import("@buffcore/contracts/workbench").MergePreview | undefined>;
|
|
53
53
|
retryTurn?: (chat: string) => Promise<unknown>;
|
|
54
54
|
holdMerges?: (held: boolean) => Promise<unknown>;
|
|
55
|
+
withdrawMerge?: (change: string) => Promise<unknown>;
|
|
55
56
|
removeWorktree: (change: string) => Promise<unknown>;
|
|
56
57
|
fresh?: import("./fresh.ts").FreshActions;
|
|
57
58
|
save: (step: import("./actions.ts").SaveStep, fingerprint?: string, files?: readonly string[], change?: string) => Promise<import("./actions.ts").SaveResult>;
|
|
@@ -5,6 +5,8 @@ import type { StudioActions } from './actions.ts';
|
|
|
5
5
|
export declare const workCallbacks: (actions: StudioActions) => {
|
|
6
6
|
onMerge: (change: string) => Promise<unknown>;
|
|
7
7
|
};
|
|
8
|
+
/** Only an Autopilot wait can be withdrawn; a person's own merge request stays theirs. */
|
|
9
|
+
export declare const withdrawable: (state: StudioState, change: string) => boolean;
|
|
8
10
|
/**
|
|
9
11
|
* Only the selected change's latest recorded version can satisfy coding's prerequisite, unless the
|
|
10
12
|
* change's header says it has no screens: then it is ready with no version (the server's coding
|
|
@@ -2,6 +2,8 @@ import { approvalHolds, signatureCount } from '@buffcore/contracts/approvals';
|
|
|
2
2
|
import { changeNeedsPrototype } from '@buffcore/contracts/workbench';
|
|
3
3
|
/** The container passes these callbacks to WorkPage; views do not perform network requests. */
|
|
4
4
|
export const workCallbacks = (actions) => ({ onMerge: actions.merge });
|
|
5
|
+
/** Only an Autopilot wait can be withdrawn; a person's own merge request stays theirs. */
|
|
6
|
+
export const withdrawable = (state, change) => state.work?.merges?.some((entry) => entry.change === change && entry.kind === 'waiting' && entry.automatic) === true;
|
|
5
7
|
/**
|
|
6
8
|
* Only the selected change's latest recorded version can satisfy coding's prerequisite, unless the
|
|
7
9
|
* change's header says it has no screens: then it is ready with no version (the server's coding
|
|
@@ -102,6 +102,7 @@ declare const _default: {
|
|
|
102
102
|
readonly 'studio.work.merge.tooLarge': 'Some details are too large to preview.';
|
|
103
103
|
readonly 'studio.work.merge.snapshot': 'When required, a prototype snapshot runs on main after merging.';
|
|
104
104
|
readonly 'studio.work.merge.confirm': 'Merge change';
|
|
105
|
+
readonly 'studio.work.merge.withdraw': 'Withdraw merge request';
|
|
105
106
|
readonly 'studio.work.version': 'Prototype version {version}';
|
|
106
107
|
readonly 'studio.work.status.no-change': 'Choose a change first';
|
|
107
108
|
readonly 'studio.work.status.missing': 'Create this change’s prototype';
|
|
@@ -102,6 +102,7 @@ export default {
|
|
|
102
102
|
'studio.work.merge.tooLarge': 'Some details are too large to preview.',
|
|
103
103
|
'studio.work.merge.snapshot': 'When required, a prototype snapshot runs on main after merging.',
|
|
104
104
|
'studio.work.merge.confirm': 'Merge change',
|
|
105
|
+
'studio.work.merge.withdraw': 'Withdraw merge request',
|
|
105
106
|
'studio.work.version': 'Prototype version {version}',
|
|
106
107
|
'studio.work.status.no-change': 'Choose a change first',
|
|
107
108
|
'studio.work.status.missing': 'Create this change’s prototype',
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
"studio.work.merge.tooLarge": "Algunos detalles son demasiado grandes para la vista previa.",
|
|
103
103
|
"studio.work.merge.snapshot": "Cuando se requiere, se genera una captura del prototipo en main después de la integración.",
|
|
104
104
|
"studio.work.merge.confirm": "Integrar cambio",
|
|
105
|
+
"studio.work.merge.withdraw": "Retirar solicitud de integración",
|
|
105
106
|
"studio.work.version": "Versión {version} del prototipo",
|
|
106
107
|
"studio.work.status.no-change": "Primero elige un cambio",
|
|
107
108
|
"studio.work.status.missing": "Crea el prototipo de este cambio",
|
|
@@ -16,6 +16,8 @@ export interface PrototypeCompProps {
|
|
|
16
16
|
approved: boolean;
|
|
17
17
|
/** Who approved it (git's user.email), once approved. */
|
|
18
18
|
approvedBy?: string;
|
|
19
|
+
/** Why the look is not approved: a host's refusal, in the words the other approvals show. */
|
|
20
|
+
why?: string;
|
|
19
21
|
needsRight?: 'approve';
|
|
20
22
|
result?: DesignResult;
|
|
21
23
|
onApprove?: () => void;
|
|
@@ -43,11 +43,11 @@ function ScreenPicture({ screen, dark }) {
|
|
|
43
43
|
return _jsx("img", { src: src, alt: screen.title, style: frame });
|
|
44
44
|
return (_jsx("div", { role: "img", "aria-label": t('studio.comp.noPicture'), style: { ...frame, aspectRatio: '16 / 10', background: 'var(--surface-sunken)' } }));
|
|
45
45
|
}
|
|
46
|
-
function CompActions({ approved, approvedBy, needsRight, result, onApprove, onClose, }) {
|
|
46
|
+
function CompActions({ approved, approvedBy, why, needsRight, result, onApprove, onClose, }) {
|
|
47
47
|
const t = useT();
|
|
48
48
|
return (_jsx(ActionBar, { secondary: onClose && (_jsx(Button, { variant: "ghost", size: "lg", onClick: onClose, children: t('studio.comp.back') })), status: _jsx("span", { style: captionText, children: approved
|
|
49
49
|
? t('studio.comp.approvedBy', { by: approvedBy ?? '' })
|
|
50
|
-
: (result?.output ?? t('studio.comp.change')) }), primary: approved ? (_jsx(Badge, { tone: "success", children: t('studio.comp.approved') })) : (_jsx(RightAction, { size: "lg", icon: "shield-check", needsRight: needsRight, loading: result?.busy, disabled: !onApprove, onClick: onApprove, children: t('studio.comp.approve') })) }));
|
|
50
|
+
: (result?.output ?? why ?? t('studio.comp.change')) }), primary: approved ? (_jsx(Badge, { tone: "success", children: t('studio.comp.approved') })) : (_jsx(RightAction, { size: "lg", icon: "shield-check", needsRight: needsRight, loading: result?.busy, disabled: !onApprove, onClick: onApprove, children: t('studio.comp.approve') })) }));
|
|
51
51
|
}
|
|
52
52
|
/** A neutral stand-in where `design/references.md` names no picture: shapes, never a product. */
|
|
53
53
|
function ReferencePlaceholder({ variant, label }) {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { MergePreview } from '@buffcore/contracts/workbench';
|
|
2
|
-
export declare function MergePreviewPanel({ preview, onMerge, merging, stale, }: {
|
|
2
|
+
export declare function MergePreviewPanel({ preview, onMerge, onWithdraw, merging, stale, }: {
|
|
3
3
|
preview: MergePreview | null | undefined;
|
|
4
4
|
onMerge?: () => void;
|
|
5
|
+
/** Only while the host has not answered this change's merge request. */
|
|
6
|
+
onWithdraw?: () => void;
|
|
5
7
|
merging: boolean;
|
|
6
8
|
stale: boolean;
|
|
7
9
|
}): import("react").JSX.Element;
|
|
@@ -2,9 +2,9 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import { useT } from '@buffcore/i18n/react';
|
|
3
3
|
import { Button } from '../../../components/Button.js';
|
|
4
4
|
import { List, Mono } from './parts.js';
|
|
5
|
-
export function MergePreviewPanel({ preview, onMerge, merging, stale, }) {
|
|
5
|
+
export function MergePreviewPanel({ preview, onMerge, onWithdraw, merging, stale, }) {
|
|
6
6
|
const t = useT();
|
|
7
|
-
return (_jsxs(_Fragment, { children: [_jsx("strong", { children: t('studio.work.merge.title') }), stale && _jsx("span", { role: "status", children: t('studio.work.merge.stale') }), preview ? (_jsxs(_Fragment, { children: [_jsx("span", { children: t('studio.work.merge.files', { count: preview.filesChanged }) }), _jsx("span", { children: t('studio.work.merge.behind', { count: preview.behind }) }), _jsx("span", { children: t(`studio.work.merge.state.${preview.merge}`) }), preview.busy && _jsx("span", { children: t('studio.work.merge.busy') }), preview.held && _jsx("span", { children: t('studio.work.merge.held') }), preview.limited && _jsx("span", { children: t('studio.work.merge.tooLarge') }), preview.checks ? (_jsxs(_Fragment, { children: [_jsx(PreviewChecks, { stage: "before", ...preview.checks.before }), _jsx(PreviewChecks, { stage: "after", ...preview.checks.after })] })) : (_jsx("span", { children: t('studio.work.merge.checksUnknown') })), _jsx("span", { children: t('studio.work.merge.snapshot') })] })) : (_jsx("span", { role: "status", children: t(preview === null ? 'studio.work.merge.unavailable' : 'studio.work.merge.loading') })), preview !== undefined && onMerge && (_jsx(Button, { variant: "secondary", style: { minBlockSize: 'var(--target)', minInlineSize: 'var(--target)' }, disabled: merging || stale, onClick: onMerge, children: t('studio.work.merge.confirm') }))] }));
|
|
7
|
+
return (_jsxs(_Fragment, { children: [_jsx("strong", { children: t('studio.work.merge.title') }), stale && _jsx("span", { role: "status", children: t('studio.work.merge.stale') }), preview ? (_jsxs(_Fragment, { children: [_jsx("span", { children: t('studio.work.merge.files', { count: preview.filesChanged }) }), _jsx("span", { children: t('studio.work.merge.behind', { count: preview.behind }) }), _jsx("span", { children: t(`studio.work.merge.state.${preview.merge}`) }), preview.busy && _jsx("span", { children: t('studio.work.merge.busy') }), preview.held && _jsx("span", { children: t('studio.work.merge.held') }), preview.limited && _jsx("span", { children: t('studio.work.merge.tooLarge') }), preview.checks ? (_jsxs(_Fragment, { children: [_jsx(PreviewChecks, { stage: "before", ...preview.checks.before }), _jsx(PreviewChecks, { stage: "after", ...preview.checks.after })] })) : (_jsx("span", { children: t('studio.work.merge.checksUnknown') })), _jsx("span", { children: t('studio.work.merge.snapshot') })] })) : (_jsx("span", { role: "status", children: t(preview === null ? 'studio.work.merge.unavailable' : 'studio.work.merge.loading') })), preview !== undefined && onMerge && (_jsx(Button, { variant: "secondary", style: { minBlockSize: 'var(--target)', minInlineSize: 'var(--target)' }, disabled: merging || stale, onClick: onMerge, children: t('studio.work.merge.confirm') })), onWithdraw && (_jsx(Button, { variant: "secondary", style: { minBlockSize: 'var(--target)', minInlineSize: 'var(--target)' }, disabled: merging, onClick: onWithdraw, children: t('studio.work.merge.withdraw') }))] }));
|
|
8
8
|
}
|
|
9
9
|
function PreviewChecks({ stage, commands, more, }) {
|
|
10
10
|
const t = useT();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buffcore/admin-shell",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.48",
|
|
4
4
|
"description": "The React DOM admin console for a BuffCore product, with its prototype viewer.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "BuffApe",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"@tanstack/react-router": "1.170.42",
|
|
38
38
|
"firebase": "12.19.0",
|
|
39
39
|
"qrcode": "1.5.4",
|
|
40
|
-
"@buffcore/
|
|
41
|
-
"@buffcore/
|
|
42
|
-
"@buffcore/
|
|
43
|
-
"@buffcore/sdk": "0.8.
|
|
44
|
-
"@buffcore/
|
|
40
|
+
"@buffcore/contracts": "0.8.48",
|
|
41
|
+
"@buffcore/i18n": "0.8.48",
|
|
42
|
+
"@buffcore/tokens": "0.8.48",
|
|
43
|
+
"@buffcore/sdk": "0.8.48",
|
|
44
|
+
"@buffcore/config": "0.8.48"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"react": ">=19",
|