This page is the bridge between Claude development sessions. It contains the most recent meaningful session. Do not accumulate a journal here โ€” replace the session content each time a meaningful session is completed.

๐Ÿ’ก
AI Development Workflow

Every new Claude session must begin by reading: (1) Project Context โ€” what SONAN DIGITAL is, stack, architecture, rules; (2) Current Development โ€” what is being worked on right now; (3) This page โ€” what happened in the last session and what to do next. When a meaningful session is completed, update this page and Current Development. Only update Project Context when significant architectural decisions change.


Latest Session

Date: 2026-07-02    Developer: Adnan (SONAN DIGITAL)    AI Assistant: Claude (Anthropic)

Objective

Set up the UAT environment, fix portal bugs discovered during initial UAT testing, and establish the documentation portal continuity system.

Work Completed

1. Invite Client to Portal (Feature)

2. Employee Portal Theme Fix

3. Portal Documents Full-Width Fix

4. UAT Environment Setup

5. Types Fix

Files Modified (sonan-digital repo)

FileChange
src/lib/supabase/types.tsAdded user_id: string | null to Client interface
src/app/api/admin/clients/[id]/invite-portal/route.tsNEW โ€” Invite/revoke portal access API
src/components/admin/clients/ClientDetailClient.tsxAdded Client Portal Access card, grant/revoke handlers
src/app/employee/layout.tsxFixed hardcoded black background
src/components/employee/EmployeeSidebar.tsxFixed black background โ†’ navy brand colour
src/components/employee/EmployeeTopBar.tsxFixed dark topbar โ†’ theme-aware
src/components/portal/PortalDocumentsClient.tsxRemoved max-w-3xl mx-auto constraint

Git Commits (sonan-digital repo)

SHAMessage
406ef25feat: add Grant Portal Access to client detail + invite-portal API route
149c63ffix: employee portal theme โ€” navy sidebar, light content area, theme-aware topbar
1c4f505fix: portal documents full-width layout + link UAT clients

All three commits are on both main and dev branches. Production and UAT are in sync.

Known Issues (as of this session)

Architecture Decisions This Session

DecisionRationale
uat.sonandigital.com custom domain for UATStable URL that doesn't change with each deployment. DNS via Cloudflare. CNAME must have Proxy disabled (Vercel requires unproxied).
Separate UAT Supabase projectUAT has its own database. The preview env (dev branch) uses UAT Supabase credentials. Both configured via Vercel environment variables per environment.
Invite Portal uses auth.admin.createUser with email_confirm: trueBypasses email invite flow โ€” allows setting password directly and immediately confirms the email. Suitable for internal provisioning.
โš ๏ธ
FUSE-Safe Commits Required

All git operations in the sandbox must use the FUSE-safe plumbing pattern. Never use git add, git checkout, or standard staging on the FUSE-mounted path. Write file content to /tmp via Python, hash blob from /tmp, build trees with Python ls_tree/mktree helpers, create commit with git commit-tree, update .git/refs/heads/main via Python file write. See CLAUDE.md ยง1 for the full checklist.

โ„น๏ธ
User Pushes โ€” Sandbox Gets 403

The sandbox cannot push to GitHub. Always give the user the exact push command with the hardcoded commit SHA. The user runs it from the Windows terminal.

Next Recommended Task

  1. Continue UAT execution โ€” work through all test cases in the UAT Execution Guide using uat.sonandigital.com
  2. Update v1.0 Known Issues page โ€” remove HIGH-2, HIGH-3, HIGH-5 which have been resolved
  3. Fix any defects found during UAT โ€” log in Defect Log, fix in dev branch, push to UAT to verify, then merge to main
  4. After UAT complete: update this page and Current Development

Notes for Next Session