Skip to content

Fix Team projection catch-up#595

Merged
potter-sun merged 2 commits intodevfrom
feat/2026-05-08_team-projection-catch-up
May 8, 2026
Merged

Fix Team projection catch-up#595
potter-sun merged 2 commits intodevfrom
feat/2026-05-08_team-projection-catch-up

Conversation

@potter-sun
Copy link
Copy Markdown
Collaborator

Summary

This PR completes the Console Web Team P0 frontend fixes around canonical Team identity and projection catch-up:

  • routes Team detail through /teams/:scopeId/:teamId and treats /teams/:scopeId as a no-team-selected state
  • sends Team endpoints through the Studio Hosting API target without stealing runtime member routes
  • writes newly-created Teams into the React Query cache, then navigates to canonical Team detail
  • handles short-lived projection lag by retrying just-created Team summary/member 404s and showing syncing copy instead of a hard error
  • updates Team route, proxy, create, detail, roster, and return-route tests
  • updates local console docs/env defaults now that Studio Hosting is composed by Mainnet Host

Why

Team creation is write-side authoritative, while Team list/detail/member reads come from projected read models. In the real Garnet + Elasticsearch setup, the committed Team can be accepted before the read model is visible. Before this PR, the UI could immediately hit 404 or fail to show the created Team in list/detail, which made a successful create look broken.

Validation

  • npm --prefix apps/aevatar-console-web run tsc
  • npm --prefix apps/aevatar-console-web run jest -- --selectProjects jsdom --runTestsByPath src/pages/teams/detail.test.tsx src/pages/teams/new.test.tsx src/shared/studio/api.test.ts src/shared/navigation/teamRoutes.test.ts src/shared/config/proxyConfig.test.ts src/pages/teams/home.test.tsx src/pages/runs/index.test.tsx --runInBand
  • npm --prefix apps/aevatar-console-web run jest -- --selectProjects node --runTestsByPath src/shared/config/proxyConfig.test.ts --runInBand
  • git diff --check
  • Manual API smoke through http://127.0.0.1:5173:
    • POST /api/scopes/{scopeId}/teams returned 201
    • immediate detail read returned transient 404
    • after ~2s detail/list/members returned 200, and list contained the created Team

Watchman emitted a recrawl warning during Jest, but all targeted suites passed.

Issues

Closes #579
Closes #580
Closes #581
Closes #582
Closes #583
Closes #584
Refs #585

@potter-sun potter-sun marked this pull request as ready for review May 8, 2026 06:53
@potter-sun potter-sun requested a review from AbigailDeng as a code owner May 8, 2026 06:53
@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.02%. Comparing base (60eb12e) to head (0c8376d).

@@           Coverage Diff           @@
##              dev     #595   +/-   ##
=======================================
  Coverage   72.01%   72.02%           
=======================================
  Files        1255     1255           
  Lines       90723    90723           
  Branches    11877    11877           
=======================================
+ Hits        65338    65341    +3     
+ Misses      20703    20700    -3     
  Partials     4682     4682           
Flag Coverage Δ
ci 72.02% <ø> (+<0.01%) ⬆️

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.

@potter-sun potter-sun merged commit 65e4859 into dev May 8, 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

1 participant