fix(workflow): let completion win batched activity
This commit is contained in:
parent
380030c48f
commit
c7bd2fdafe
2 changed files with 13 additions and 1 deletions
|
|
@ -358,7 +358,7 @@ export function WorkflowRunPanel({ node, sessionId, useSessions, openSession, t
|
|||
runFacts,
|
||||
focusIsWithin(runContentRef.current),
|
||||
)
|
||||
const run = phaseStartedCycle && !advancedRun.open
|
||||
const run = phaseStartedCycle && runFacts.mode !== 'clean' && !advancedRun.open
|
||||
? { ...advancedRun, open: true, pendingCleanCollapse: false }
|
||||
: advancedRun
|
||||
return run !== current.run || phasesChanged ? { run, phases } : current
|
||||
|
|
|
|||
|
|
@ -448,6 +448,18 @@ describe('WorkflowRunPanel', () => {
|
|||
expect(screen.getByRole('button', { name: /未分阶段/ }).getAttribute('aria-expanded')).toBe('false')
|
||||
expect(screen.queryByText('first')).toBeNull()
|
||||
expect(screen.queryByText('second')).toBeNull()
|
||||
|
||||
phaseView.rerender(<WorkflowRunPanel {...panelProps({
|
||||
...phaseClean,
|
||||
status: 'completed',
|
||||
phases: [phase({ members: [firstMember, {
|
||||
seq: 2, label: 'second', childId: SECOND_ID, status: 'completed',
|
||||
}, {
|
||||
seq: 3, label: 'final', childId: 'child-3' as SessionId, status: 'completed',
|
||||
}] })],
|
||||
})} />)
|
||||
expect(runHeader.getAttribute('aria-expanded')).toBe('false')
|
||||
expect(screen.queryByRole('button', { name: /未分阶段/ })).toBeNull()
|
||||
})
|
||||
|
||||
it('initializes a newly observed phase before it becomes interactive', () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue