PR: #713: feat(team): preview member consequences [Story-2676] by @ayush-pramaan
View PR →
Story-2676 ยท Matter Team D18

Firm member changes warn before they affect led matters

Firm members settings now previews Matter Team consequences before a member is removed or demoted. The preview is advisory only: counsel can cancel or continue with the existing mutation while the server behavior remains unchanged.

What changes

Remove member

Choosing Remove opens the consequence dialog before the existing deactivate mutation runs.

Demote role

Lowering a member's firm role previews the led matters affected by the target role before the existing role-change mutation runs.

Never blocking

Loading or failed previews still leave the primary confirmation button available. There is no separate skip path.

Preview outcomes

Review path

Surface Expected proof
Settings / Team / DemoteConsequenceDialog / MixedOutcomes Shows affected auto-promoted and No lead matter rows with matter references, matter names, body copy, and outcome badges.
Settings / Team / DemoteConsequenceDialog / AllAutoPromoted Shows only affected auto-promoted matter rows.
Settings / Team / DemoteConsequenceDialog / AllNoLead Shows only affected No lead matter rows.
Settings / Team / DemoteConsequenceDialog / NoLedMatters Shows the demote capability warning without an affected-matter list.
Settings / Team / DemoteConsequenceDialog / RemoveAffectedMatters Shows remove copy and affected matter rows, while the existing deactivate mutation remains unchanged.
Settings / Team / DemoteConsequenceDialog / RemoveNoLedMatters Shows the access-loss sentence without a led-matter outcome list.

Files changed

10 file(s), +1046 / -49 lines

Path Role + -
messages/en.jsonConfig+26-2
messages/hi.jsonConfig+26-2
src/components/settings/team/demote-consequence-dialog.stories.tsxComponent+203-0
src/components/settings/team/demote-consequence-dialog.tsxComponent+365-0
src/components/settings/team/presentation.tsComponent+42-6
src/components/settings/team/team-list-page.test.tsxComponent+284-9
src/components/settings/team/team-list-page.tsxComponent+13-11
src/components/settings/team/team-storybook-helpers.tsxComponent+4-0
src/components/settings/team/use-team-list-actions.tsComponent+63-11
tests/unit/use-team-list-actions.test.tsxTest+20-8