merge: maestro/tsk_sp0DwZ2Kc319 [tsk_sp0DwZ2Kc319]

This commit is contained in:
maestro
2026-06-30 08:56:35 +08:00
2 changed files with 20 additions and 12 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ function ArchiveModal({ item, t, onClose }) {
const d = item.detail || {};
const label = (text) => <div style={{ fontSize: 10.5, color: 'var(--muted)', letterSpacing: '.18em', margin: '14px 0 4px' }}>{text}</div>;
const doc = (text) => (
<pre style={{ background: 'var(--bg-deep)', border: '1px solid var(--line-soft)', borderLeft: '2px solid var(--green-dim)', borderRadius: 4, padding: '10px 12px', fontFamily: 'var(--mono)', fontSize: 12.5, lineHeight: 1.7, whiteSpace: 'pre-wrap', wordBreak: 'break-word', margin: 0, color: 'var(--ink)' }}>{text}</pre>
<div style={{ background: 'var(--bg-deep)', border: '1px solid var(--line-soft)', borderLeft: '2px solid var(--green-dim)', borderRadius: 4, padding: '10px 12px' }}><window.MaestroRichDoc md={text} /></div>
);
const kvGrid = { fontSize: 12, display: 'grid', gridTemplateColumns: 'auto 1fr', gap: '3px 12px', margin: 0 };
return (
+19 -11
View File
@@ -181,7 +181,6 @@ function GatePreview({ item, t, onDecide, onClose }) {
);
};
const secLabel = (txt) => <div style={{ fontSize: 10.5, fontWeight: 700, color: 'var(--muted)', letterSpacing: '.18em', margin: '18px 0 8px' }}>{txt}</div>;
const reportBox = (txt) => <div style={{ background: 'var(--bg-deep)', border: '1px solid var(--line-soft)', borderRadius: 4, padding: '12px 16px', fontSize: 12.5, lineHeight: 1.7, whiteSpace: 'pre-wrap', wordBreak: 'break-word', color: 'var(--ink)' }}>{txt}</div>;
return (
<div style={{ position: 'fixed', inset: 0, zIndex: 1100, display: 'grid', placeItems: 'center' }}>
<div onClick={onClose} style={{ position: 'absolute', inset: 0, background: 'rgba(4,6,5,.86)', backdropFilter: 'blur(3px)' }}></div>
@@ -291,7 +290,7 @@ function GateSection({ approvals, onDecide, taskOps, onTakeover, t }) {
const isFolded = folded.has(a.id);
return (
<div key={a.id} style={{ marginBottom: 12 }}>
<GateCard gate={a.gate} kindLabel={a.gate === 'attention' ? t.gateNeedsHuman : t.gates[a.gate]} title={a.title} meta={a.meta} docLabel={a.docLabel} doc={a.gate === 'attention' ? undefined : a.doc}
<GateCard gate={a.gate} kindLabel={a.gate === 'attention' ? t.gateNeedsHuman : t.gates[a.gate]} title={a.title} meta={a.meta} docLabel={a.docLabel} doc={undefined}
collapsed={isFolded} foldable onToggleFold={() => toggleFold(a.id)}
foldTitle={isFolded ? t.gateExpand : t.gateCollapse}
onHeaderDoubleClick={a.gate === 'attention' ? undefined : () => setPreview(a)} headerTitle={a.gate === 'attention' ? null : t.gateDblTip}
@@ -320,15 +319,24 @@ function GateSection({ approvals, onDecide, taskOps, onTakeover, t }) {
}>
{a.gate === 'attention' ? (
<ReviewReports taskId={a.taskId} fallback={a.doc} t={t} />
) : rejecting === a.id ? (
<div style={{ display: 'flex', gap: 10, alignItems: 'flex-start', marginTop: 10 }}>
<Textarea danger placeholder={t.rejectPlaceholder} minHeight={56} value={reason} onChange={setReason} />
<Button variant="reject" disabled={!reason.trim()}
onClick={() => { onDecide(a, 'reject', reason); setRejecting(null); setReason(''); }}>
{t.confirmReject}
</Button>
</div>
) : null}
) : (
<React.Fragment>
{a.doc ? (
<div style={{ background: 'var(--bg-deep)', border: '1px solid var(--line-soft)', borderLeft: '2px solid var(--green-dim)', borderRadius: 'var(--radius-sm, 4px)', padding: '10px 12px', maxHeight: 280, overflow: 'auto' }}>
<window.MaestroRichDoc md={a.doc} />
</div>
) : null}
{rejecting === a.id ? (
<div style={{ display: 'flex', gap: 10, alignItems: 'flex-start', marginTop: 10 }}>
<Textarea danger placeholder={t.rejectPlaceholder} minHeight={56} value={reason} onChange={setReason} />
<Button variant="reject" disabled={!reason.trim()}
onClick={() => { onDecide(a, 'reject', reason); setRejecting(null); setReason(''); }}>
{t.confirmReject}
</Button>
</div>
) : null}
</React.Fragment>
)}
</GateCard>
</div>
);