Skip to content

Bug: Account Teams turns a failed membership read into “You are not in any team yet” #3847

Closed

Description

@yannickmonney

Finding

Account Teams turns a failed membership read into “You are not in any team yet”

Impact

Account settings can tell a member they belong to no teams when the membership query has failed. Team membership controls document access, project audiences, and inbox scope; hiding the read failure can mislead the member about permissions and gives no recovery path.

Reproduction

  1. Open Account settings for a member whose organization has team membership.
  2. Let the myTeamsQuery request settle with HTTP 503 after loading ends.
  3. Inspect the Your teams section.

Actual result: the normal “You are not in any team yet” copy is rendered. No read-failure indication or Retry/Try again/Reload action appears.

Expected result: show a failed-read state with Retry and reserve the no-membership copy for a successful empty response.

Root cause and scope

At current origin 9ea59724df24d62729a9360f3902d964dab39b3e:

  • services/platform/app/features/settings/teams/hooks/queries.ts:45-57 destructures only data and isLoading from the React Query result and returns teams: data ?? undefined, discarding isError, error, and refetch.
  • services/platform/app/features/settings/account/components/teams-section.tsx:24-47 branches solely on isLoading and teams.length; undefined after a settled error follows the ordinary empty-membership path.

Evidence

  • Probe: /Users/yannick/.codex/notes/tale-1000-additional/settings-next/teams-read-error.probe.test.tsx
  • Replay: /Users/yannick/.codex/notes/tale-1000-additional/settings-next/teams-read-error.replay.log
  • Probe assertion: one Vitest test passed with teams: undefined, isLoading:false, isError:true; normal no-team copy appeared with no alert/retry.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions