Scrum4Me/actions
Janpeter Visser 5cb3abbd3d
Sprint: Idee regril mogelijkheid (#144)
* feat(ST-cmovhveef): add PLANNED to GRILL_TRIGGERABLE_FROM and PLANNED→GRILLING transition

- GRILL_TRIGGERABLE_FROM now includes 'PLANNED' in actions/ideas.ts
- ALLOWED_TRANSITIONS PLANNED entry extended with 'GRILLING' in lib/idea-status.ts
- Updated canTransition test to reflect the new re-grill-from-PLANNED behavior

* test(ST-cmovhvef3): add exhaustive re-grill canTransition test covering PLANNED

Adds a loop test that asserts canTransition(status, 'GRILLING') for all
statuses in GRILL_TRIGGERABLE_FROM that support the transition, explicitly
documenting PLANNED as a valid re-grill entry point.

* feat(ST-cmovhvegf): add existingPbi pre-check in materializeIdeaPlanAction

- Adds options.allowAlongside parameter to control behaviour when a PBI
  with executed tasks already exists.
- Returns 409 PBI_HAS_ACTIVE_TASKS:<code> when tasks are DONE/IN_PROGRESS
  and allowAlongside is not set.
- Auto-deletes the old PBI inside the transaction when no tasks have been
  executed (atomic replace).
- Alongside mode (allowAlongside=true) skips deletion and creates a new PBI.

* test(ST-cmovhveh3): add pre-check integration tests for materializeIdeaPlanAction

Three new scenarios in ideas-crud.test.ts:
- auto-vervang: old PBI deleted in transaction when no executed tasks
- conflict-409: returns PBI_HAS_ACTIVE_TASKS:<code> with active tasks
- alongside: skips delete and creates new PBI when allowAlongside=true
Also adds task.count, pbi.findUnique, pbi.delete to prisma mock.

* feat(ST-cmovhveih): remove PLANNED-blokkering in idea-row-actions, add inline Bekijk-PBI button

- Removed grillBlockedReason guard for status==='planned', enabling re-grill from PLANNED
- Removed the early return for PLANNED that hid all standard buttons
- Added conditional 'Bekijk <code>' button at the start of the standard button set,
  visible only when status==='planned' and PBI + product_id are present

* feat(ST-cmovhvej7): add PBI_HAS_ACTIVE_TASKS alongside-dialoog in materialize handler

When materializeIdeaPlanAction returns code 409 with PBI_HAS_ACTIVE_TASKS:<code>,
a confirm dialog offers the user a choice: create new PBI alongside the existing one
or cancel. Alongside=true retries the action; cancel leaves the idea in PLAN_READY.
2026-05-07 15:27:43 +02:00
..
admin feat(T-572): map SKIPPED in lib/job-status + alle terminal-checks 2026-05-05 23:10:14 +02:00
active-product.ts feat(M9): active product backlog — persistent active PB, NavBar splits, sprint card styling (#10) 2026-04-27 20:25:13 +02:00
api-tokens.ts feat(rate-limit): per-user mutation-rate-limiting (v1-readiness #3) 2026-05-04 13:48:59 +02:00
auth.ts fix: admin-navigatie zichtbaar voor ADMIN-rol gebruikers 2026-05-05 20:46:27 +02:00
claude-jobs.ts PBI-46: Sprint-niveau jobflow met cascade-FAIL (F1/F2/F4 Scrum4Me) (#136) 2026-05-06 16:43:57 +02:00
ideas.ts Sprint: Idee regril mogelijkheid (#144) 2026-05-07 15:27:43 +02:00
pairing.ts M10: Password-loze inlog via QR-pairing (ST-1001..ST-1008) (#12) 2026-04-28 00:01:04 +02:00
pbis.ts feat(rate-limit): per-user mutation-rate-limiting (v1-readiness #3) 2026-05-04 13:48:59 +02:00
products.ts PBI-50: SPRINT_IMPLEMENTATION single-session sprint runner (Scrum4Me-side) (#139) 2026-05-07 13:05:02 +02:00
profile.ts feat(ST-507): persist email in updateProfileAction with Zod validation 2026-04-26 19:37:49 +02:00
questions.ts fix(m12): user can answer idea-questions — inline + bell support 2026-05-05 13:05:39 +02:00
settings.ts ST-1240: Verwijder backend todo-code (server actions + API route) (#135) 2026-05-06 12:24:48 +02:00
sprint-runs.ts PBI-50: SPRINT_IMPLEMENTATION single-session sprint runner (Scrum4Me-side) (#139) 2026-05-07 13:05:02 +02:00
sprints.ts PBI-46: Sprint-niveau jobflow met cascade-FAIL (F1/F2/F4 Scrum4Me) (#136) 2026-05-06 16:43:57 +02:00
stories.ts feat(rate-limit): per-user mutation-rate-limiting (v1-readiness #3) 2026-05-04 13:48:59 +02:00
tasks.ts PBI-46: Sprint-niveau jobflow met cascade-FAIL (F1/F2/F4 Scrum4Me) (#136) 2026-05-06 16:43:57 +02:00
user-questions.ts feat(ST-p6d1odh0): createUserQuestionAction — UserQuestion + PLAN_CHAT job queuing 2026-05-05 17:30:00 +02:00