Skip to content

Add Mission Wall frontend package#2473

Open
AbigailDeng wants to merge 10 commits into
docs/2026-06-29_workflow-mission-wall-product-packagefrom
feat/2026-06-30_mission-wall-frontend-package
Open

Add Mission Wall frontend package#2473
AbigailDeng wants to merge 10 commits into
docs/2026-06-29_workflow-mission-wall-product-packagefrom
feat/2026-06-30_mission-wall-frontend-package

Conversation

@AbigailDeng

Copy link
Copy Markdown
Contributor

Summary

  • Add the authenticated fullscreen /runtime/mission-wall big-screen page without the normal console shell/menu.
  • Build the Mission Wall as componentized frontend modules: top runtime strip, manually scrollable published run window, focus stage, React Flow workflow graph, and run cards.
  • Wire the page to real existing Studio/runtime APIs instead of mock runtime data:
    • getAuthSession
    • listMembers
    • listTeams
    • listServices
    • listServiceRuns
    • getServiceRunAudit
  • Preserve Studio identity boundaries: memberId, workflowId, and publishedServiceId/serviceId are not treated as aliases.
  • Add backend handoff documentation and a 15-node lightweight YAML probe workflow for Mission Wall graph testing.

Latest workflow execution limitation

The frontend currently shows real data from existing APIs, but it cannot provide a fully authoritative “latest workflow execution feed” across the scope/team because the backend does not expose a wall-wide latest-run composition endpoint yet.

Current workaround:

  1. Resolve scope from auth/session.
  2. Load published workflow members and runtime services.
  3. Match members to services through publishedServiceId === serviceId.
  4. Fan out GET /api/scopes/{scopeId}/services/{serviceId}/runs?take=50 per matched service.
  5. Load selected run audit through GET /api/scopes/{scopeId}/services/{serviceId}/runs/{runId}/audit.

That is why the page can display existing published service runs, but cannot yet guarantee one durable, backend-authoritative, scope/team-wide latest workflow run feed with stable incremental ordering.

Backend follow-up issue: #2472

Validation

  • pnpm --dir apps/aevatar-console-web test --runInBand src/pages/MissionWall/components/WorkflowReplayCanvas.test.tsx src/pages/MissionWall/index.test.tsx src/pages/MissionWall/hooks/usePublishedRunWindow.test.ts src/pages/MissionWall/wallDirector.test.ts src/app.test.tsx src/app.layout.test.ts src/routesConfig.test.ts src/shared/auth/session.test.ts src/shared/navigation/runtimeRoutes.test.ts
  • pnpm --dir apps/aevatar-console-web tsc
  • ruby -e 'require "yaml"; doc = YAML.load_file("workflows/mission_wall_15_node_probe.yaml"); abort "expected 15" unless doc.fetch("steps").length == 15; puts "#{doc.fetch("name")} #{doc.fetch("steps").length}"'
  • git diff --check

Note: targeted Jest run passes but prints an existing Ant Design ConfigProvider autoInsertSpaceInButton deprecation warning from the shared app layout test path.

@AbigailDeng

Copy link
Copy Markdown
Contributor Author

Additional validation after PR creation: bash tools/ci/test_stability_guards.sh passed (polling waits constrained by allowlist; coverage/project/layer/catch observability guards passed).

@AbigailDeng

Copy link
Copy Markdown
Contributor Author

Follow-up pushed in 14c9311c8:

  • Added low-frequency Mission Wall data refetching:
    • roster/team/service queries every 15s
    • service run catalogs every 5s
    • selected run audit every 3s
  • Added a regression test proving the left Published Run Window picks up a newly appearing workflow member/service/run after Mission Wall data refresh, while preserving identity boundaries (workflowId and memberId are not sent to the service-run API).

Validation after the follow-up:

  • pnpm --dir apps/aevatar-console-web test --runInBand src/pages/MissionWall/index.test.tsx src/pages/MissionWall/components/WorkflowReplayCanvas.test.tsx src/pages/MissionWall/hooks/usePublishedRunWindow.test.ts src/pages/MissionWall/wallDirector.test.ts
  • pnpm --dir apps/aevatar-console-web tsc
  • git diff --check
  • bash tools/ci/test_stability_guards.sh

Important limitation remains: the frontend can poll existing APIs, but visibility of genuinely running workflow executions still depends on the backend returning running runs from readmodels or adding the scope/team latest-run feed tracked by #2472.

@AbigailDeng

Copy link
Copy Markdown
Contributor Author

Follow-up pushed in afee1c775 for the canvas interaction issue:

  • Removed React Flow's fitView prop and replaced it with controlled initial/focus fitting.
  • Prevented audit/data refreshes from calling fitView after the user pans the graph, so drag no longer snaps back to the default origin.
  • Kept automatic fitting for a genuinely new graph/run identity.
  • Replaced React Flow's built-in animated edge behavior with a stable CSS class animation for the focused flow edge to reduce visible jitter.
  • Added a regression test that simulates a user pan followed by an audit refresh and asserts fitView is not called again.

Validation:

  • pnpm --dir apps/aevatar-console-web test --runInBand src/pages/MissionWall/components/WorkflowReplayCanvas.test.tsx src/pages/MissionWall/index.test.tsx src/pages/MissionWall/hooks/usePublishedRunWindow.test.ts src/pages/MissionWall/wallDirector.test.ts
  • pnpm --dir apps/aevatar-console-web tsc
  • git diff --check
  • bash tools/ci/test_stability_guards.sh

@AbigailDeng

Copy link
Copy Markdown
Contributor Author

Backend follow-up for the top status strip metrics opened as #2475. Current frontend can approximate from existing member/service/run fan-out, but and complete scope/team counts need a backend readmodel-backed summary/watermark to be authoritative.

@AbigailDeng

Copy link
Copy Markdown
Contributor Author

Backend follow-up for the top status strip metrics opened as #2475.

Current frontend can only approximate the top strip from existing member/service/run fan-out:

  • Live: derived from query success/error/loading state.
  • Running / Waiting / Failed / Retrying: counted from whatever GET /api/scopes/{scopeId}/services/{serviceId}/runs?take=50 returns for matched services.
  • Fresh: currently estimated from the newest returned run timestamp, not from a backend projection watermark.

So the UI can display a best-effort version today, but complete scope/team counts and authoritative freshness need a backend readmodel-backed summary/watermark.

@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (docs/2026-06-29_workflow-mission-wall-product-package@0d77146). Learn more about missing BASE report.

@@                                   Coverage Diff                                    @@
##             docs/2026-06-29_workflow-mission-wall-product-package    #2473   +/-   ##
========================================================================================
  Coverage                                                         ?   84.10%           
========================================================================================
  Files                                                            ?     1182           
  Lines                                                            ?    89560           
  Branches                                                         ?    11698           
========================================================================================
  Hits                                                             ?    75323           
  Misses                                                           ?     9063           
  Partials                                                         ?     5174           
Flag Coverage Δ
ci 84.10% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AbigailDeng

Copy link
Copy Markdown
Contributor Author

Follow-up fix for the latest Mission Wall feedback:

  • Completed/DONE runs no longer mark graph edges as live flow; only running/waiting/retrying runs can produce the focused flowing edge class.
  • Traversed edges now render as static completed lines before branch/live styling, so completed workflow paths stay solid.
  • Selected run cards now fall back to service-run audit steps when the catalog summary reports 0 / 0 steps or 0 duration. This fixes cards like mission_wall_15_node_probe showing 0 / 0 and 00:00 while the graph has real completed steps.
  • Mission Wall also treats DONE as a completed run status and treats audit steps with completedAt as completed when success is omitted.

Validation:

  • pnpm --dir apps/aevatar-console-web test --runInBand src/pages/MissionWall/index.test.tsx src/pages/MissionWall/components/WorkflowReplayCanvas.test.tsx src/pages/MissionWall/hooks/usePublishedRunWindow.test.ts src/pages/MissionWall/wallDirector.test.ts
  • pnpm --dir apps/aevatar-console-web tsc
  • pnpm --dir apps/aevatar-console-web build
  • git diff --check
  • bash tools/ci/test_stability_guards.sh

@AbigailDeng

Copy link
Copy Markdown
Contributor Author

Follow-up fix for the card progress semantics:

  • The Published Run Window now backfills progress/duration from each run's own service-run audit data, not only from the currently selected run.
  • Existing cards are allowed to update execution facts such as progress, duration, and current step without changing the manually stable list order.
  • Audit lookups stay on the service-run identity boundary: scopeId + published serviceId + runId (+ actorId), with no workflowId/memberId fallback.
  • Added regression coverage for an unselected run whose catalog reports 0 / 0 and 0 duration while its audit steps contain the real execution progress.

Validation:

  • pnpm --dir apps/aevatar-console-web test --runInBand src/pages/MissionWall/index.test.tsx src/pages/MissionWall/components/WorkflowReplayCanvas.test.tsx src/pages/MissionWall/hooks/usePublishedRunWindow.test.ts src/pages/MissionWall/wallDirector.test.ts
  • pnpm --dir apps/aevatar-console-web tsc
  • pnpm --dir apps/aevatar-console-web build
  • git diff --check
  • bash tools/ci/test_stability_guards.sh

@AbigailDeng

Copy link
Copy Markdown
Contributor Author

Follow-up fix for the Mission Wall timing regression shown in the latest screenshots.\n\nRoot cause: the focused run had its own selected-audit query path, so changing focus could rebuild the source with a different audit snapshot and overwrite the same run card's duration/progress. That made a completed run appear as both 1 / 1 steps 00:01 and 0 / 0 steps 00:02 depending on focus.\n\nFix:\n- Removed the selected-run audit override path from the page.\n- Focus is now only selection state for the stage graph.\n- Run card duration/progress and the stage graph both come from the shared per-run audit cache keyed by scopeId + serviceId + runId.\n- Removed the selected-audit loading overlay because the page no longer has a second selected audit source.\n- Added a regression test that switches focus between two workflows and asserts the original run card keeps its own 1 / 1 steps and 00:01 values.\n\nValidation:\n- pnpm --dir apps/aevatar-console-web test --runInBand src/pages/MissionWall/index.test.tsx src/pages/MissionWall/components/WorkflowReplayCanvas.test.tsx src/pages/MissionWall/hooks/usePublishedRunWindow.test.ts src/pages/MissionWall/wallDirector.test.ts\n- pnpm --dir apps/aevatar-console-web tsc\n- pnpm --dir apps/aevatar-console-web build\n- git diff --check\n- bash tools/ci/test_stability_guards.sh

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