ui: Add service run history and service DAG state (part 3 of 12)
Stack 31/41. Base branch: main. Review and merge in order; this PR builds on the previous one.
Size: 61 files changed, 3910 insertions(+), 219 deletions(-).
Checked: on branch agentstack/31-service-history-3 at commit 65275740b. pnpm typecheck: pass (134s); pnpm exec eslint on the changed files: pass (61 files); pnpm exec prettier --check on the changed files: pass, baseline only (61 files; flagged: ['ui/src/features/dags/components/DAGStatus.tsx'] (flagged on origin/main as well)); pnpm exec vitest run --maxWorkers=3 (changed tests, tests of the touched directories, tests that import a changed file): pass (624 passed (624); 9458 passed | 6 expected fail (9464); 520s [changed tests, tests of touched directories, tests that import a changed file]); pnpm build: pass (47s).
Summary
Subject: Service run history and service DAG state. Adds the run history of service DAGs and carries the UI work around it (run bar actions, step panels, canvas toolbar, agent step cards, tool satellites): samples with uptime, events, availability, the scheduler recorder, the REST routes, the SSE stream, and the service state in the Workflows list, the page header and the Activity dock (specs 097 and 080). This PR is part 3 of 12 of the subject. This PR holds 43 files of UI components and features, 26 files of UI tests.
Why
A service DAG runs for years. Its history must outlive the retention of run records. Real code dependencies: PRs 03, 05, 08, 10, 30. All previous PRs of the stack are also its base.
Changes
Counts: 42 existing files modified, 27 new files (26 tests or test data).
ui/src/features/dags/components: 23 files (DAGStatus.tsx,DAGStatus.test.tsx,PinToggle.tsx,editorOptions.test.ts, ...)ui/src/features/visual-editor/canvas: 23 files (clearance.test.ts,promptRefs.test.tsx,providerLogo.test.ts,revealDelta.test.ts, ...)ui/src/features/visual-editor/inspector: 6 files (Section.tsx,Section.test.tsx,focusField.test.ts,focusField.ts, ...)ui/src/features/visual-editor/references: 5 files (promptHighlight.test.ts,suggestions.test.ts,promptHighlight.ts,suggestions.ts, ...)ui/src/features/dag-runs/hooks: 2 files (useServiceDAGs.test.tsx,useServiceDAGs.ts)ui/src/features/peek: 2 files (WorkflowOverlay.tsx,overlayMounted.ts)ui/src/__tests__: 1 file (menu.test.tsx)ui/src/features/dag-runs/components: 1 file (DAGRunBatchActions.tsx)ui/src/features/views: 1 file (ViewSelector.tsx)ui/src/features/views/__tests__: 1 file (ViewSelector.test.tsx)ui/src/features/visual-editor: 1 file (WorkflowDrawer.tsx)ui/src/features/visual-editor/doc: 1 file (issueMessages.ts)- 2 more directories.
How to review
- Read the spec documents first, when the PR has some.
- Read the non-test code, from the types to the callers.
- Read the tests last.
Summary by cubic
Adds the conformance harness and suites that verify the AI features of specs 090 and 091 from the built binary, and regenerates the API bindings.
- The new
conformance/aitestpackage supplies a fake model API, fake CLIs, and launchers for local runs, a server, and a distributed coordinator/worker stack with no external services. - Spec 090 and 091 suites cover tool limits, skills, MCP tools, CLI flags, the tool bridge, and auth and rate-limit retries. Restricted-user tests skip unless run as root with no-new-privileges.
- The spec 059 chat tests move to the
dagstool map, replacing the deprecatedtoolslist, anddagu validatenow warns about the deprecated provider method. The spec 013 run tests add a case for a step that a selected-steps run did not carry. - The harness
Processexposes output through a locked buffer so tests can read it while the command runs. api.gen.goandapi.yamlare regenerated, the egress proxy subcommand is registered, and the demo run artifacts are Docker-ignored.