Commit graph

104 commits

Author SHA1 Message Date
Leivur Djurhuus
ffbc5a2e31 Add standalone output for Docker deployment, gitignore deploy dir
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 16:49:58 -05:00
Leivur Djurhuus
fa55dfc25f Add deployment infrastructure: health endpoint, Docker Compose fixes, tunnel
- Add /api/health endpoint checking DB, pgvector, org, templates,
  dev bypass safety, and AUTH_SECRET presence
- Fix Docker Compose app service: AUTH_SECRET, Entra ID env vars,
  AUTH_TRUST_HOST, app health check
- Add Cloudflare Tunnel service for zero-config HTTPS access
- Exclude health endpoint from auth middleware

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 14:54:15 -05:00
Leivur Djurhuus
0eaf809bc6 Add SSO bridge: Microsoft Entra ID auth with seed user linking
Configure Microsoft Entra ID as the sole SSO provider with
allowDangerousEmailAccountLinking to link SSO accounts to existing
seeded user records by email match. Add signIn event for automatic
org assignment by domain. Guard DEV_BYPASS_AUTH against production
use. Add branded pending page for authenticated users without org
membership. Remove Google provider for initial rollout simplicity.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 14:52:13 -05:00
Leivur Djurhuus
4149b2cf40 Switch from db push to versioned Prisma migrations
Replace 2 stale migration files with a single baseline migration
capturing the full 40+ model schema. The database was freshly reset
via clean-slate, making this the ideal time to establish migration
history. Dockerfile now runs prisma migrate deploy before app start.
Updated SETUP.md and ROADMAP.md to reference prisma migrate dev
instead of db push.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 14:45:36 -05:00
Leivur Djurhuus
29657aeefd Gitignore database backup files
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 14:40:53 -05:00
Leivur Djurhuus
aa20767035 Add clean slate toolkit solution documentation
Documents the purge-and-reseed pattern for transitioning from dev to
production data, including FK-safe deletion order, self-referential FK
handling, and backup/restore procedures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 14:39:37 -05:00
Leivur Djurhuus
dfa067e95f Database cleanup pre rollout 2026-04-06 14:35:56 -05:00
Leivur Djurhuus
d5c250277c markup bug fixes 2026-04-06 09:01:53 -05:00
Leivur Djurhuus
9a10cd8063 Markup bug fixes 2026-04-06 08:53:28 -05:00
Leivur Djurhuus
e3332c5dc5 Merge feature/video-review: timestamped video annotations with timeline markers 2026-04-03 14:58:22 -05:00
Leivur Djurhuus
16052aec9a compound ui fix 2026-04-03 14:39:18 -05:00
Leivur Djurhuus
c0652ae119 Review UI bug fixes 2026-04-03 14:27:13 -05:00
Leivur Djurhuus
3520e3fc9b Fix video review bugs: playback, annotations, coordinates, timeline markers
- Fix video-only revisions not showing (activeRevisionId fallback)
- Fix SVG coordinate system with viewBox for native→screen mapping
- Fix annotations visible at all times (timestampSeconds dropped in mapping)
- Fix timeline markers missing (use browser duration when DB has 0)
- Fix setState-during-render in duration tracking (ref+interval pattern)
- Fix click propagation toggling play during annotation drawing
- Fix concurrent attachment update race condition (Prisma transaction)
- Fix file handle leaks in uploads streaming route
- Add click-to-seek from feedback sidebar timestamp badges
- Use annotation drawing color for timeline markers
- Add solution documentation for video review bugs
- Add docs/solutions/ discoverability to CLAUDE.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 12:44:02 -05:00
Leivur Djurhuus
be146160ab Merge branch 'main' of https://github.com/packman86/hp_prod_tracker 2026-03-18 16:26:12 -05:00
Leivur Djurhuus
dd7db58c2f Update ROADMAP: lawn reference learnings, A7.3 in progress, infrastructure status
- Fix lawn reference URL to https://github.com/pingdotgg/lawn
- Document lawn architecture analysis and adopted/not-adopted patterns
- Mark A7.3 (Timestamped Video Annotations) as in progress
- Update infrastructure built section with video annotation layer details
- Mark Annotation schema fields as complete in data model status

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 15:00:34 -05:00
Leivur Djurhuus
95dbaef318 Add timestamped video annotations with timeline markers (A7.3)
- Add timestampSeconds and frameThumbnailUrl fields to Annotation model
- New VideoAnnotationLayer component: auto-pause on draw tool activation,
  SVG annotation overlay on paused video, time-filtered visibility,
  All/Timed toggle, timecode display in toolbar
- New VideoTimelineMarkers: orange=unresolved, green=resolved, clustered
  markers on scrub bar with click-to-seek and hover scale
- Thread timestampSeconds through validator, service, and API layers
- Feedback item cards show timestamp badges for video annotations
- VideoPlayer gains renderOverlay, timelineMarkers, pause/seek in state
- Fix "Processing" overlay shown when MP4 is available (FFmpeg fallback)
- Add revision polling when video status is "processing"
- Configure proxyClientMaxBodySize: 500mb for large video uploads
- Fix pre-existing Prisma JSON type error in upload-service.ts
- Update ROADMAP with lawn reference learnings and A7.3 progress

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 15:00:23 -05:00
Leivur R. Djurhuus
35c19f0cfd
Merge pull request #3 from packman86/feature/video-review
Feature/video review
2026-03-18 12:20:14 -05:00
Leivur Djurhuus
ec420f79d6 Fix dynamic pipeline stages: form submissions, unique constraint, and stage name resolution
Three related bugs fixed:

1. Form save buttons silently failing — valueAsNumber on empty number inputs
   produced NaN, which Zod rejected without visible errors on hidden tabs.
   Replaced with setValueAs that converts empty strings to undefined.

2. Unique constraint violation on deliverable stage creation — dynamic pipeline
   stages without matching global template slugs all fell back to
   globalTemplates[0], creating duplicate (deliverableId, templateId) pairs.
   Changed constraint from @@unique([deliverableId, templateId]) to
   @@unique([deliverableId, stageDefinitionId]).

3. Stage names showing wrong template — all UI components read
   stage.template.name exclusively, ignoring stageDefinition from the dynamic
   pipeline system. Updated 13 components, 6 services, and all relevant Prisma
   queries to prefer stageDefinition over template for display.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 12:19:00 -05:00
Leivur Djurhuus
77f69757e1 Graceful FFmpeg fallback for local dev without FFmpeg installed
Video upload now works without FFmpeg on PATH — metadata extraction
returns defaults, thumbnail is skipped, HLS transcoding is skipped,
and video is marked as ready with raw MP4 serving only. A one-time
warning is logged. Full HLS pipeline activates when FFmpeg is present
(Docker or local install).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:56:21 -05:00
Leivur Djurhuus
4d78655ce2 Add video player component with HLS streaming and review page integration (A7.2)
Custom video player with hls.js for instant HLS playback with MP4
fallback. Full keyboard-driven controls matching NLE conventions:
Space/K play/pause, J/L skip 5s, arrow/comma/period frame step,
[/] speed, F fullscreen, M mute. Timecode display in HH:MM:SS:FF.

Components:
- video-player.tsx: Core player with HLS/MP4 source loading
- video-controls.tsx: Play, seek, speed, volume, fullscreen, loop
- video-timeline.tsx: Scrub bar with hover time preview + marker slots
- video-frame-display.tsx: Timecode display (HH:MM:SS:FF)
- video-upload-zone.tsx: Drag-drop upload with progress bar (XHR)
- use-video-player.ts: Player state hook with keyboard shortcuts

Review page integration:
- Auto-detects video vs image attachments per revision
- Image/Video toggle when both exist on same revision
- Upload panel extended with video + reference video zones
- VideoPlayer renders in place of ImageViewer when in video mode

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:52:40 -05:00
Leivur Djurhuus
2e87a5ff4d Add video upload with HLS streaming infrastructure (A7.1)
FFmpeg in Docker for transcoding, thumbnail extraction, and metadata
parsing. Videos stored in /data/uploads (mounted volume), served via
streaming API route with Range headers and HLS segment caching. Upload
flow: stream-write MP4 → ffprobe metadata → thumbnail → async HLS
transcode → update revision status to ready.

New files:
- video-service.ts: FFmpeg/ffprobe wrapper (HLS, thumbnails, metadata)
- /api/uploads/[...path]: streaming file server with Range support
Modified:
- upload-service.ts: video handling, 500MB limit, async HLS pipeline
- upload route: accepts video/referenceVideo types
- Dockerfile: ffmpeg + /data/uploads directory
- docker-compose.yml: uploads_data volume

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:52:40 -05:00
Leivur Djurhuus
4e654b6fed Update ROADMAP: mark D1.1-D1.3 and A7.1-A7.2 as complete
Add progress checkboxes to A7 sub-stages. D1 automation engine
(all 3 phases) and A7.1 (video upload + HLS) + A7.2 (video player)
are done. Next: A7.3 (timestamped video annotations).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:52:34 -05:00
Leivur Djurhuus
f579dd2b43 Update A7.1 roadmap: HLS streaming architecture for video review
Revised A7.1 spec based on lawn-video-reviewer learnings — HLS-first
streaming for instant playback and smooth seeking instead of raw MP4
serving. Key changes: async HLS transcoding on upload, mounted volume
storage (/data/uploads), streaming API route with Range headers, and
processing status tracking on revision attachments.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:32:44 -05:00
Leivur Djurhuus
72d09b95ce automation rules added to settings 2026-03-17 23:07:44 -05:00
Leivur R. Djurhuus
082b91b09e
Merge pull request #2 from packman86/feature/visual-review-tool
Feature/visual review tool
2026-03-17 22:25:59 -05:00
Leivur Djurhuus
c38875d8cd eyedropper fixes. 2026-03-17 22:21:10 -05:00
Leivur Djurhuus
36cbd997f7 eyedropper tweaks 2026-03-17 22:21:10 -05:00
Leivur Djurhuus
487671c949 Visual revew eyedropper and move tool tweaks 2026-03-17 22:21:10 -05:00
Leivur Djurhuus
cf7193468e roadmap update with video tool. Inspired by lawn 2026-03-17 22:21:10 -05:00
Leivur R. Djurhuus
bd69208a84 Eyedropper comparison added for visual review tool. Needs to be tested and finessed on workstation 2026-03-17 22:20:52 -05:00
Leivur Djurhuus
43051792a3 Visual review tool fixes. 2026-03-17 22:20:08 -05:00
Leivur R. Djurhuus
6f5cbc2f1f feat: add review session components and hooks
- Implemented SessionPresenter and SessionSummary components for managing review sessions.
- Created AlertDialog component for modal dialogs.
- Developed hooks for managing review sessions, including fetching, creating, updating, and deleting sessions.
- Added service functions for review session operations in the backend.
- Introduced validation schemas for review session inputs using Zod.
2026-03-17 22:20:01 -05:00
Leivur R. Djurhuus
db82eb4fed refactor: simplify feedback from 4-level severity to action item / info callout
Replace FeedbackSeverity enum (Critical/Major/Minor/Suggestion) with a
simple isActionItem boolean. Annotations default to action items (things
the artist must fix). Any item can be toggled to an info callout (context
that doesn't need action). Progress bar and carry-forward only count
action items. Screenshot paste limited to 5MB with user notification.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 22:19:31 -05:00
Leivur R. Djurhuus
05061baf26 feat: add revision history timeline (A4) and feedback checklist (A5)
A4 — Revision History Timeline:
- Collapsible right panel with vertical timeline of all revision rounds
- Each node shows thumbnail, status badge, timestamp, annotation count,
  comment summary, and decision record
- Keyboard navigation (up/down arrows), auto-scroll to active round
- Filter by rounds with feedback, "Compare from here" action
- Enriched revision data hook aggregating annotations + comments

A5 — Feedback Checklist:
- FeedbackItem model with severity (Critical/Major/Minor/Suggestion),
  status flow (Open → In Progress → Resolved → Verified), and
  carry-forward between revision rounds
- Auto-creation from annotations (non-blocking, post-transaction)
- Checklist panel in review page with progress bar, severity grouping,
  resolve-with-note flow, verify/reopen actions
- FeedbackIndicator badge on stage cards in deliverable detail page
- CRUD API routes + TanStack Query hooks
- Prisma schema additions (requires db push)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 22:19:11 -05:00
Leivur R. Djurhuus
eba5e30c98 feat: add version comparison (A2) and annotation system (A3)
A2 — Version Comparison:
- 4 comparison modes: side-by-side, A-B wipe slider, overlay with
  opacity, toggle with crossfade
- Synced zoom/pan across all modes
- Revision selectors for left/right image
- Keyboard shortcuts: 1-4 switch modes, Escape exits

A3 — Annotations:
- SVG overlay with 7 annotation types: rectangle, ellipse, arrow,
  freehand, text, pin, screenshot paste (Cmd+V)
- All annotations anchored to image coordinates (accurate at any zoom)
- Annotation model added to Prisma schema (requires db push)
- CRUD API routes at /api/revisions/[id]/annotations
- Annotations linked to comments (transactional create)
- Screenshot callouts: draggable, resizable with corner handles
- Undo/redo stack, color picker, visibility toggle
- Floating toolbar with backdrop blur

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 22:17:44 -05:00
Leivur R. Djurhuus
1fa8803bfc feat: add visual review tool with image viewer and upload infrastructure (A1)
Canvas-based image viewer with zoom-to-cursor, pan, retina support, and
minimap navigation. Image upload API with PNG alpha compositing (sharp)
for CG renders with transparent backgrounds, TIFF-to-PNG conversion,
and auto-generated thumbnails. Review page accessible from stage cards
on the deliverable detail page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 22:16:05 -05:00
Leivur Djurhuus
0ca56a5201 Dynamic Pipeline Builder pretty functional now. 2026-03-17 22:09:42 -05:00
Leivur Djurhuus
4434e24569 pipeline template fixed and now visible in settings 2026-03-17 21:19:43 -05:00
Leivur R. Djurhuus
2c75317e9f docs: update roadmap with Phase 2 (Dynamic Pipelines) completion status
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 22:46:41 -05:00
Leivur R. Djurhuus
40028b7ced feat: add pipeline stage resolver and organization access control
- Implemented `stage-resolver.ts` to unify old and new pipeline stage definitions.
- Created `org-scope.ts` for organization access verification and scoping queries.
- Added role-based permissions management in `permissions.ts` and `rbac-service.ts`.
- Introduced invitation management in `invitation-service.ts` with validation schemas.
- Developed custom field and notification rule services with respective validators.
- Established pipeline template CRUD operations in `pipeline-template-service.ts`.
- Added Zustand store for managing pipeline builder state in `pipeline-builder-store.ts`.
2026-03-14 22:43:43 -05:00
Leivur R. Djurhuus
9d0677419d feat: update roadmap with workload utilization heatmap and calendar view enhancements 2026-03-14 13:20:58 -05:00
Leivur R. Djurhuus
b37c7d0bf4 Refactor code structure for improved readability and maintainability 2026-03-14 13:17:19 -05:00
Leivur R. Djurhuus
fb72ef6dc4 feat: implement reference image comparison tools and upload functionality 2026-03-14 12:58:57 -05:00
Leivur Djurhuus
bac6d4c107 feat: add heatmap feature with toggle and bar visualization in calendar 2026-03-13 18:28:26 -05:00
Leivur Djurhuus
d01e663ecf feat: add weekly report API and components
- Implemented GET endpoint for weekly report data retrieval.
- Created components for displaying various sections of the weekly report:
  - At-Risk Projects
  - Completed Deliverables
  - Deadline Compliance
  - KPI Strip
  - Pipeline Snapshot
  - Upcoming Deliverables
  - Report Header
- Added a custom hook for fetching weekly report data using React Query.
- Developed service functions to generate weekly report data from the database.
- Enhanced UI with responsive design and improved accessibility features.
2026-03-13 16:39:23 -05:00
Leivur Djurhuus
5b8c09de9e feat: implement stage date override and scheduling features
- Add PATCH endpoint to handle date overrides and clear manual overrides in the stage API.
- Introduce hooks for overriding stage dates and clearing overrides.
- Enhance the stage dependency engine to allow reopening from terminal states.
- Update stage status transitions to support reopening stages.
- Implement scheduling logic to auto-schedule stages based on due dates, considering manual overrides.
- Create a new component for managing stage dates with a popover interface.
- Add database migration for new fields related to manual scheduling and schedule conflicts.
- Document the executive overview and producer guide for the HP CG Production Tracker.
2026-03-12 23:13:29 -05:00
Leivur Djurhuus
336575b39f refactor: remove unused evaluation scripts and dependencies from package.json 2026-03-12 22:02:35 -05:00
Leivur Djurhuus
4f71486742 chore: remove Promptfoo integration plan and related configuration files 2026-03-12 22:00:25 -05:00
Leivur Djurhuus
550fa8659d chore: remove obsolete AI Agents and OpenViking integration plans and related subprojects 2026-03-12 21:58:24 -05:00
Leivur Djurhuus
cf46a8ecd3 feat: add db:seed-team script to package.json and remove unused producer entries from seed.ts 2026-03-12 21:45:59 -05:00