The app no longer imports Supabase (migrated to local PostgreSQL 2026-09-30).
Remove lib/supabase/*, the supabase/ migrations folder, the @supabase/ssr and
@supabase/supabase-js dependencies, and the storage test for the removed client.
db/schema.sql and db/rls.sql remain the schema source of truth.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ssa now has a site incident list, so its header search targets /ssa/incidents.
Use management for the no-search case.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Drop and recreate auth_user_role() for the new user_role enum and re-apply all RLS policies inside the migration, so no separate db/rls.sql step is needed and there is no access gap.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add Site Safety Assistant (ssa) role replacing reporter, supervisor and
capa_owner. Portals move under /ssa (overview, my-reports, incidents,
capas). Update RLS, schema, API role checks, notification recipients,
nav and tests. Add db/ops/2026-11-06-merge-roles-into-ssa.sql (not yet
applied; needs owner go-ahead and a pg_dump first).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Update model to qwen2.5-coder-32b-instruct-Q4_K_M
- Match actual model available in llama.cpp on port 8081
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Switch from Ollama (11434) to llama.cpp (8081)
- Point to OpenAI-compatible API at localhost:8081/v1
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Use larger coder model (32.8B params) for better reasoning
- Update client default model
- Update all AI routes to use qwen2.5-coder-8k:latest
- Already installed and available on server Ollama
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Crop Setia logo icon to 256x256 favicon
- Reference favicon in app metadata
- Displays in browser tabs and bookmarks
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Catch and log GOOGLE_AI_API_KEY errors instead of failing
- Allows endpoints to work without embeddings configured
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Point AI client to localhost:11434/v1 (Ollama)
- Remove DeepSeek API key dependency
- Update model name to qwen3:14b across all routes
- Update test mocks to use createLocalLLMClient
- Removes need for DEEPSEEK_API_KEY setting
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Derived from IMS Admin Spec.dc.html and IMS Admin.dc.html. Defines tokens,
components (StatusTag, TableCard, shells, drawer), screen index, build order
and the changes from the live Modernist build. CLAUDE.md already cites it as
the source of truth.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Replaces the Supabase, Resend, Claude and pm2 notes with the current stack
(Drizzle + local PostgreSQL, bcryptjs/jose auth, on-disk evidence, DeepSeek AI,
Brevo email, build-only deploy to /srv/apps/ims/app). Also includes the
design-system section switch to the IMS Admin refresh (design.md).
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Logged-out requests were redirected to /login, and logged-in non-admin roles
were bounced to their home page, which blocked PWA install and the service
worker.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>