Scrum4Me/components/ideas
Janpeter Visser 76c2efd27c
feat(ideas): upload-plan knop — short-circuit van Make-Plan AI-flow (#197)
Voegt een 'Upload plan' knop toe in idea-row-actions (verschijnt in zowel
list als idea-detail). Klik → file picker → kies .md → server-side parse +
opslaan; idea-status springt naar PLAN_READY. Vandaaruit de bestaande
'Maak PBI' knop voor materialize.

Server (uploadPlanMdAction):
- Toegestaan vanuit DRAFT, GRILLED, PLAN_FAILED, PLAN_READY
- DRAFT → skip-grill: status gaat direct naar PLAN_READY
- PLAN_READY overschrijft het bestaande plan (consistent met
  updatePlanMdAction, geen confirmation)
- Geblokkeerd in GRILLING/PLANNING (job loopt), PLANNED (al gematerialiseerd)
- Parse-failure → 422 + details (NIET opslaan, zodat een onparseerbaar plan
  nooit in de DB belandt)
- Empty / >100k chars → 422
- Schrijft IdeaLog NOTE met from_status + length
- Rate-limit + demo-guard + ownership-check via loadOwnedIdea (zelfde
  patroon als updatePlanMdAction)

UI (idea-row-actions.tsx):
- Hidden <input type=file accept=".md,.markdown,text/markdown,text/plain">
- FileReader → text → action
- Toast bij success + router.refresh()
- Blocked-tooltip in andere statussen

Tests: 10 nieuwe in __tests__/actions/ideas-crud.test.ts dekkend voor:
happy paths (DRAFT/GRILLED/PLAN_READY-overwrite/PLAN_FAILED), blocks
(PLANNED/GRILLING), validation (empty/oversized/parse-fail), 404.
Full suite groen: 849/849.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 15:56:16 +02:00
..
download-md-button.tsx Sprint: Verbeteren debug mode (#179) 2026-05-09 22:46:29 +02:00
idea-detail-layout.tsx Sprint: kkkk (#195) 2026-05-13 15:39:23 +02:00
idea-list.tsx Sprint: Verbeteren debug mode (#179) 2026-05-09 22:46:29 +02:00
idea-md-editor.tsx Sprint: Verbeteren debug mode (#179) 2026-05-09 22:46:29 +02:00
idea-pbi-link-card.tsx Sprint: Verbeteren debug mode (#179) 2026-05-09 22:46:29 +02:00
idea-row-actions.tsx feat(ideas): upload-plan knop — short-circuit van Make-Plan AI-flow (#197) 2026-05-13 15:56:16 +02:00
idea-sync-tab.tsx Sprint: Verbeteren debug mode (#179) 2026-05-09 22:46:29 +02:00
idea-timeline.tsx Sprint: Verbeteren debug mode (#179) 2026-05-09 22:46:29 +02:00
user-chat-input.tsx Sprint: Verbeteren debug mode (#179) 2026-05-09 22:46:29 +02:00