fix(workflow): refold coalesced disclosure cycles

This commit is contained in:
pku-xht
2026-08-12 01:01:25 +08:00
parent 3dff212c5d
commit 1b91e5b4fe
4 changed files with 48 additions and 4 deletions

View File

@@ -14,7 +14,6 @@
padding: 0 8px;
border-radius: 8px;
background: var(--dsw-alias-bg-module-platform);
cursor: pointer;
}
.runHeader:focus-visible {
@@ -78,7 +77,6 @@
width: 100%;
min-width: 0;
height: 32px;
cursor: pointer;
}
.phaseHeader:focus-visible {

View File

@@ -84,10 +84,11 @@ function ManualDisclosure(props: StatusDisclosureProps) {
)
}
function StatusDisclosure({ requiresExpansion, ...props }: StatusDisclosureProps & {
function StatusDisclosure({ cleanCycleKey, requiresExpansion, ...props }: StatusDisclosureProps & {
readonly cleanCycleKey: number
readonly requiresExpansion: boolean
}) {
if (!requiresExpansion) return <ManualDisclosure {...props} />
if (!requiresExpansion) return <ManualDisclosure key={cleanCycleKey} {...props} />
return <DisclosureRow {...props} open expandable={false} onToggle={forcedOpenToggle} />
}
@@ -138,6 +139,7 @@ function RunHeader({ children, count, name, requiresExpansion, status, t }: {
<StatusDisclosure
icon={<IconChevronRightOutline14 />}
title={t('run.title', { name })}
cleanCycleKey={count}
requiresExpansion={requiresExpansion}
expandOnRowClick
previewChevron={false}
@@ -201,6 +203,7 @@ function PhaseSection({ phase, navigable, openSession, t }: {
<StatusDisclosure
icon={<IconChevronRightOutline14 />}
title={readablePhase(phase.phase, t)}
cleanCycleKey={phase.members.length}
requiresExpansion={phaseRequiresExpansion(phase)}
expandOnRowClick
previewChevron={false}