Skip to content

Integrate console with Team Entry Member HTTP API#786

Open
potter-sun wants to merge 4 commits into
feature/routerfrom
feat/2026-05-21_team-test-entry-member
Open

Integrate console with Team Entry Member HTTP API#786
potter-sun wants to merge 4 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
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