Skip to content

ui(workspace): Add run start controls, visible runs and reuse source - #20

Open
SCcagg5 wants to merge 6 commits into
stack/19-ui15from
stack/20-ui16
Open

SCcagg5 wants to merge 6 commits into
stack/19-ui15from
stack/20-ui16

Conversation

@SCcagg5

@SCcagg5 SCcagg5 commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Part of a stack of 31 pull requests that depend on each other. They must be reviewed and merged in order: each PR builds on the previous one and its diff only contains its own changes.

All PRs of the stack
# PR
1 specs: Add spec 083 and the samples store
2 ir: Add run state fields for ephemeral runs and reused outputs
3 runtime: Bound continuous steps and carry outputs of selected steps
4 api: Add step samples, events, availability and selected-step runs
5 test(ui): add YAML fixtures for the document model tests
6 ui(lib): add shared UI kit, status helpers and right-panel shell
7 ui(canvas): add canvas engine core, toolbars and editor helpers
8 ui(i18n): add workspace message catalogs, first batch
9 ui(canvas): add canvas Flow view, step run panel and workflow panel
10 ui(editor): add YAML document model, canvas model and run source logic
11 ui(editor): Add edit session, YAML format and quick fixes, run actions, tab strip
12 ui(editor): Add canvas graph model, Add step panel, issues popover, run bar
13 ui(canvas): Add layered layout, dependency edges, status styles, reference picker
14 ui(canvas): Add export, flow builder, upstream data panel, output capture
15 ui(canvas): Add node cards, launchers, inspector sections, client issues
16 ui(editor): Add visual editor, step inspector and YAML file panel
17 ui(lists): Open runs on the workflow page; add tab and schedule helpers
18 ui(workspace): Add workspace URL state, legacy redirects and run list links
19 ui(workspace): Add workspace data layer, run facts and Workflow panel
20 ui(workspace): Add run start controls, visible runs and reuse source
21 ui(workspace): Add data provider, bar identity, continuous panel and step list
22 ui(logs): Add run actions cluster, cached logs and log popout page
23 ui(workspace): Add Activity dock, step run view and workflow page
24 test(workspace): Add integration tests for the workspace shell and step view
25 ui(pages): Retire classic run pages and open runs on the workflow page
26 test(editor): Add integration tests for the editor, inspector and run overlay
27 test(ui): Add repository-wide guard tests and ESLint boundary rules
28 e2e: Add workspace helpers and fixtures, update existing specs
29 e2e: Add workspace specs, part 1 of 2
30 e2e: Add workspace specs, part 2 of 2
31 examples: Add the workspace demo workflows

Stack 20/31. Base branch: stack/19-ui15. Review and merge in order; this PR builds on the previous one.
Size: 32 files changed, 7696 insertions(+), 350 deletions(-).
Checked: Typecheck (tsc) of the whole UI and the unit tests of this PR (Vitest), on top of the previous PR.

Summary

This PR adds the run split button and start context, label chips, the visible-runs hook, the run timeline model, and useReuseSource, which picks the earlier run that a step run takes its outputs from. It also moves the Start dialog and DAGActions onto a lazy, profile-aware form.

Why

The bar must start a whole run or one step, and the timeline must pick which runs to show. Step runs that reuse earlier outputs need a clear rule for the source run. This PR builds on the data layer of PR 19. PR 21 wires the data provider and adds the Activity step list. PR 22 adds the run actions.

Changes

Counts: 4 existing files modified, 28 new files (13 tests).

  • Bar: RunSplitButton, RunStartContext (one owner of the Start dialog, with requestStart), LabelChips with useWorkflowLabels (each label opens the filtered list).
  • Data: useWorkspaceRun (selected run, pinned patches), useVisibleRuns (count or range, test runs, cached time, stored in localStorage), useWorkspaceRefresh (settleAll), sameContent (content equality for SWR copies).
  • Timeline: dock/runTimelineModel.ts (bars, lanes, axis scale, counts 5 to 30).
  • Step run: step/useReuseSource (picks the source run and checks cached runs, with request limits), visual-editor/run/runSourceChoice.ts (auto, cache or a named run), StepDeclared, StepFactsLine.
  • Hosts and guards: RunLinksHost, EditorLeaveGuard (unload, link click, Back and Forward), useLegacyHistoryRedirect (old History index to a run id), canvas/useOpenStepDetails.
  • StartDAGModal and DAGActions are reworked: lazy form load, useProfiles hook, only, markActions, startIconOnly props.

How to review

  1. step/useReuseSource.ts with runSourceChoice.ts.
  2. data/useWorkspaceRun.ts and useVisibleRuns.ts.
  3. dock/runTimelineModel.ts.
  4. bar/RunStartContext.tsx and RunSplitButton.tsx.
  5. DAGActions.tsx and StartDAGModal.tsx.

Most attention: useReuseSource (the rule for the source run and its request limits), and useWorkspaceRun (pinned run and local patches against server data).

Tests

  • New: RunStartContext, LabelChips, useVisibleRuns, runTimelineModel (large), useReuseSource, StepDeclared, WorkflowTabsPanel, EditorLeaveGuard, useLegacyHistoryRedirect, runSourceChoice, useProfiles.
  • Updated: DAGActions, StartDAGModal.

Screenshots

These components are used by PR 21 and later. The screenshots show the Start dialog and a step run that reuses earlier outputs.

Start dialog
A step run with reused outputs

This was referenced Oct 28, 2026
@yohamta0
yohamta0 force-pushed the stack/20-ui16 branch 2 times, most recently from 3c73f4b to fbe65aa Compare October 29, 2026 10:50
@yohamta0
yohamta0 force-pushed the stack/19-ui15 branch 2 times, most recently from aaa8d29 to d1f192b Compare October 29, 2026 12:58
@yohamta0
yohamta0 force-pushed the stack/20-ui16 branch 2 times, most recently from 70fe84b to 1a4f72a Compare October 29, 2026 13:21
@yohamta0
yohamta0 force-pushed the stack/19-ui15 branch 2 times, most recently from 49baa7a to 04b25b5 Compare October 30, 2026 08:43
@yohamta0
yohamta0 force-pushed the stack/20-ui16 branch 2 times, most recently from 9073f96 to c56eb67 Compare October 30, 2026 11:03
@yohamta0
yohamta0 force-pushed the stack/20-ui16 branch 3 times, most recently from ff7b92e to 3b82e5b Compare October 31, 2026 09:21
@yohamta0
yohamta0 force-pushed the stack/19-ui15 branch 2 times, most recently from 36b5b89 to ea3b10a Compare October 31, 2026 10:42
SCcagg5 and others added 6 commits October 31, 2026 19:43
…dagucloud#3399)

* UI: dags/components, workflow-workspace/data, workflow-workspace/dock
* Fix status i18n, save race and test-run polling
* Keep the test-run poll alive across renders
The run check of a cache entry read the response of
GET /dag-runs/{name}/{dagRunId} as the run itself, while the server
wraps it in dagRunDetails. Every entry whose run was outside the
history then counted as gone. The test mock returned the details
unwrapped and hid this; it now matches the API.

Each answer of a run check re-ran the effect, which cancelled the
requests in flight and sent them again, and a running selected run
kept loading from settling. Each run is now asked once, and an answer
is never dropped.

A stored cache choice with no fresh entry left the step with no
source. It now gives way to the automatic choice, as a gone run does.

"Open last run" now targets the latest run instead of the selected
one. It falls back to the run of the host when the latest run is not
known.

Also keep the Start modal latch in state instead of a ref written in
render, hoist the run view store subscription to module scope, and
assert the history deltas of the leave guard on browser Back.
A preset time range ends now, but its clock ticks once a minute, so a
run that started after the last tick fell outside the range and had no
bar for up to a minute. The run filter of a preset now has no upper
end; the axis keeps the range and a custom range keeps its end.

The leave guard listened for links and Back only while the editor was
dirty, so leaving the workflow dropped a notifications, incidents or
profile draft without asking. It now listens while a settings draft is
at risk too.

With the cache chosen, the reuse source still reported the active run
that the automatic choice waits for, which disabled Step only although
the cache gives the reads. It reports no wait while the cache is
chosen.
The run links host now passes the remote node and workflow name as
the scope of the step cache, so captures and hashes of one workflow
never answer for another one with the same step names.
The history lists the newest runs only. A chosen run that newer runs
pushed out of it gave way to the automatic choice, as if it were gone,
and the step reused another run. The chosen run is now read on its own,
like a run of the cache, and gives way only when it is gone or cannot
be a source.

The server reuses the outputs of a finished run only. A cache entry of
a run that was still active covered its step, and the step run that
sent it was refused. Such an entry now covers nothing until its run
ends.

A custom time range stopped the clock of the run filter, so a running
run ended at the time the clock last ticked, and a range after that
time left the run out. The clock now ticks in every range mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants