Skip to content

showcase: the New Project wizard offers status values the state machine refuses on create, and the refusal only lands at step 3 as an unlocalized "Invalid project status transition." #14311

Description

@hotlong

What happens

Showcase → Workspace → New Project (Wizard), signed in as the seeded admin, zh-CN session:

  1. Step 1: name + account (Northwind). Next.
  2. Step 2: 状态 = Active, 健康度 = Green. Next.
  3. Step 3: budget 50000, dates. CreatePOST /api/v1/data/showcase_project400 VALIDATION_FAILED, banner + toast Invalid project status transition.
  4. Back to step 2, 状态 = Planned, Next, Create → 201.

So the wizard lets the author pick a status the project state machine does not accept as an initial state, and the only feedback comes three steps later, in English, without naming the field.

Three things to decide

  • Showcase content: the wizard's status select should only offer the state machine's initial states on create (or default to planned and hide the select), so the demo of "state machine + wizard" does not demo a dead end.
  • Product: a form for a create (recordId absent) could derive the allowed initial values from the object's stateMachine / status transitions and constrain the select — the metadata already says which transitions exist.
  • Error surface: the validation error should be located (status) so the wizard can jump back to the step that owns the field, and the message should go through the translation packs (it is the only English error on an otherwise zh-CN form).

Evidence

Network: POST /api/v1/data/showcase_project → 400 then → 201 after changing the status. Showcase source: examples/app-showcase/src/ui/pages/new-project-wizard.page.ts, examples/app-showcase/src/data/objects/project.object.ts (status state machine).

Also observed on the same run: the sticky error toast stays on screen next to the later success toast ("Your new project is ready…"), so the final screen shows both.

Found during the objectui pin-bump dogfood (PR #14295).

Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions