Commit graph

41 commits

Author SHA1 Message Date
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 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 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
1bbc9fd195 feat(calendar): implement calendar view with event filtering and detail display
- Added CalendarDayDetail component for displaying detailed event information for a selected day.
- Created CalendarEventPill component to represent individual events in a compact format.
- Introduced CalendarFilters component to filter events by project, stage type, and status.
- Developed CalendarGrid component to render the calendar layout and manage event interactions.
- Implemented CalendarView component to manage the overall calendar state and navigation.
- Added useCalendar hook to fetch calendar events based on specified filters.
- Created calendar-service to handle fetching events from the database with filtering capabilities.
- Updated data model to include necessary fields for calendar events and filters.
- Added system prompt and tools for AI assistant to manage calendar-related tasks.
2026-03-12 21:20:11 -05:00
Leivur Djurhuus
aa0bcc91d9 feat: add relevanceScore to EntityCard and update entity extraction logic 2026-03-12 17:27:11 -05:00
Leivur Djurhuus
438b330b97 feat: add entity card extraction and display in chat panel
- Implemented entity card extraction from tool results in the chat API.
- Added new EntityCard interface to define the structure of entity cards.
- Enhanced chat panel to display navigable entity cards for projects, deliverables, and users.
- Introduced status color helper for better visual representation of entity statuses.
- Updated chat message structure to include extracted entities.
- Improved chat formatting guidelines to avoid markdown tables and utilize bullet points.
- Added Tailwind Typography plugin for improved text styling in the application.
2026-03-12 16:36:44 -05:00
Leivur Djurhuus
78240d6d3f refactor: Remove Ollama LLM fallback from chat provider
Ollama can't use tools so it was never useful as a chat fallback — it
just caused confusing "both providers unavailable" errors. The chat
now uses Claude exclusively with clear error messages on failure.

- Remove chatWithOllama(), checkOllamaHealth()
- Simplify chat() to call Claude directly
- Remove Ollama UI indicators and "Limited mode" warning
- Clean up provider types (remove "ollama" union member)

Note: Ollama is still used for embedding generation (nomic-embed-text)
via the embedding service — only the LLM chat fallback is removed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 15:32:11 -05:00
Leivur Djurhuus
7c70c3aba3 feat: Use pgvector semantic search in chat search_entities tool
Replace word-level text matching with pgvector cosine similarity search
for projects and deliverables. The search query is embedded via Ollama's
nomic-embed-text model and compared against stored 768-dim vectors, so
natural language queries like "manx beetroot mauve" match "[BPS] ManxR2 -
Beetroot Mauve" through semantic proximity.

- Primary: pgvector cosine similarity (projects + deliverables)
- Fallback: word-level text search when Ollama is unavailable
- Users: text search only (no embedding column on users table)
- Results filtered by relevance score > 0.3, sorted by similarity
- Stage details fetched for top deliverable matches

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 15:25:41 -05:00
Leivur Djurhuus
92cb9567de feat: Overhaul AI chat with SSE streaming, fuzzy search, and clickable suggestions
- Add SSE streaming to chat API so users see real-time tool call progress
  instead of waiting for the full response
- Enrich system prompt with full data model, pipeline stages, enums, and
  domain knowledge so Claude makes fewer errors
- Implement word-level fuzzy search in search_entities — splits queries into
  individual terms and scores results by match count, so "manx beetroot mauve"
  finds "[BPS] ManxR2 - Beetroot Mauve"
- Add clickable entity suggestion chips when search returns multiple candidates,
  eliminating the need to retype exact names
- Move page context from fake conversation turns into the system prompt param
- Preserve structured content blocks (tool_use/tool_result) in client-side
  message history for proper multi-turn context
- Remove dryRun confirmation pattern — mutations execute directly
- Increase Claude API timeout from 30s to 60s and max tool iterations from 5 to 10
- Show Ollama fallback warning ("Limited mode — no tool access") in UI

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 15:21:45 -05:00
Leivur Djurhuus
8c95d4befe feat: Enhance chat message handling to support structured content blocks for tool interactions 2026-03-12 14:49:50 -05:00
Leivur Djurhuus
94c43af318 feat: Enhance chat functionality with project and deliverable context integration 2026-03-12 14:44:06 -05:00
Leivur Djurhuus
3a0bd22d0d feat: Implement Assign Artist functionality with user assignment management 2026-03-12 14:34:47 -05:00
Leivur Djurhuus
f653b65df4 feat: Add bulk import functionality for Master CG Tracker Excel files 2026-03-12 13:55:14 -05:00
Leivur Djurhuus
e5b398d7da feat: Implement automation event bus and rule engine
- Add event bus for dispatching automation events with handlers.
- Create rule engine to evaluate events against defined triggers.
- Introduce chat provider to interface with Claude API and Ollama fallback.
- Define tool schemas for Claude-compatible operations.
- Implement tool executor to map tool calls to service layer functions.
- Develop automation service for CRUD operations on rules and event handling.
2026-03-12 11:20:21 -05:00
Leivur Djurhuus
172533b6d7 feat: update LLM model version and increase context size for semantic search 2026-03-11 16:16:10 -05:00
Leivur Djurhuus
13066502cf feat: enhance Smart Search Panel with formatted text rendering and improve semantic search response structure 2026-03-06 19:34:59 -06:00
Leivur Djurhuus
9d5acf1683 feat: add Smart Search Panel with semantic search capabilities
- Implemented Smart Search Panel component for enhanced project and deliverable search functionality.
- Introduced useSemanticSearch and useOllamaHealth hooks for managing search queries and AI availability.
- Developed embedding-service to generate and store vector embeddings for projects and deliverables.
- Created semantic-search-service to handle vector search, structural query detection, and LLM summarization.
- Added support for hybrid search combining structural filters and semantic queries.
- Integrated UI components for displaying search results and user interactions.
2026-03-06 16:13:36 -06:00
Leivur Djurhuus
c8f88c6ab8 feat(workload): add capacity management components and hooks
- Implemented `CapacityCell`, `CapacityDetailPopover`, and `CapacityGrid` components for displaying user workload and capacity.
- Created `UtilizationHeatmap` component to visualize team member utilization over weeks.
- Added hooks for managing skills (`useSkills`, `useCreateSkill`, `useDeleteSkill`, `useUserSkills`, `useSetUserSkill`, `useRemoveUserSkill`, `useStageSuggestions`) and workload (`useWorkload`, `useUpdateCapacity`).
- Developed services for skill management (`skill-service.ts`) and workload management (`workload-service.ts`) to interact with the database.
- Introduced logic for calculating user workload, including active assignments and capacity overload detection.
- Enhanced UI with tooltips and badges for better user experience.
2026-03-03 15:17:45 -06:00
Leivur Djurhuus
edcf31672e feat: enhance UI components and add assignment feature to deliverables
- Updated CommandItem component to use rounded-lg for better aesthetics.
- Modified DialogOverlay and DialogContent to improve backdrop and border radius.
- Changed DropdownMenuItem, DropdownMenuCheckboxItem, and DropdownMenuRadioItem to use rounded-md for consistency.
- Enhanced SelectItem with rounded-md for a more modern look.
- Updated SheetOverlay to improve backdrop styling.
- Adjusted Toaster component border radius for a more refined appearance.
- Enhanced Table component with rounded-xl and shadow for better visual hierarchy.
- Added assignment display feature in DeliverableTable and KanbanBoard components, showing assigned users with badges.
- Updated deliverable service to include assignments in the data fetching process.
- Created a new seed script for tracker data to facilitate testing and development.
2026-03-02 13:46:55 -06:00
Leivur Djurhuus
a47c6791d9 feat: add validators for PowerPoint and Word documents, and Excel recalculation script
- Implement PPTXSchemaValidator for validating PowerPoint presentation XML files against XSD schemas.
- Create RedliningValidator to check tracked changes in Word documents, ensuring proper author tracking.
- Introduce recalc.py script to recalculate Excel formulas using LibreOffice, including error handling for Excel-specific errors.
- Add UI components for collapsible sections and tabs using Radix UI.
- Implement stage validation schema using Zod for managing project stages.
2026-03-02 12:23:09 -06:00
Leivur R. Djurhuus
6422428333 Add dev bypass for authentication checks in middleware and session retrieval 2026-02-28 22:23:14 -06:00
Leivur R. Djurhuus
f99ddde503 Add deadline tracking with approaching/overdue detection
Deadline service checks deliverables and stages for approaching
(within 3 days) and overdue deadlines. API endpoint for fetching
deadlines and optionally generating notifications for producers.
Visual overdue indicators (red text + warning icon) on stage cards.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:47:42 -06:00
Leivur R. Djurhuus
3b8bb1d5d6 Add Excel import and export for deliverables
Export: multi-sheet styled workbook (Overview + Pipeline detail)
with color-coded status cells via ExcelJS.
Import: upload Excel with preview/validation step, then commit.
Supports Name, Priority, Due Date, Notes columns with flexible
column name matching. Import dialog on project detail page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:46:23 -06:00
Leivur R. Djurhuus
4b6576233e Add dashboard with KPI cards, charts, and overdue alerts
Dashboard service aggregates project/deliverable/stage stats.
KPI cards for active projects, deliverables, overdue count, and
pipeline completion rate. Recharts pie chart for status distribution,
stacked bar chart for stage completion by template type.
Overdue deliverables table and recent completions feed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:43:55 -06:00
Leivur R. Djurhuus
4f841c73b7 Add notification system with topbar dropdown and full page
Service with auto-notification helpers for assignments, status changes,
revisions, and comments. Topbar bell shows real unread count with
popover dropdown. Full notifications page with mark-read actions.
Polls unread count every 30 seconds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:41:56 -06:00
Leivur R. Djurhuus
2128e79c1a Add revision tracking and threaded comments for pipeline stages
Services, API routes, hooks, and UI components for:
- Revision rounds with submit/review/approve/request-changes flow
- Threaded comments with replies on each stage
- Stage detail sheet accessible from deliverable detail page

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:40:12 -06:00
Leivur R. Djurhuus
740957d443 Add artist assignment system and My Work page
- Assignment service: assign/unassign users to stages, get user's work
- API routes: POST/DELETE /api/stages/:id/assignments, GET /api/my-work
- My Work page with assignments grouped by project
- StageStatusBadge component with semantic status colors
- Zod validator for assignment input

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:27:21 -06:00
Leivur R. Djurhuus
1b8392b962 Add user management: API routes, service layer, role-based access
- User service: listUsers, updateUserRole, getUserById
- API routes: GET /api/users, PATCH /api/users/:id
- Role-based access control (only ADMIN/PRODUCER can change roles)
- Completes Phase 1 of the implementation plan

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:15:46 -06:00
Leivur R. Djurhuus
9f97cfe218 Add Deliverable CRUD with pipeline dependency engine
- Deliverable service auto-creates 10 pipeline stages on creation
- Stages start as BLOCKED/NOT_STARTED based on dependency rules
- Dependency engine: canStageStart() validates all prerequisites
- Stage machine: enforces valid status transitions
- Critical gate approval auto-unblocks downstream stages
- API routes for deliverables (nested under projects) and stages
- Zod validators for deliverable create/update

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:14:32 -06:00
Leivur R. Djurhuus
2859a50761 Add Project CRUD: API routes, service layer, form, and list page
- Zod validation schemas for create/update project
- Service layer with listProjects, getProject, createProject,
  updateProject, deleteProject
- API routes: GET/POST /api/projects, GET/PATCH/DELETE /api/projects/:id
- TanStack Query hooks for all project operations
- Project list page with card grid, status/priority badges
- Project create dialog with form validation
- QueryProvider + API utility helpers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:11:46 -06:00
Leivur R. Djurhuus
b4ae910cf5 Add Auth.js v5 with Google + Microsoft Entra ID SSO
- NextAuth config with PrismaAdapter, database sessions
- Session callback enriches with role + organizationId
- Login page with Google and Microsoft sign-in buttons
- Cookie-based middleware for auth protection (Edge-compatible)
- Type augmentation for session user fields

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:07:38 -06:00
Leivur R. Djurhuus
c13dc9cacc Add Prisma 7 schema with full data model and seed script
- 12 models: Organization, User, Account, Session, Project,
  Deliverable, DeliverableStage, StageAssignment, Revision,
  Comment, Notification, plus pipeline templates/dependencies
- Prisma 7 adapter pattern with @prisma/adapter-pg
- Seed script with 10 pipeline stages and dependency rules
- Environment config (.env.example)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:06:17 -06:00
Leivur R. Djurhuus
856faa896e Initial scaffold: Next.js 16, TypeScript, Tailwind CSS 4, ESLint, Prettier
- App Router with src/ directory structure
- Design system CSS variables (Oliver/Brandtech palette, light + dark mode)
- Montserrat + Inter + JetBrains Mono font configuration
- next-themes provider for theme toggle
- Full folder structure per implementation plan
- nvm configured for Node 22

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 20:58:48 -06:00