admin and Claude Sonnet 4.6
10e71969dd
feat: AI RCA draft assistant in investigation form
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01FFDuBhMKvoWjrWT3ZnGmmr
2026-07-11 16:35:12 +08:00
admin and Claude Sonnet 4.6
547cc6e817
feat: pgvector similar-incident retrieval + SimilarIncidentsPanel
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01FFDuBhMKvoWjrWT3ZnGmmr
2026-07-11 16:31:02 +08:00
admin and Claude Sonnet 4.6
f10fa071f9
feat: AI triage suggestion — severity + DOSH flags pre-fill
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01FFDuBhMKvoWjrWT3ZnGmmr
2026-07-11 16:27:29 +08:00
admin
a5933d2cd9
fix: guard JSON parse and validate Claude tool output in quality-check route
2026-07-11 16:23:31 +08:00
admin and Claude Sonnet 4.6
3bec95aaf8
feat: AI report quality check before submission
...
Adds POST /api/incidents/ai/quality-check using Claude tool_use to score incident descriptions 1-10. Report form blocks submission when score < 6, shows amber feedback with suggestions, and offers a 'Submit anyway' override.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01FFDuBhMKvoWjrWT3ZnGmmr
2026-07-11 16:18:39 +08:00
admin
ab6299f963
feat: pgvector extension + incidents.embedding column + match_incidents RPC
2026-07-11 16:14:32 +08:00
admin and Claude Sonnet 4.6
ebaa98d9f4
feat: Claude client + Voyage AI embed helper
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01FFDuBhMKvoWjrWT3ZnGmmr
2026-07-11 16:10:26 +08:00
admin and Claude Opus 4.8
0e53d5c771
chore: mark Phase 2 Tasks 3-8 complete in progress ledger
...
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01FFDuBhMKvoWjrWT3ZnGmmr
2026-07-11 15:24:32 +08:00
admin and Claude Opus 4.8
54332d0297
feat: JKKP 6/7 PDF generation via pdf-lib, download from incident detail
...
Also excludes node_modules.nosync from vitest test discovery to fix pre-existing bleed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01FFDuBhMKvoWjrWT3ZnGmmr
2026-07-11 15:24:18 +08:00
admin and Claude Opus 4.8
75fa2605bf
feat: CAPA overdue escalation cron — 4 thresholds, once-per-threshold via notifications_log
...
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01FFDuBhMKvoWjrWT3ZnGmmr
2026-07-11 15:20:15 +08:00
admin and Claude Opus 4.8
804b1fbf33
feat: verification flow — HSE verify/reopen CAPA, auto-transition incident to verification
...
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01FFDuBhMKvoWjrWT3ZnGmmr
2026-07-11 15:18:17 +08:00
admin and Claude Opus 4.8
1780586185
feat: CAPA board — kanban/table view, create CAPA from incident, status tracking
...
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01FFDuBhMKvoWjrWT3ZnGmmr
2026-07-11 15:16:49 +08:00
admin and Claude Opus 4.8
63cb28f520
feat: investigation workspace — 5-Why/fishbone RCA, transitions triaged→investigating→capa_pending
...
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01FFDuBhMKvoWjrWT3ZnGmmr
2026-07-11 15:14:27 +08:00
admin and Claude Opus 4.8
e55c5284a7
feat: triage panel — severity + DOSH checklist, transitions reported→triaged
...
Also excludes node_modules.nosync from tsconfig to fix pre-existing TS type check bleed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01FFDuBhMKvoWjrWT3ZnGmmr
2026-07-11 15:12:35 +08:00
admin
8b00c72014
feat: DOSH obligation pure function with NADOPOD 2004 rules
2026-07-11 14:51:35 +08:00
admin
a718a2ddbb
fix: drop write_audit_log before recreate to handle existing function with different param names
2026-07-11 14:50:03 +08:00
admin
dbbb663611
feat: phase2 migration — triage fields, RCA structured data, write_audit_log RPC
2026-07-11 08:35:51 +08:00
admin and Claude Sonnet 4.6
1fe646d82d
fix: extract zone fields explicitly to avoid Supabase join type narrowing to never
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01AWxyMibCuGGtSQSqfajDQ7
2026-07-11 07:59:07 +08:00
admin and Claude Sonnet 4.6
33875395fb
fix: cast Supabase join types through unknown for TSC compatibility
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01AWxyMibCuGGtSQSqfajDQ7
2026-07-11 07:57:00 +08:00
admin and Claude Sonnet 4.6
7d3f8ec757
fix: export Incident types, replace any casts with typed unknown casts
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01AWxyMibCuGGtSQSqfajDQ7
2026-07-11 07:55:26 +08:00
admin and Claude Sonnet 4.6
ed14885253
fix: replace any casts with typed casts for Supabase join results
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01AWxyMibCuGGtSQSqfajDQ7
2026-07-11 07:52:53 +08:00
admin and Claude Sonnet 4.6
b281420810
feat: HSE dashboard with incident stats by type and site
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01AWxyMibCuGGtSQSqfajDQ7
2026-07-11 07:40:22 +08:00
admin and Claude Sonnet 4.6
713556631b
feat: incident detail page with evidence gallery for HSE and supervisor roles
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01AWxyMibCuGGtSQSqfajDQ7
2026-07-11 07:40:06 +08:00
admin and Claude Sonnet 4.6
2f2018f27a
feat: incident inbox pages with filter/search for HSE and supervisor roles
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01AWxyMibCuGGtSQSqfajDQ7
2026-07-11 07:39:43 +08:00
admin
2239b6e2df
feat: email notifications via Resend on new incident
2026-07-10 13:24:44 +08:00
admin
3f8da5bd91
feat: incident report form, API route, middleware shared-route + redirect
2026-07-10 13:19:45 +08:00
admin
a40a0f7c59
fix: signed URLs for private bucket, 10MB server-side limit, safe auth destructuring
2026-07-10 12:00:52 +08:00
admin
8a9758c8a6
feat: Phase 1 foundation - incident components, storage, and migrations
2026-07-10 10:48:56 +08:00
admin
28957f1e0f
fix: patch critical auth and RLS security findings from final review
2026-07-10 06:01:36 +08:00
admin and Claude Sonnet 4.6
152a6602d6
feat: add QR code generation script for seeded zones
...
Adds scripts/generate-qr.ts that generates one 400px PNG per warehouse
zone into public/qr/ (gitignored). Encodes /report?zone=<token> URL per
zone using NEXT_PUBLIC_APP_URL (default http://localhost:3000 ). Adds
public/qr/.gitkeep so the output directory is tracked. All 8 tests pass.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01AWxyMibCuGGtSQSqfajDQ7
2026-07-09 22:36:50 +08:00
admin and Claude Sonnet 4.6
c3ba543ebb
feat: add protected role dashboard placeholders
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01AWxyMibCuGGtSQSqfajDQ7
2026-07-09 22:32:29 +08:00
admin and Claude Sonnet 4.6
559859470b
feat: add login page and auth callback route
...
- Replace default Next.js home with role-aware root redirect
- Add email/password login form (client component, signInWithPassword)
- Add auth callback route for Supabase code exchange
- Login page at /login, callback at /api/auth/callback
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01AWxyMibCuGGtSQSqfajDQ7
2026-07-09 22:18:21 +08:00
admin and Claude Sonnet 4.6
05daf70177
feat: add database schema migrations and seed data
...
8 SQL migration files covering all 10 tables, RLS policies with
SECURITY DEFINER helpers, and seed data for SCW1 site + 3 zones.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01AWxyMibCuGGtSQSqfajDQ7
2026-07-09 21:44:24 +08:00
admin and Claude Sonnet 4.6
6939a21183
feat: add user role types and auth middleware
...
- lib/auth/roles.ts: UserRole union, ALL_ROLES, ROLE_HOME, getRoleHome, isValidRole (pure, no Supabase imports)
- __tests__/lib/auth/roles.test.ts: 8 TDD tests (written before implementation)
- middleware.ts: createServerClient with request.cookies pattern, unauthenticated redirect to /login, role-based redirect on / and /login
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01AWxyMibCuGGtSQSqfajDQ7
2026-07-09 21:39:32 +08:00
admin
9b5b21381f
chore: fix layout metadata and mark Task 1 complete in ledger
2026-07-09 21:37:23 +08:00
admin
f83686fcca
chore: scaffold Next.js 15 + Supabase clients + vitest
2026-07-09 21:33:59 +08:00