feat(task-022): add admin workflow builder ui
This commit is contained in:
@@ -37,15 +37,15 @@ Development description: Build the Admin dashboard workflow builder so Admins ca
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] TDD pre-requirement: before implementation, write one failing frontend model test for creating a workflow draft and adding/reordering stages; proceed one behavior at a time and record evidence in `Result`.
|
||||
- [ ] Admin navigation exposes Workflows and routes to the builder page.
|
||||
- [ ] Editor navigation does not expose Workflows.
|
||||
- [ ] Workflow list loads from the backend API and shows empty/error/loading states.
|
||||
- [ ] Workflow editor can create workflow drafts and persist metadata.
|
||||
- [ ] Workflow editor can add, edit, delete, and reorder stages.
|
||||
- [ ] Workflow editor can edit structured stage parts without converting them to opaque strings.
|
||||
- [ ] Activation/archive actions update UI state after successful API responses.
|
||||
- [ ] Frontend code follows the existing FSD folder boundaries.
|
||||
- [x] TDD pre-requirement: before implementation, write one failing frontend model test for creating a workflow draft and adding/reordering stages; proceed one behavior at a time and record evidence in `Result`.
|
||||
- [x] Admin navigation exposes Workflows and routes to the builder page.
|
||||
- [x] Editor navigation does not expose Workflows.
|
||||
- [x] Workflow list loads from the backend API and shows empty/error/loading states.
|
||||
- [x] Workflow editor can create workflow drafts and persist metadata.
|
||||
- [x] Workflow editor can add, edit, delete, and reorder stages.
|
||||
- [x] Workflow editor can edit structured stage parts without converting them to opaque strings.
|
||||
- [x] Activation/archive actions update UI state after successful API responses.
|
||||
- [x] Frontend code follows the existing FSD folder boundaries.
|
||||
|
||||
## Verification
|
||||
|
||||
@@ -56,9 +56,14 @@ Development description: Build the Admin dashboard workflow builder so Admins ca
|
||||
|
||||
## Result
|
||||
|
||||
- Status: Not started.
|
||||
- TDD plan:
|
||||
- Red evidence:
|
||||
- Green evidence:
|
||||
- Refactor notes:
|
||||
- Status: Implemented frontend admin workflow builder.
|
||||
- TDD plan: Use `apps/frontend/tests/admin_workflows.model.test.mjs` as the red pre-requirement, then add model helpers, API client methods, navigation, and the route UI.
|
||||
- Red evidence: `node apps/frontend/tests/admin_workflows.model.test.mjs` failed because `features/admin-workflows/model.ts`, workflow API methods, and the Admin Workflows nav item were missing.
|
||||
- Green evidence: `node apps/frontend/tests/admin_workflows.model.test.mjs` passed after adding workflow model/API/nav behavior.
|
||||
- Refactor notes: Added shared workflow template contract types, dense Admin workflow list/create/editor UI, structured stage part JSON editing, stage reorder controls, activation/archive actions, audit display, and explicit frontend workspace root config for local Next runs.
|
||||
- Verification output:
|
||||
- `node apps/frontend/tests/admin_workflows.model.test.mjs` - passed.
|
||||
- `node apps/frontend/tests/role-navigation.test.mjs` - passed: `role navigation hides Admin-only items for Editors`.
|
||||
- `pnpm -C apps/frontend run test:ui` - passed.
|
||||
- `pnpm -C apps/frontend run typecheck` - passed.
|
||||
- Browser smoke was attempted with a local mock backend, but local Next dev startup is blocked by existing dependency drift: `Mismatching @next/swc version, detected: 15.5.4 while Next.js is on 16.2.6` and `bindings.lockfileTryAcquireSync is not a function`.
|
||||
|
||||
Reference in New Issue
Block a user