# WanderKit Dev Context (persistent snapshot)
_Last updated: 2026-02-21 ~08:34 UTC_

## URLs & Projects
- **PROD:** `wanderkit.symph.co` → Cloud Run `wanderkit-prod`, project `symph-wanderkit`
  - Latest revision: `wanderkit-prod-00031-c2c` (#127 Itinerary circular nav; build `ca02fc61`)
- **DEV:** `wanderkit.dev.apps.symph.co` (port 3006)
  - App dir: `/home/aria/projects/wanderkit`
  - Log: `/home/aria/projects/.aria-logs/wanderkit.log`
  - Deploy: `bash deploy-dev.sh` | kill: `lsof -ti :3006 | xargs kill -9`
- **Cloud Build deploy:** `gcloud builds submit --config=cloudbuild.yaml --substitutions=SHORT_SHA=$(date +%Y%m%d%H%M) --project=symph-wanderkit`

## People
- **Tom Garcia:** tom.garcia@symph.co (Pro whitelist) | tjrgarcia19@gmail.com
- **Discord channel:** #wk-development (1472570510977007688)

## Workflow Rules (NON-NEGOTIABLE)
- **NEVER make changes without Tom saying "go"** — discuss first, wait for explicit "go"
- **DEV first → Tom verify → PROD deploy** — never skip
- **NEVER deploy to PROD without Tom's explicit sign-off on DEV** — one batch at a time
- `NEXT_PUBLIC_*` vars baked in at BUILD TIME via Dockerfile ARGs

## Current PROD State
**`wanderkit-prod-00026` (Batch 5)** — confirmed by Tom ✅
- #115: Private per-user notes (`userNotes: Record<string,string>` on Activity)
- #116: Schedule column popover gated to `canEdit=true`
- #117: Cost column read-only ALL roles; green = personal actual; tooltips explain
- #118: Operating Hours gated to `canEdit=true`

## Cloud Functions
- `ensureUserProfileOnTripCreate` — ACTIVE since 2026-02-21T05:17:43Z
- Triggers on `prod_trips/{tripId}` onCreate → creates `prod_users` doc if missing

## Batching Plan
| Batch | Ticket(s) | Status |
|-------|-----------|--------|
| 1 | #112 Feedback Button | ✅ PROD |
| 2 | #113 AI Budget & Pace | ✅ PROD |
| 3 | #101 Re-engagement Alerts | ✅ PROD |
| 4 | #114 Fields Manager | ✅ PROD |
| 5 | #115 #116 #117 #118 | ✅ PROD (Tom confirmed) |
| 6 | #120 Unsaved Changes Guard | 🔄 PROD deployed — awaiting Tom confirm (`wanderkit-prod-00027-ttb`) |
| 7 | #119 #121 | 🔄 PROD deployed — awaiting Tom confirm (`wanderkit-prod-00029-mss`) |
| 8 | #103a Mobile Audit | 📅 Another day |
| 9 | #103b Full PWA | 📅 After mobile audit |

## Blocked Tickets
- #106 Facebook Pixel — needs Pixel ID
- #107 Google Ads Conversion — needs Ads account
- #80 Manage Subscriptions — needs SymphPay portal
- #89 Email Invites — needs email service

## Feedback Tickets
- WK-001 ✅, WK-002 ✅ (#112), WK-003 ✅ (#113), WK-004 ✅ (#114)
- **Next available: WK-005**

## Backlog File
`/home/aria/products/wanderkit/design/DEVELOPMENT-BACKLOG.md`

## Analytics
- GTM: `GTM-T9QB3DM8`
- GA: `G-4B74BPFW0Z` / 524841587

## Key Architecture Notes
- **fieldPrefs:** Lifted to trip page level; single `useFieldPreferences` hook; passed as props
- **userNotes:** Private per-user map; shared `notes` field deprecated
- **Cost column:** Read-only ALL roles; `text-green-600` = personal actual
- **AI date fix:** TODAY injected into system prompt; server-side shifts past dates +1 year same month/day
- **Orphaned users:** `runTransaction` in `useAuth.ts` self-heals; CF is safety net

## DEV Issue (Active)
- `localhost:3006` → 200 ✅
- `wanderkit.dev.apps.symph.co` → reportedly down ❌
- Needs: investigate Caddy config or nginx routing for the subdomain
