Skip to content

Fix workflow publication observation - #3335

Merged
AbigailDeng merged 5 commits into
feat/2026-08-04_workflow-activity-vnextfrom
fix/2026-08-07_frontend-publish-observation
Aug 10, 2026
Merged

Fix workflow publication observation#3335
AbigailDeng merged 5 commits into
feat/2026-08-04_workflow-activity-vnextfrom
fix/2026-08-07_frontend-publish-observation

Conversation

@AbigailDeng

@AbigailDeng AbigailDeng commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Problem and solution

  • Keep the workflow publication flow frontend-only and one-click. The page submits the direct publish request, then automatically observes the authoritative workflow read model.
  • Show a success toast only after the submitted revision is actually observed as published. Do not show success, error, or info toasts for accepted, observing, or delayed states.
  • Show one error toast for direct submission failure, invalid accepted receipts, terminal observation failures, 401, and 403 responses.
  • Replace the disabled Published button with a Published status label placed immediately before Saved. Once the current revision is observed as published, the Publish button is not rendered.
  • Preserve automatic polling for 404, 408, 409, 425, 429, and 5xx propagation states. No manual publication check action, dialog, service picker, or service revision polling is introduced.
  • Keep workflowId, memberId, and publishedServiceId separate. No backend code changed.

Impact paths

  • Workflow Activity vNext editor publish feedback and terminal states.
  • Workflow publication observation and retry behavior.
  • Editor toolbar status layout on desktop and mobile.
  • Localized copy and regression coverage.

Design baseline

Design baseline:
apps/aevatar-console-web/docs/design-baselines/workflow-activity-vnext/
Primary design:
aevatar-workflow-activity-vnext.excalidraw
Design SHA-256:
30e74d7b410ae72c4c91432355436679033679c54c10b1702908435b001577de
Contract specification:
apps/aevatar-console-web/docs/superpowers/specs/
2026-08-04-workflow-activity-vnext-design.md
User paths:
apps/aevatar-console-web/docs/superpowers/specs/
2026-08-04-workflow-activity-vnext-user-paths.md
Authentication and localization:
Existing Aevatar login, callback, session, returnTo, and Umi locale logic;
presentation may change, behavior may not.
Production data source:
Real APIs and API-acknowledged user actions only; no mock fallback.
Baseline integrity:
python3 apps/aevatar-console-web/docs/design-baselines/
workflow-activity-vnext/verify-baseline.py

Local verification

  • Dependency-related Jest:
    pnpm exec jest --findRelatedTests src/locales/workflowActivityVNextMessages.en-US.ts src/locales/workflowActivityVNextMessages.zh-CN.ts src/pages/workflow-activity-vnext/styles.ts src/pages/workflow-activity-vnext/workflows/WorkflowEditorPage.tsx --runInBand --json --outputFile /tmp/aevatar-publish-feedback-related-jest.json
    Result: 101 suites, 1,255 tests passed; 0 failed.
  • Changed test file:
    pnpm exec jest --runInBand --runTestsByPath src/pages/workflow-activity-vnext/index.test.tsx --json --outputFile /tmp/aevatar-publish-feedback-index-jest.json
    Result: 1 suite, 95 tests passed; 0 failed.
  • Changed-file static check:
    pnpm exec biome check src/locales/workflowActivityVNextMessages.en-US.ts src/locales/workflowActivityVNextMessages.zh-CN.ts src/pages/workflow-activity-vnext/index.test.tsx src/pages/workflow-activity-vnext/styles.ts src/pages/workflow-activity-vnext/workflows/WorkflowEditorPage.tsx
    Result: passed, no fixes applied.
  • Diff check:
    git diff --check HEAD
    Result: passed.
  • Design baseline:
    python3 apps/aevatar-console-web/docs/design-baselines/workflow-activity-vnext/verify-baseline.py
    Result: 17/17 frames and byte-identical generator output; passed.
  • Browser smoke:
    Existing authenticated Chrome session on the local 5173 workflow editor, with remote backend API proxy. The page loaded real workflow data after refresh; desktop and 390x844 mobile layouts rendered correctly. No remote Publish action was performed.
  • Full frontend suite/build: deferred to GitHub CI by personal local workflow policy.
  • Full package TypeScript check: deferred to GitHub CI because no reliable affected typecheck target is available.

Template selection layout and configuration

  • Fix the Workflow Activity vNext template selector so its value, hidden input layer, and chevron stay in one vertically centered row. The old generic block layout stacked the suffix below the selected value.
  • Keep the fix scoped to creation-form Ant Select controls, including the optional Save to selector; no backend route or contract changed.
  • Make bundled template presentation data explicit in workflowCreation.ts: each template now owns its localized display name, description, and independently created draft name. The creation page derives its option, preview, and copy name from the selected template instead of hard-coding Incident triage.
  • Adding a template now requires one entry in BUNDLED_WORKFLOW_TEMPLATES with id, version, yaml, nameMessage, descriptionMessage, and copyNameMessage, plus those message IDs in both vNext locale catalogues. Template IDs remain frontend product content, not workflow IDs.

Local verification for template selection

  • Related-test discovery: pnpm exec jest --listTests --findRelatedTests src/pages/workflow-activity-vnext/workflows/NewWorkflowPage.tsx src/pages/workflow-activity-vnext/workflows/workflowCreation.ts
    Result: limited to index.test.tsx and NewWorkflowPage.test.tsx.
  • Template creation regression: pnpm exec jest --runInBand --runTestsByPath src/pages/workflow-activity-vnext/workflows/NewWorkflowPage.test.tsx
    Result: 1 suite, 12 tests passed.
  • Changed-file static check: pnpm exec biome check src/pages/workflow-activity-vnext/styles.ts src/pages/workflow-activity-vnext/workflows/NewWorkflowPage.tsx src/pages/workflow-activity-vnext/workflows/workflowCreation.ts
    Result: passed, no fixes applied.
  • Baseline integrity: python3 docs/design-baselines/workflow-activity-vnext/verify-baseline.py
    Result: design SHA 30e74d7b410ae72c4c91432355436679033679c54c10b1702908435b001577de, 17/17 frames, byte-identical generator output.
  • Diff check: git diff --check
    Result: passed.
  • Browser layout evidence: the original failure was reproduced in the existing authenticated local 5173 page and inspected as a stacked block-layout Select. The changed worktree compiled on 5174 with the remote backend proxy, but Chrome authentication state is origin-scoped and 5174 required a separate sign-in. The temporary server was stopped rather than handing off an unusable preview; no remote Publish action was performed.
  • Full frontend suite/build: deferred to GitHub CI by personal local workflow policy.
  • Full package TypeScript check: deferred to GitHub CI because no reliable affected typecheck target is available.

@AbigailDeng

Copy link
Copy Markdown
Contributor Author

CI follow-up

The console-web job failed during TypeScript compilation because the workflowDetail test factory allowed detailChanges.workflow to be null while its return type guaranteed a non-null workflow. Commit 92cad7af4 narrows the override type so those contracts no longer conflict.

Local verification

  • Related test: pnpm exec jest --selectProjects jsdom --runInBand --runTestsByPath src/pages/workflow-activity-vnext/hooks/useWorkflowPublication.test.ts - 1 suite, 8 tests passed
  • Changed-file static check: pnpm exec biome check src/pages/workflow-activity-vnext/hooks/useWorkflowPublication.test.ts - passed
  • Test stability guard: bash tools/ci/test_stability_guards.sh - passed
  • Diff validation: git diff --check and staged diff check - passed
  • A reliable affected-only TypeScript target is unavailable; local typecheck was skipped
  • Full frontend suite/build: deferred to GitHub CI by personal local workflow policy

@AbigailDeng
AbigailDeng merged commit d2bebe6 into feat/2026-08-04_workflow-activity-vnext Aug 10, 2026
13 checks passed
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