release: promote EPIC-13 Construction Diary to main#820
Closed
steilerDev wants to merge 17 commits intomainfrom
Closed
release: promote EPIC-13 Construction Diary to main#820steilerDev wants to merge 17 commits intomainfrom
steilerDev wants to merge 17 commits intomainfrom
Conversation
* chore: trigger CI for promotion PR #740 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(diary): add EPIC-13 construction diary schema, types, and ADR - Add migration 0024_diary_entries.sql with diary_entries table supporting 5 manual + 6 automatic entry types, JSON metadata column, polymorphic source entity references, and timeline-optimized indexes - Add shared TypeScript types for diary entries, metadata shapes per entry type, and request/response interfaces - Add ADR-020: Construction Diary Architecture documenting JSON metadata approach, fire-and-forget auto events, inline signature storage, and photo infrastructure reuse - Update wiki: Schema.md, API-Contract.md, Architecture.md, ADR-Index.md Fixes #446 Co-Authored-By: Claude product-architect (Opus 4.6) <noreply@anthropic.com> --------- Co-authored-by: Claude product-architect (Opus 4.6) <noreply@anthropic.com>
* feat(diary): add diary entry data model and CRUD API Implement the construction diary (Bautagebuch) backend foundation: - Drizzle schema for diary_entries table with 11 entry types - CRUD service with per-type metadata validation - 5 Fastify routes at /api/diary-entries (list, create, get, update, delete) - Pagination (default 50, max 100), filtering, full-text search - Automatic entry immutability enforcement - Photo cascade deletion on entry delete - Unit and integration tests with 95%+ coverage target Fixes #803 Co-Authored-By: Claude backend-developer (Haiku) <noreply@anthropic.com> Co-Authored-By: Claude qa-integration-tester (Sonnet) <noreply@anthropic.com> Co-Authored-By: Claude dev-team-lead (Sonnet) <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: update review metrics for PR #812 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(diary): fix pagination test assertion — oldest entry on page 2 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude product-architect (Opus 4.6) <noreply@anthropic.com>
* feat(diary): add diary timeline view and detail page Implement the Construction Diary UI with: - Diary list page at /diary with chronological timeline grouped by date - Detail page at /diary/:id with full type-specific metadata rendering - 8 new diary components (badges, cards, filters, metadata summary) - API client for all diary endpoints - Design tokens for entry types, outcomes, severity levels - Dark mode support, responsive layout, accessibility (ARIA) - Sidebar navigation with "Diary" link - E2E page objects and test specs - Unit tests (147 tests across 9 files) Fixes #804 Co-Authored-By: Claude frontend-developer (Haiku) <noreply@anthropic.com> Co-Authored-By: Claude qa-integration-tester (Sonnet) <noreply@anthropic.com> Co-Authored-By: Claude e2e-test-engineer (Sonnet) <noreply@anthropic.com> Co-Authored-By: Claude dev-team-lead (Sonnet) <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(diary): cast changeSummary to string for ReactNode compatibility Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(diary): fix failing tests — sidebar, detail page, entry card - Update Sidebar.test.tsx to expect 6 nav links (added Diary) - Fix DiaryEntryDetailPage back button aria-label - Fix DiaryEntryCard.test.tsx module import Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(diary): remove CSS module mocks causing useContext null errors Remove jest.unstable_mockModule CSS mock blocks from all diary test files. The root jest config already handles CSS modules via moduleNameMapper with identity-obj-proxy. Double-mocking caused React to load as a separate instance, breaking context APIs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(diary): fix dual React instance in page tests Import page components once and avoid jest.resetModules() which causes React to be loaded as a separate instance from react-router-dom. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(diary): remove stale .default reference in DiaryPage test Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(e2e): use getByLabel for diary detail back button The button uses aria-label, not title attribute. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude product-architect (Opus 4.6) <noreply@anthropic.com>
* feat(diary): add automatic system event logging to diary Implement fire-and-forget diary auto-events triggered by state changes: - Work item status changes → work_item_status entries - Invoice status changes → invoice_status entries - Milestone delays → milestone_delay entries - Budget overspend → budget_breach entries - Auto-reschedule completion → auto_reschedule entries - Subsidy status changes → subsidy_status entries Also: - Add DIARY_AUTO_EVENTS env var (default true) for global toggle - Allow deletion of automatic entries (edit still blocked, 403) - New diaryAutoEventService with tryCreateDiaryEntry wrapper - Hooks in workItemService, invoiceService, schedulingEngine, subsidyProgramService - Unit tests for all event functions and fire-and-forget behavior Fixes #808 Co-Authored-By: Claude backend-developer (Haiku) <noreply@anthropic.com> Co-Authored-By: Claude qa-integration-tester (Sonnet) <noreply@anthropic.com> Co-Authored-By: Claude dev-team-lead (Sonnet) <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(diary): use milestone.title instead of milestone.name Milestones have a 'title' property, not 'name'. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(diary): fix config tests, enrich event body text, remove dead import - Add diaryAutoEvents to all config.test.ts toEqual assertions - Enrich body text: include work item title, status transitions - Remove unused onAutoRescheduleCompleted import from schedulingEngine - Update diaryAutoEventService test assertions to match enriched text Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(diary): fix ESM mock issue in fire-and-forget test Use closed DB to trigger errors instead of jest.spyOn on ESM module (which throws "Cannot assign to read only property"). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude product-architect (Opus 4.6) <noreply@anthropic.com>
Implement diary entry forms with type-specific metadata fields: - Two-step create flow: type selector (5 types) → form → submit - Edit page with pre-populated form and delete confirmation modal - DiaryEntryForm component with per-type metadata sections - Delete confirmation modal on detail and edit pages - Edit/Delete buttons on detail page (manual entries only) - Routes: /diary/new, /diary/:id/edit - Unit tests (130+ tests across 4 files) - E2E page objects and test specs (18 tests) Fixes #805 Co-authored-by: Claude product-architect (Opus 4.6) <noreply@anthropic.com>
* feat(diary): integrate photo attachments on diary entries Wire existing photo infrastructure into diary entry pages: - Detail page: PhotoGrid with PhotoViewer lightbox, empty state with "Add photos" link, photo count in section heading - Edit page: PhotoUpload + PhotoGrid below form fields, drag-to-reorder, delete via PhotoCard action menu - Create page: info note "Save first, then add photos" - Photos use entity_type='diary_entry' via existing usePhotos hook Fixes #806 Co-Authored-By: Claude frontend-developer (Haiku) <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(diary): mock usePhotos in detail page test Prevents real API calls to /api/photos during unit tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(diary): update detail page photo tests for new photo section Replace photoCount indicator tests with photo section heading and empty state tests matching the new usePhotos-driven UI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(diary): use getByRole for photo heading to avoid multiple matches Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude product-architect (Opus 4.6) <noreply@anthropic.com>
…es (#817) * feat(diary): add signature capture for daily log and site visit entries Implement canvas-based signature capture component: - SignatureCapture: draw, clear, accept with 500KB size limit - SignatureDisplay: read-only display with signer name and date - Integrated into daily_log and site_visit form sections - Signatures stored as base64 PNG data URLs in metadata - Pre-population on edit, display on detail page - Responsive 3:1 aspect ratio, touch/stylus/mouse support Fixes #807 Co-Authored-By: Claude frontend-developer (Haiku) <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(diary): remove invalid disabled prop from canvas element Canvas elements don't support the disabled HTML attribute. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude product-architect (Opus 4.6) <noreply@anthropic.com>
* feat(diary): add PDF export and print stylesheet Backend: - GET /api/diary-entries/export endpoint with date/type filtering - pdfkit-based PDF generation with cover page, TOC, entries, photos - Signature embedding from base64 data URLs - 365-day range limit, EXPORT_EMPTY error for no matches Frontend: - Export dialog with date range, type checkboxes, photo/auto toggles - Print button on detail page triggering @media print stylesheet - Export button on diary list page - Print CSS hiding navigation chrome Fixes #809 Co-Authored-By: Claude backend-developer (Haiku) <noreply@anthropic.com> Co-Authored-By: Claude frontend-developer (Haiku) <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(diary): update package-lock.json for pdfkit dependency Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(diary): fix TS errors in diary export service - Add missing DiaryEntrySummary import - Handle nullable toc.title - Handle nullable photo width/height Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(diary): add exportDiaryPdf to DiaryPage test mock Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude product-architect (Opus 4.6) <noreply@anthropic.com>
- Mobile breakpoints for all diary CSS modules (< 768px) - 44px minimum touch targets on mobile buttons - Single-column form/grid layouts on mobile - ARIA labels on type badges, severity/outcome badges, entry cards - role="feed" on diary entries container - inputMode="numeric" on number inputs for mobile keyboards - Escape key clears search input - Reduced motion: disable transitions for prefers-reduced-motion - touch-action: none on signature canvas - All colors use design tokens (dark mode compatible) Fixes #810 Co-authored-by: Claude product-architect (Opus 4.6) <noreply@anthropic.com>
Owner
Author
Detailed UAT ValidationStory #803: Diary Entry Data Model and CRUD API
Story #804: Diary Timeline View
Story #805: Entry Creation Forms
Story #806: Photo Attachments
Story #807: Signature Capture
Story #808: Automatic Events
Story #809: PDF Export
Story #810: Responsive & Accessibility
|
Contributor
|
🎉 This PR is included in version 1.16.0-beta.9 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
* fix(e2e): fix failing diary E2E tests for promotion - Remove temperature assertion (DiaryMetadataSummary doesn't render it) - Fix validation test: fill body with space to bypass HTML5 required - Fix mobile edit test: scroll submit button into view before clicking Co-Authored-By: Claude e2e-test-engineer (Sonnet) <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(diary): fix E2E tests and PATCH→PUT client bug E2E fixes: - Fix mock response shape: data→items in diary-list tests - Fix page.route() URL patterns: add **/ prefix for full URL matching - Fix edit POM save() to check PUT instead of PATCH Client bug fix: - diaryApi.ts: use put() instead of patch() for updateDiaryEntry (server exposes PUT /api/diary-entries/:id, not PATCH) Fixes #823 Co-Authored-By: Claude e2e-test-engineer (Sonnet) <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(e2e): fix tablet/mobile diary sidebar navigation and search timeouts - Open sidebar via hamburger on mobile/tablet before clicking Diary link - Remove hardcoded 10s timeout on waitForResponse in search/clearSearch - Scope diary nav link to sidebar element for exact matching Co-Authored-By: Claude e2e-test-engineer (Sonnet) <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(diary): update diaryApi test to expect PUT instead of PATCH Matches the PATCH→PUT fix in diaryApi.ts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(e2e): open mobile filter panel before search in diary list tests DiaryFilterBar hides the search input on mobile (< 768px) behind a toggle button. Added openFiltersIfCollapsed() to DiaryPage POM that checks for and clicks the toggle on mobile viewports before searching. Co-Authored-By: Claude e2e-test-engineer (Sonnet) <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude product-architect (Opus 4.6) <noreply@anthropic.com>
Owner
Author
|
Closing stale promotion PR. Creating a fresh one with E2E fixes included. |
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.
Epic Summary
EPIC-13: Construction Diary (Bautagebuch) — A project-level construction diary combining automatic system events and manual user entries with photos, signatures, and PDF export.
Stories Completed (8/8)
Change Inventory
Backend (
server/,shared/)0024_diary_entries.sql— diary entries table with 11 entry typesdiaryService.ts— CRUD with per-type metadata validationdiaryAutoEventService.ts— fire-and-forget automatic event loggingdiaryExportService.ts— pdfkit-based PDF generation/api/diary-entries(list, create, get, update, delete, export)DIARY_AUTO_EVENTSenv var for auto-event toggleFrontend (
client/)components/diary/diaryApi.tswith all endpoint functionsprint.css)E2E Tests (
e2e/)Manual Validation Checklist
Testing
docker pull steilerdev/cornerstone:beta