Skip to content

ui(workspace): Add workspace data layer, run facts and Workflow panel - #19

Open
SCcagg5 wants to merge 4 commits into
stack/18-ui14from
stack/19-ui15
Open

SCcagg5 wants to merge 4 commits into
stack/18-ui14from
stack/19-ui15

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 19/31. Base branch: stack/18-ui14. Review and merge in order; this PR builds on the previous one.
Size: 62 files changed, 7682 insertions(+), 514 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 data contracts and hooks of the workflow workspace (run history, sub runs, permissions, test runs, run spec), the run facts and edit buttons of the bar, the Workflow panel and the runtime profile section. It also moves the run summary blocks out of DAGStatusOverview and adds ghost rows to the run timeline items.

Why

Every workspace component reads the same run and workflow data through typed hooks. This PR gives those types and hooks before any component needs them. It builds on the URL state of PR 18. PR 20 adds run selection and start controls, and PR 21 adds WorkspaceDataProvider, which wires the hooks together.

Changes

Counts: 10 existing files modified, 52 new files (about half are tests).

  • Data (workflow-workspace/data): types.ts, context.ts (WorkspaceDataContext), useRunHistory, useSubRuns, useWorkspacePermissions, handlerMapping (lifecycle handler nodes), runFacts (isNeverRun, run creation time), testRun (10 minute TTL of a test run). contracts.ts re-exports the public types.
  • Canvas: WorkspaceEditorContext (editor handle and state), canvasRunPolicy (which run the canvas shows), useTestRunNotice, useStepViewHost, useEscClearsStep.
  • Bar: RunFacts (inline and stacked layouts), WorkflowEditButtons (rename, delete), useFactTiers. DAGEditButtons is rebuilt on a new useDAGEditActions hook.
  • Dock: dockTabs (which tabs a run shows), runExtents (lanes of run bars), FreezeWhenHidden, tabs/AgentRunSummary, tabs/stepScope.
  • Panel and profile: panel/WorkflowTabsPanel; profile/RuntimeProfileSection, DotenvBlock, dotenv.ts, runtimeProfile.ts (layered environment of a run).
  • Other: executions/useRunSpec, step/StepOutputRows.
  • Shared run UI: new RunSummaryBlocks (progress, status message, error, conditions); DAGStatusOverview uses it. DAGSettingsTab and IncidentsTab report unsaved changes.
  • timelineItems.ts: ghost rows for steps that a run reused, time-axis ticks with date-aware labels.
  • WorkerList, WorkerMetrics, pages/workers get small edits.

How to review

  1. data/types.ts, context.ts, contracts.ts.
  2. data/useRunHistory.ts, useSubRuns.ts, runFacts.ts.
  3. dock/dockTabs.ts and canvas/canvasRunPolicy.ts.
  4. timelineItems.ts (ghost rows).
  5. RunSummaryBlocks.tsx against the removed code in DAGStatusOverview.tsx.
  6. profile/ files.

Most attention: the ghost-row and axis logic in timelineItems.ts, and the equivalence of DAGStatusOverview before and after the extraction.

Tests

  • New: handlerMapping, testRun, dockTabs, runExtents, canvasRunPolicy, useTestRunNotice, WorkspaceEditorContext, useRunSpec, RunFacts, WorkflowEditButtons, AgentRunSummary, stepScope, RuntimeProfileSection, DotenvBlock, dotenv, runtimeProfile, RunSummaryBlocks, DAGRunOutputs, DAGSettingsTab, IncidentsTab, DAGEditButtons; shared data/__tests__/fixtures.ts.
  • Updated: timelineItems (large), DAGStatusOverview.

Screenshots

These components are used by PR 21 and later; the screenshot shows the bar with run facts in the final UI.

Workflow bar with run facts

This was referenced Oct 28, 2026
@yohamta0
yohamta0 force-pushed the stack/19-ui15 branch 2 times, most recently from 2e69548 to bbd170d Compare October 29, 2026 10:28
@yohamta0
yohamta0 force-pushed the stack/18-ui14 branch 2 times, most recently from 8701cf2 to eb4308f Compare October 29, 2026 12:58
@yohamta0
yohamta0 force-pushed the stack/19-ui15 branch 2 times, most recently from 180c2e5 to 49baa7a Compare October 30, 2026 06:44
@yohamta0
yohamta0 force-pushed the stack/18-ui14 branch 2 times, most recently from 3c5ed9a to e7bdd66 Compare October 30, 2026 08:43
@yohamta0
yohamta0 force-pushed the stack/19-ui15 branch 3 times, most recently from 91deb14 to c598965 Compare October 31, 2026 04:50
@yohamta0
yohamta0 force-pushed the stack/19-ui15 branch 2 times, most recently from 512010f to 7eefa4d Compare October 31, 2026 06:28
@yohamta0
yohamta0 force-pushed the stack/18-ui14 branch 2 times, most recently from aba5363 to 5a1b420 Compare October 31, 2026 09:21
SCcagg5 and others added 4 commits October 31, 2026 19:42
… links (dagucloud#3398)

* UI: dags/components, dag-runs, components
* Expect run list rows to open the run page
* Fix review findings in the run list and workspace
Translate the run status messages of RunStatusMessage, which other
locales showed in English.

Lock the incident routing editor while a save or a reset is pending.
Both replace the draft when they end, so an edit made in between was
dropped and the tab reported a clean state.

Stop polling the run history after a test run start once a grace
window has passed. The start flag never expired, so a tab that started
one test run polled every 5 s for its whole life.

Show a month or a year label only when the tick gap is longer than the
longest month or year. Shorter gaps put two ticks in one period and
repeated its label.

Render a worker's running task as a link, so it can take focus and
open in a new tab natively. Use the compact icon size for the rename
and delete buttons, and reuse waitsFor for the dependencies of an
executed step row.
SWR restarts its poll timer whenever refreshInterval changes. The
history passed a new function on each render, so a caller that renders
more often than every 5 s, such as the run timeline while a run updates,
held the test-run poll off and the list went stale. The function now
changes only with the start time, the fallback interval, and whether the
list holds a test run, which still restarts a poll that stopped.

The step scope reads the handler events from HANDLER_EVENTS instead of
a second list of the same names that could drift from it.
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