Skip to content

Integrate console with Team Entry Member HTTP API#786

Merged
potter-sun merged 5 commits into
feature/routerfrom
feat/2026-05-21_team-test-entry-member
May 25, 2026
Merged

Integrate console with Team Entry Member HTTP API#786
potter-sun merged 5 commits into
feature/routerfrom
feat/2026-05-21_team-test-entry-member

Conversation

@potter-sun
Copy link
Copy Markdown
Collaborator

@potter-sun potter-sun commented May 21, 2026

Problem

Closes #785.

This PR integrates the Aevatar console frontend with the new Team Entry Member backend HTTP API from 2026-05-21-studio-team-entry-member-http-api.md. The key requirement is to honor the backend contract instead of treating entry-member selection as a purely local UI state: mutation endpoints return 202 Accepted, the Team read model is eventually consistent, and team invocation is only valid when the selected entry member is bind ready and backed by a published service.

Backend API Integration

  • Calls PUT /api/scopes/{scopeId}/teams/{teamId}/entry-member to select a team entry member.
  • Calls DELETE /api/scopes/{scopeId}/teams/{teamId}/entry-member to clear the team entry member.
  • Treats both mutation responses as no-body 202 Accepted acknowledgements, not as committed read-model state.
  • Adds Team stream invocation through POST /api/scopes/{scopeId}/teams/{teamId}/invoke/{endpointId}:stream.
  • Models entryMemberId as selection identity only; readiness still comes from member lifecycle and publishedServiceId.

Frontend Behavior

  • Studio can set a bound team member as the entry member and communicate the backend accepted result honestly.
  • Studio waits for the Team read model to expose the selected entryMemberId before opening Team Detail in test mode.
  • Team Detail supports testTeam=1 deep-linking and a top-level Test Team action.
  • Entry invocation is enabled only when the selected member is bind_ready and has a non-empty publishedServiceId.
  • Entry-member write actions are disabled while another entry write is in flight to avoid overlapping backend requests.
  • Backend error payloads are parsed into structured messages for the entry-member and invocation flows.

Impact

Frontend only. The console now follows the backend Team Entry Member API semantics end to end across Studio, Team Detail, navigation, and runtime invocation APIs.

Validation

  • git diff --check
  • npm --prefix apps/aevatar-console-web run tsc
  • npm --prefix apps/aevatar-console-web run jest -- src/pages/teams/detail.test.tsx src/pages/studio/index.test.tsx src/pages/studio/components/bind/StudioMemberBindPanel.test.tsx src/shared/navigation/teamRoutes.test.ts src/shared/api/runtimeRunsApi.test.ts src/shared/studio/api.test.ts --runInBand
  • bash tools/ci/test_stability_guards.sh

Notes: Jest still prints existing watchman recrawl and React act(...) warnings, but all selected suites passed.

@potter-sun potter-sun changed the title Add team entry member test flow Integrate console with Team Entry Member HTTP API May 21, 2026
@potter-sun potter-sun marked this pull request as ready for review May 21, 2026 11:02
@potter-sun potter-sun requested a review from AbigailDeng as a code owner May 21, 2026 11:02
…5-21_team-test-entry-member

# Conflicts:
#	apps/aevatar-console-web/src/shared/api/runtimeRunsApi.test.ts
@potter-sun potter-sun merged commit f1a1232 into feature/router May 25, 2026
11 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.06%. Comparing base (1aecbde) to head (9253ef6).
⚠️ Report is 6 commits behind head on feature/router.

@@               Coverage Diff               @@
##           feature/router     #786   +/-   ##
===============================================
  Coverage           83.06%   83.06%           
===============================================
  Files                 981      981           
  Lines               61936    61936           
  Branches             8069     8069           
===============================================
  Hits                51447    51447           
- Misses               7009     7010    +1     
+ Partials             3480     3479    -1     
Flag Coverage Δ
ci 83.06% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 2 files 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.

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