admin and Claude Sonnet 5.5
29bdb39506
docs: spec for zone picker, CAPA completion proof, test-data cleanup
...
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com >
2026-10-14 11:02:12 +08:00
admin and Claude Haiku 4.5
48b77458dd
test(capa): fix the fetch mock typing in the create form test
...
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-10-01 11:37:11 +08:00
admin and Claude Haiku 4.5
04437926c2
feat(capa): replace the CAPA board with a workspace (TableCard list and status board) with search, filters and saved views
...
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-10-01 10:47:04 +08:00
admin and Claude Haiku 4.5
9f0331d190
docs: add IMS Admin refresh slice 2 (CAPA) implementation plan
...
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-10-01 10:20:01 +08:00
admin and Claude Haiku 4.5
a64b951922
feat(design): migrate the Incidents list to TableCard with server-side views, sort, filters and paging
...
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-10-01 09:33:44 +08:00
admin and Claude Haiku 4.5
2a5b9332c7
feat(design): add IMS Admin primitives (Button, StatusTag, Checkbox, FilterChip, Segmented, Avatar, Drawer) and restyle Field, Card, Modal
...
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-10-01 09:28:34 +08:00
admin and Claude Haiku 4.5
9ed8c97c24
docs: add IMS Admin refresh slice 1 implementation plan
...
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-10-01 09:21:28 +08:00
admin and Claude Haiku 4.5
c5a98eed06
feat(design): sweep off-system styles and add the check:design gate
...
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-09-30 20:39:44 +08:00
admin and Claude Haiku 4.5
ba9eeefe47
refactor(design): replace status, priority and severity color maps with StatusTag and mono tokens
...
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-09-30 19:08:18 +08:00
admin and Claude Haiku 4.5
4411ed54b5
feat(design): add Modernist UI primitives (Button, Tag, StatusTag, Field, Card, table styles)
...
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-09-30 19:04:05 +08:00
admin and Claude Haiku 4.5
3a941a357b
refactor(design): drop rounded classes, swap bg-white and gray borders for tokens
...
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-09-30 19:02:28 +08:00
admin and Claude Haiku 4.5
8701d24c6c
feat(design): add Modernist tokens, theme remap and Archivo font
...
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-09-30 18:55:02 +08:00
admin and Claude Haiku 4.5
106136e902
docs: add Modernist design system restyle implementation plan
...
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_015e81pY6swiKHQZDcN86CTD
2026-09-30 18:25:57 +08:00
admin and Claude Haiku 4.5
ef7f1c9660
docs: approve Modernist spec, resolve status and imagery decisions
...
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_015e81pY6swiKHQZDcN86CTD
2026-09-30 18:09:04 +08:00
admin and Claude Haiku 4.5
38ccc44933
docs: add Modernist design system restyle spec
...
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_015e81pY6swiKHQZDcN86CTD
2026-09-30 17:59:47 +08:00
admin and Claude Haiku 4.5
26120862a1
docs: Supabase to local postgres migration implementation plan
...
7-task implementation plan with step-by-step instructions:
- Task 1: Pre-migration verification
- Task 2: Prepare local postgres schema
- Task 3: Export data from Supabase
- Task 4: Import to local + announce downtime
- Task 5: Validate data integrity
- Task 6: Update app config & cutover
- Task 7: Post-migration cleanup & docs
Estimated timeline: 3-4 hours total (1-2 hours downtime).
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-09-30 09:06:47 +08:00
admin and Claude Haiku 4.5
fe0dd27448
docs: Supabase to local postgres migration design spec
...
Migration plan for moving from Supabase cloud to self-hosted local postgres.
Scope: 30 users, 500 incidents, ~100MB database.
Downtime: Planned maintenance window.
Approach: Direct pg_dump/restore with validation.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2026-09-30 08:06:11 +08:00
admin
7cddc332f8
fix(bulk-import): type safety and unused imports
...
Remove unused db import, fix type casting for database query result,
correct requireAdmin() usage in API routes.
2026-08-16 15:37:45 +08:00
admin
e889a24afd
docs: add bulk incident import implementation plan
2026-08-16 14:57:29 +08:00
admin
f68832bf54
docs: add bulk incident import design spec
2026-08-16 14:50:25 +08:00
admin
1e33ef2483
fix(evidence): disable auth on evidence route, filesystem storage already protected
...
Disabled token validation and session auth on /api/evidence endpoint.
Files are stored on secure filesystem with proper directory structure.
Path traversal protection remains in place.
NOTE: Server running old compiled code - requires rebuild to take effect.
Build failing on server (npm/pnpm not found). Need proper deployment pipeline.
2026-08-16 09:44:57 +08:00
admin
d7ba6a5265
fix(docs): document evidence file upload issue and VPS setup
...
Files not displaying after upload due to missing EVIDENCE_DIR and
EVIDENCE_URL_SECRET environment variables. Uploads fail silently when
env vars unset, files never inserted into database.
Add bug fix documentation with root cause analysis and VPS deployment
instructions. Update .env.local.example to emphasize these vars are
required for file uploads to work.
See docs/BUG_FIX_evidence_display.md for details.
2026-08-15 11:01:49 +08:00
admin and Claude Sonnet 4.6
8acca41ca1
docs: phase 9 — update vps-cron.md, add cutover runbook
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-07-24 06:35:15 +08:00
admin and Claude Sonnet 4.6
ba3d345531
feat(ops): add new server runbook and update deploy.sh for ims.setia.com.my
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-07-23 15:30:51 +08:00
admin and Claude Sonnet 4.6
0e479b648f
fix(auth,capa): restore auth callback, fix CAPA status update
...
- auth callback: remove debug redirect, handle both code (PKCE) and
token_hash+type (recovery/magic link) flows correctly
- capa PATCH: use admin client to bypass RLS for status updates
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01WMymkhHZiaYZtUeH9MEHZQ
2026-07-22 19:43:38 +08:00
admin
3a5daaa987
docs: add forgot password implementation plan
2026-07-21 22:27:02 +08:00
admin
a4b7761f92
docs: add forgot password flow design spec
2026-07-21 22:25:18 +08:00
admin
f6064b9580
feat: reporter clickable rows, CAPA owner action buttons, triage segmented severity
2026-07-12 16:42:49 +08:00
admin and Claude Fable 5
646c94be0c
chore: commit supabase config, phase 2/4 plan docs, extend gitignore
...
- supabase/config.toml + supabase/.gitignore from supabase init (needed
for supabase db push / local dev)
- phase 2 and phase 4 implementation plans referenced by the SDD
progress ledger but never committed
- ignore local tooling dirs (node_modules.nosync, graphify-out, .claude)
and iCloud "name 2.ext" sync-conflict copies
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01CPf5Rc8QPx6V8KLEEgfKEQ
2026-07-12 10:30:06 +08:00
admin and Claude Fable 5
576557181a
feat: Phase 5 & 6 — usability, compliance hardening, analytics
...
Phase 5 (usability + compliance):
- In-app notification bell/badge: migration 016 adds read state + per-user
RLS + create_in_app_notification SECURITY DEFINER RPC; /api/notifications;
wired into incident creation, CAPA assign/verify, escalation cron
- Incident closure: new POST /api/incidents/[id]/close (requires verification
status + all CAPAs verified); migration 017 locks closed incidents at DB
level (update/delete triggers) with append-only incident_addenda + UI panel
- Server-side pagination on HSE/supervisor incident inboxes (.range, 25/page)
- Investigation form: alcohol/urine test result + witness statement refs
(existing schema columns, now editable)
- Type-specific intake fields: migration 018 adds incidents.type_details
JSONB; whitelist validation; environmental/asset/security/fire field
groups in report form; EN/MS/ZH labels; offline queue support
- JKKP 8 annual register CSV export (/api/reports/jkkp8) + dashboard button
+ January statutory deadline banner
- Admin page: user invite (service-role client), role/site/active management,
site + zone CRUD with QR report links — replaces Phase 0 stub
- Evidence gallery thumbnails via Supabase render transform with fallback
Phase 6 (analytics):
- 12-month stacked trend chart (leading/lagging/other) + top root causes
(lib/dashboard/trends.ts pure helpers)
- AI rising-risk zones: /api/dashboard/ai/risk-flags aggregates 90-day
zone stats, claude-opus-4-8 forced tool_use, panel on HSE + management
dashboards, suggestion audit-logged
Also fixes 9 pre-existing missing /ims basePath prefixes in client fetches
and download links.
132 tests passing, tsc clean, next build clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01CPf5Rc8QPx6V8KLEEgfKEQ
2026-07-12 10:25:08 +08:00
admin
16e8f9d01b
docs: update Phase 3 plan — AI features already done, focus on remaining dashboards
2026-07-11 18:04:10 +08:00
admin
a07c9f0910
docs: Phase 3 design spec — AI features + dashboard upgrade
2026-07-11 17:39: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
8a9758c8a6
feat: Phase 1 foundation - incident components, storage, and migrations
2026-07-10 10:48:56 +08:00
admin
f83686fcca
chore: scaffold Next.js 15 + Supabase clients + vitest
2026-07-09 21:33:59 +08:00