Skip to content

Fix GAgent member and draft-run flows#702

Merged
AbigailDeng merged 14 commits into
devfrom
refactor/2026-05-19_gagent-member
May 21, 2026
Merged

Fix GAgent member and draft-run flows#702
AbigailDeng merged 14 commits into
devfrom
refactor/2026-05-19_gagent-member

Conversation

@AbigailDeng
Copy link
Copy Markdown
Contributor

@AbigailDeng AbigailDeng commented May 19, 2026

Problem

  • GAgent-type members created from Studio could disappear after refresh because the UI did not preserve the pending member/actor binding across read-model lag.
  • Newly created teams could show a success state but remain absent from My Teams until projection caught up.
  • The GAgent draft-run SSE endpoint could open a request without sending any event frames, leaving the Run button stuck in loading.

Solution

  • Preserve pending GAgent member binding candidates and bridge them into the Studio member flow until the backend read model catches up.
  • Add a pending team roster bridge for newly created teams so My Teams remains honest during read-model lag.
  • Add frontend draft-run timeout handling and explicit dev proxy routing for /api/scopes/{scopeId}/gagent/draft-run.
  • Change the CQRS command interaction flow to emit the accepted/run-started callback after command preparation, before awaiting actor dispatch, so SSE clients receive the first frame promptly while dispatch and live projection continue.

Impacted paths

  • apps/aevatar-console-web/src/pages/studio/*
  • apps/aevatar-console-web/src/pages/teams/*
  • apps/aevatar-console-web/src/pages/gagents/*
  • apps/aevatar-console-web/src/shared/api/runtimeGAgentApi.ts
  • apps/aevatar-console-web/config/proxy.ts
  • src/Aevatar.CQRS.Core/Interactions/DefaultCommandInteractionService.cs

Validation

  • pnpm jest --selectProjects jsdom --runTestsByPath src/pages/studio/components/StudioBuildPanels.test.tsx
  • pnpm jest --selectProjects jsdom --runTestsByPath src/pages/studio/index.test.tsx
  • pnpm jest --selectProjects jsdom --runTestsByPath src/pages/teams/home.test.tsx src/pages/teams/new.test.tsx
  • pnpm jest --selectProjects jsdom --runTestsByPath src/shared/api/runtimeGAgentApi.test.ts src/pages/gagents/index.test.tsx src/pages/studio/components/StudioBuildPanels.test.tsx
  • pnpm jest --selectProjects node --runTestsByPath src/shared/config/proxyConfig.test.ts
  • pnpm tsc
  • dotnet test test/Aevatar.CQRS.Core.Tests/Aevatar.CQRS.Core.Tests.csproj --nologo --filter DefaultCommandInteractionServiceTests
  • dotnet test test/Aevatar.GAgentService.Integration.Tests/Aevatar.GAgentService.Integration.Tests.csproj --nologo --filter ScopeGAgentEndpointsTests
  • git diff --check

@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.47%. Comparing base (9888995) to head (9b8e81a).

@@            Coverage Diff             @@
##              dev     #702      +/-   ##
==========================================
- Coverage   82.47%   82.47%   -0.01%     
==========================================
  Files         941      941              
  Lines       60101    60101              
  Branches     7872     7872              
==========================================
- Hits        49571    49569       -2     
- Misses       7132     7133       +1     
- Partials     3398     3399       +1     
Flag Coverage Δ
ci 82.47% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes

🚀 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.

…gent-member

# Conflicts:
#	apps/aevatar-console-web/src/pages/teams/new.tsx
@AbigailDeng AbigailDeng merged commit c0b5602 into dev May 21, 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.

2 participants