---
id: w6/m12/t005
title: "Dashboard workspace settings: plan section with change-plan dialog"
worker: worker6
status: todo
estimate: 45m
depends_on: [w6/m12/t003, w6/m12/t004]
---

## Objective

Add a Plan section to the workspace settings page: current plan shown, a change-plan dialog with plan cards (matching t001's capture layout), and backend guard errors surfaced verbatim so a blocked downgrade tells the user exactly what to remove first.

## Context

- Workspace settings page shipped in w6/m3 (rename + danger-zone delete) — follow its section/dialog patterns and the `sudo`-guard error-surfacing precedent.
- Mutation from t003 (`changeWorkspacePlan`); plan vocabulary hobby/pro/scale/enterprise; both locales (`en.ts`/`zh.ts`) per the feature-locale pattern.
- Reference layout: `docs/render-artifacts/workspace-plan-change.md` (t001).

## Steps

1. Add the Plan section (current plan badge + Change plan button) to the workspace settings feature.
2. Build the dialog: plan cards, confirm, `changeWorkspacePlan` call, Apollo cache update of the workspace's `plan`.
3. Surface guard errors inline in the dialog (not a generic toast); success toast + updated badge on completion.

## Files

- `dashboard/src/features/` workspace-settings feature (components, hooks, api `.graphql`, locales)

## Acceptance criteria

- [ ] Upgrade hobby→pro from the dialog updates the badge without reload
- [ ] A guarded downgrade shows the backend's error copy inline
- [ ] `yarn typecheck` + `yarn vitest run` green; prettier scoped to touched files only

## Out of scope

- Any payment/billing step; role-picker UI changes beyond what t004's errors force
