Skip to content

feat(dashboard): data-driven workflow template rendering - #1

Open
Ericcccccc777 wants to merge 1 commit into
mainfrom
feat/dashboard-workflow-templates
Open

feat(dashboard): data-driven workflow template rendering#1
Ericcccccc777 wants to merge 1 commit into
mainfrom
feat/dashboard-workflow-templates

Conversation

@Ericcccccc777

Copy link
Copy Markdown
Owner

What

Makes the dashboard Workflow page render whatever workflow template the harness project is on, instead of the hardcoded 9 full-stack stages. Pairs with CCC-MAGI's new template system (CCC-MAGI PR #1).

  • shared/harness.tsWorkflowSlot / WorkflowStage / WorkflowTemplateSelection / WorkflowTemplateFile / ActiveWorkflowTemplate types; HarnessSummary gains workflow: ActiveWorkflowTemplate | null.
  • main/HarnessReader.tsresolveWorkflowTemplate() with a never-throwing fallback chain: customized selection → templates/<id>.jsonfull-stack → empty. Path-guarded; surfaced on harnessSummary.
  • dashboard/WorkflowPage.tsx — renders the active template's stages (dynamic length), title + "customized" badge, and abstract-slot tags (VERIFY-GATE / HUMAN-REVIEW / WATCH). Falls back to the legacy 9 names when no template is present.
  • strings.tstplCustomized (en/zh; ko→en).

Backward compatible

A project with no .harness/state/workflow-template.json and no .harness/workflows/ renders exactly as before (full-stack, 9 stages).

Verified

tsc --noEmit clean · 445 tests pass (29 files) · electron-vite build succeeds.

🤖 Generated with Claude Code

The Workflow page no longer hardcodes the 9 full-stack stages. It now reads
the project's active workflow template (written by CCC-MAGI) and renders its
stages, title, and customizations.

- shared/harness.ts: WorkflowSlot / WorkflowStage / WorkflowTemplateSelection
  / WorkflowTemplateFile / ActiveWorkflowTemplate types; HarnessSummary gains
  `workflow: ActiveWorkflowTemplate | null`.
- main/HarnessReader.ts: resolveWorkflowTemplate() with a never-throwing
  fallback chain — customized selection → templates/<id>.json → full-stack →
  empty; path-guarded; surfaced on harnessSummary.
- dashboard/WorkflowPage.tsx: renders the active template's stages (dynamic
  length), the template title + "customized" badge, and abstract-slot tags;
  falls back to the legacy 9 names when no template is present.
- strings.ts: tplCustomized (en/zh; ko→en).

Backward compatible: a project with no workflow-template.json / no
.harness/workflows renders exactly as before (full-stack 9 stages).
Verified: tsc clean, 445 tests pass, electron-vite build succeeds.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant