feat(report): add template system with CRUD API and 3-mode generation UI (#618)#621
Merged
feat(report): add template system with CRUD API and 3-mode generation UI (#618)#621
Conversation
…tion UI - Add report_templates table (migration v25) with CRUD operations in template-db.ts - Add /api/templates GET/POST and /api/templates/[id] PUT/DELETE endpoints with validation (name max 100 chars, content max 1000 chars, 5 template limit) - Add TemplateTab component for template management in Review page - Add useReportGeneration hook for 3-mode generation (none/template/custom) - Update ReportTab with generation mode radio buttons and template selector - Update Review page to 3-tab layout (Review/Report/Template) - Add unit tests for template-db, API endpoints, ReportTab component - Update existing tests for schema v25, 3-tab layout, report_templates table Resolves #618 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tion - Extract serializeTemplate, UUID_V4_REGEX, and validation functions into src/lib/api/template-helpers.ts (DRY) - Remove duplicate TemplateData interface from TemplateTab.tsx, import from useReportGeneration instead - Remove verbose JSDoc comments that repeat function signatures - Simplify inline validation in API routes to use shared validators Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Apr 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
report_templatesテーブル追加(マイグレーション v25)template-db.tsでテンプレートCRUD実装(最大5件制限)/api/templatesおよび/api/templates/[id]CRUD API追加Closes #618
Test plan
npm run lint— PASSnpx tsc --noEmit— PASSnpm run test:unit— 6095 passed (37 new tests)npm run build— PASS🤖 Generated with Claude Code