拆分GDD审批与状态同步忙碌状态
审批决定按钮仅反映用户决定提交状态 恢复按钮仅反映策划状态同步状态 贯通总控视图与工作台的独立状态参数
This commit is contained in:
@@ -10901,7 +10901,8 @@ export function App({
|
||||
}
|
||||
workspaceStatus={workspaceStatus}
|
||||
planGddState={planGddState}
|
||||
planGddHydrateBusy={planGddHydrateBusy || planGddDecisionBusy}
|
||||
planGddHydrateBusy={planGddHydrateBusy}
|
||||
planGddDecisionBusy={planGddDecisionBusy}
|
||||
planGddError={planGddError}
|
||||
onPlanGddRefresh={() => void hydratePlanGddState()}
|
||||
onPlanGddDecision={decidePlanGdd}
|
||||
@@ -10998,7 +10999,8 @@ export function App({
|
||||
projectSupervisorRuntimeError={projectSupervisorRuntimeError}
|
||||
projectSupervisorTransientReply={projectSupervisorTransientReply}
|
||||
planGddState={planGddState}
|
||||
planGddHydrateBusy={planGddHydrateBusy || planGddDecisionBusy}
|
||||
planGddHydrateBusy={planGddHydrateBusy}
|
||||
planGddDecisionBusy={planGddDecisionBusy}
|
||||
planGddError={planGddError}
|
||||
onPlanGddRefresh={() => void hydratePlanGddState()}
|
||||
onPlanGddDecision={decidePlanGdd}
|
||||
|
||||
@@ -34,7 +34,8 @@ function planGddMarkdownDisplayPath(projectPath: string) {
|
||||
|
||||
type GddApprovalCardProps = {
|
||||
state: PlanGddStateViewV1 | null;
|
||||
busy: boolean;
|
||||
hydrateBusy: boolean;
|
||||
decisionBusy: boolean;
|
||||
error: string | null;
|
||||
onRefresh: () => void;
|
||||
onDecision: (
|
||||
@@ -76,7 +77,8 @@ export function PlanGddSurface({
|
||||
state,
|
||||
active = false,
|
||||
projectPath,
|
||||
busy,
|
||||
hydrateBusy,
|
||||
decisionBusy,
|
||||
error,
|
||||
onRefresh,
|
||||
onDecision,
|
||||
@@ -101,7 +103,8 @@ export function PlanGddSurface({
|
||||
{showCard ? (
|
||||
<GddApprovalCard
|
||||
state={state}
|
||||
busy={busy}
|
||||
hydrateBusy={hydrateBusy}
|
||||
decisionBusy={decisionBusy}
|
||||
error={error}
|
||||
onRefresh={onRefresh}
|
||||
onDecision={onDecision}
|
||||
@@ -351,7 +354,8 @@ export function GddDetailsDialog({
|
||||
|
||||
export function GddApprovalCard({
|
||||
state,
|
||||
busy,
|
||||
hydrateBusy,
|
||||
decisionBusy,
|
||||
error,
|
||||
onRefresh,
|
||||
onDecision,
|
||||
@@ -418,8 +422,8 @@ export function GddApprovalCard({
|
||||
{state.recoveryPending ? (
|
||||
<div className="gdd-approval-card__recovery" role="status">
|
||||
<span>审批状态正在恢复,请保持当前审批版本不变。</span>
|
||||
<button type="button" disabled={busy} onClick={onRefresh}>
|
||||
{busy ? '恢复中' : '重试恢复'}
|
||||
<button type="button" disabled={hydrateBusy} onClick={onRefresh}>
|
||||
{hydrateBusy ? '恢复中' : '重试恢复'}
|
||||
</button>
|
||||
</div>
|
||||
) : null}
|
||||
@@ -434,23 +438,23 @@ export function GddApprovalCard({
|
||||
<div className="gdd-approval-card__actions">
|
||||
<button
|
||||
type="button"
|
||||
disabled={!canDecide || busy}
|
||||
disabled={!canDecide || decisionBusy}
|
||||
onClick={() =>
|
||||
void onDecision('approve', null).catch(() => undefined)
|
||||
}
|
||||
>
|
||||
{busy ? '处理中' : `批准 v${pending.gddRef.version}`}
|
||||
{decisionBusy ? '处理中' : `批准 v${pending.gddRef.version}`}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
disabled={!canDecide || busy}
|
||||
disabled={!canDecide || decisionBusy}
|
||||
onClick={() => setCommentAction('revise')}
|
||||
>
|
||||
修改
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
disabled={!canDecide || busy}
|
||||
disabled={!canDecide || decisionBusy}
|
||||
onClick={() => setCommentAction('reject')}
|
||||
>
|
||||
退回重做
|
||||
@@ -493,7 +497,7 @@ export function GddApprovalCard({
|
||||
<div className="gdd-approval-card__dialog-actions">
|
||||
<button
|
||||
type="button"
|
||||
disabled={busy}
|
||||
disabled={decisionBusy}
|
||||
onClick={() => {
|
||||
setCommentAction(null);
|
||||
setComment('');
|
||||
@@ -503,10 +507,10 @@ export function GddApprovalCard({
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
disabled={!canDecide || busy || !comment.trim()}
|
||||
disabled={!canDecide || decisionBusy || !comment.trim()}
|
||||
onClick={submitComment}
|
||||
>
|
||||
{busy ? '提交中' : '提交决定'}
|
||||
{decisionBusy ? '提交中' : '提交决定'}
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -61,6 +61,7 @@ type ProjectSupervisorViewProps = RuntimePanelProps & {
|
||||
workspaceStatus: string;
|
||||
planGddState: PlanGddStateViewV1 | null;
|
||||
planGddHydrateBusy: boolean;
|
||||
planGddDecisionBusy: boolean;
|
||||
planGddError: string | null;
|
||||
onPlanGddRefresh: () => void;
|
||||
onPlanGddDecision: (
|
||||
@@ -94,6 +95,7 @@ export function ProjectSupervisorView({
|
||||
workspaceStatus,
|
||||
planGddState,
|
||||
planGddHydrateBusy,
|
||||
planGddDecisionBusy,
|
||||
planGddError,
|
||||
onPlanGddRefresh,
|
||||
onPlanGddDecision,
|
||||
@@ -114,7 +116,8 @@ export function ProjectSupervisorView({
|
||||
state={planGddState}
|
||||
active={isPlanningLaneRuntime(runtimePanelProps.runtime)}
|
||||
projectPath={projectPath}
|
||||
busy={planGddHydrateBusy}
|
||||
hydrateBusy={planGddHydrateBusy}
|
||||
decisionBusy={planGddDecisionBusy}
|
||||
error={planGddError}
|
||||
onRefresh={onPlanGddRefresh}
|
||||
onDecision={onPlanGddDecision}
|
||||
|
||||
+4
-1
@@ -182,6 +182,7 @@ type ProjectWorkspaceChatPaneProps = {
|
||||
projectSupervisorTransientReply: string;
|
||||
planGddState: PlanGddStateViewV1 | null;
|
||||
planGddHydrateBusy: boolean;
|
||||
planGddDecisionBusy: boolean;
|
||||
planGddError: string | null;
|
||||
onPlanGddRefresh: () => void;
|
||||
onPlanGddDecision: (
|
||||
@@ -273,6 +274,7 @@ export function ProjectWorkspaceChatPane({
|
||||
projectSupervisorTransientReply,
|
||||
planGddState,
|
||||
planGddHydrateBusy,
|
||||
planGddDecisionBusy,
|
||||
planGddError,
|
||||
onPlanGddRefresh,
|
||||
onPlanGddDecision,
|
||||
@@ -369,7 +371,8 @@ export function ProjectWorkspaceChatPane({
|
||||
state={planGddState}
|
||||
active={isPlanningLaneRuntime(projectSupervisorRuntime)}
|
||||
projectPath={projectPath}
|
||||
busy={planGddHydrateBusy}
|
||||
hydrateBusy={planGddHydrateBusy}
|
||||
decisionBusy={planGddDecisionBusy}
|
||||
error={planGddError}
|
||||
onRefresh={onPlanGddRefresh}
|
||||
onDecision={onPlanGddDecision}
|
||||
|
||||
Reference in New Issue
Block a user