---
id: w6/m10/t004
title: "Dashboard Team page: render email as the member's primary identity"
worker: worker6
status: done
estimate: 40m
depends_on: [w6/m10/t003]
---

## Objective

The Settings → Team page shows each accepted member's email as the primary identity, demoting the raw subject (today it renders `member.subject` in a mono font as the whole identity, with an explicit "no per-member email store yet" comment this milestone obsoletes). When email is empty (Kratos admin unwired, or a machine/Hydra-client member), fall back to the `userId` own- id so the row is never blank.

## Context

- `dashboard/src/features/team/api/team.graphql` — `workspaceMembers` query selects `subject role createdAt`; add `userId email`. Mutations keep `subject` per t001's verdict.
- `dashboard/src/features/team/components/member-row.tsx` — the row (`member.subject` at :54; remove-confirm copy at :98 interpolates the subject — switch the human-facing copy to email-or-userId).
- `dashboard/src/features/team/components/team-panel.tsx`, `hooks/use-team.ts` — types/plumbing.
- `dashboard/src/features/team/components/__tests__/team-panel.test.tsx` — update fixtures/assertions.
- Follow `dashboard/CLAUDE.md` (codegen, i18n keys for any new copy); regenerate GraphQL types after editing `team.graphql`.

## Steps

1. Extend the query + generated types.
2. Rework `member-row.tsx`: email primary, fallback `userId`; role dropdown/remove flows keyed unchanged.
3. Update the i18n string(s) that interpolate the member identity.
4. Update tests; run the dashboard test suite.

## Files

- `dashboard/src/features/team/api/team.graphql`
- `dashboard/src/features/team/components/member-row.tsx`
- `dashboard/src/features/team/components/team-panel.tsx`
- `dashboard/src/features/team/hooks/use-team.ts`
- `dashboard/src/features/team/components/__tests__/team-panel.test.tsx`

## Acceptance criteria

- [ ] A member with a resolvable email shows the email, not the subject.
- [ ] A member without email shows the `own-` `userId` (never an empty cell).
- [ ] Change-role and remove still work against the unchanged mutation keys (test).

## Out of scope

- Invite flows (already email-based).
- Avatars/profile pages.
