---
id: w6/m3/t005
title: "Acceptance pass: create → switch → rename → delete e2e in a real browser"
worker: worker6
status: done
estimate: 25m
depends_on: [w6/m3/t002, w6/m3/t004]
---

## Closeout

**Ran, but against the offline dev stub, not a live `scripts/mock-cluster.sh` cluster** — none was available this session. `scripts/local-bex.mjs` was extended with an in-memory `Workspace` store (seeded with two workspaces on different plans), `createWorkspace`/`renameWorkspace`/`deleteWorkspace`, the Hobby-cap refusal, and `ownerId`-scoped `Services`/`Databases`. Drove the full flow in a real browser (Playwright): switcher opens and lists both seeded workspaces → switching to the unseeded one shows an empty services/databases list (cross-workspace scoping confirmed) → `/new/workspace` create with Hobby preselected lands in the new empty workspace with a success toast → created 3 more Hobby workspaces to hit the 5-workspace cap, a 6th attempt showed the inline limit error without navigating away → rename on the settings page propagated to the switcher instantly → delete required an exact-name match (button stayed disabled on a partial/mistyped value) and, once matched, deleted and landed back in a remaining workspace (`acme-hq`). No console errors beyond pre-existing, unrelated stub warnings (`idleTTLSeconds` missing field — present before this milestone). Screenshots/console logs are in `.playwright-mcp/` (gitignored, per `dashboard/CLAUDE.md`).

A genuine live-cluster rerun remains a follow-up (see milestone README) — m1's own real-infra e2e test already covers the backend half of this DoD.

## Objective

Drive the whole lifecycle in a real browser against a live cluster (Playwright MCP, like w4/m9's e2e pass): sign in → create a second workspace on `/new/workspace` → deploy or view a service in it → switch back and forth confirming scoping → rename → delete with confirmation → land back in the original workspace. Capture screenshots for the record.

## Context

- Local stack: `scripts/mock-cluster.sh` cluster + backend with `BEX_CP_DB_URI` + OpenFGA; dashboard dev server (`dashboard/CLAUDE.md`).
- Screenshots: bare filenames → `.playwright-mcp/`.
- This is the milestone's DoD rehearsal — failures here are implementation tasks reopened, not new tasks.

## Steps

1. Stand up the stack; seed one identity with its m9 default workspace + a service.
2. Run the flow above, asserting resource scoping at each switch.
3. Verify the 6th-Hobby-workspace inline error and the mistyped-delete-confirmation refusal.

## Files

- `.playwright-mcp/` (screenshots)
- no product code (fixes go to the owning task)

## Acceptance criteria

- [ ] Full create→switch→rename→delete pass completes without console errors
- [ ] Cross-workspace scoping verified on services, databases, and env pages
- [ ] Both guard refusals (limit, confirmation) observed rendering correctly

## Out of scope

- Automated CI e2e (t008 covers automated coverage at the component/integration level).
