Files
tony 89b24d4c34 feat: wire build/test infra, trips API, and enriched journey stops
- Add tsconfig.json (server) + client/tsconfig.{json,app.json,node.json}
  so typecheck and tsc -b actually work.
- Fix npm test to run Playwright (was running vitest on Playwright specs);
  typecheck now covers both server and client.
- Mount routes before app.listen, add error handler, mount optional
  @tonycodes/auth-express middleware when AUTH_SECRET is set.
- Add /api/trips (GET/POST/PATCH/DELETE) backed by an in-memory store
  that gracefully degrades when DATABASE_URL is unset.
- Add prisma/seed.ts skeleton and server/types/express.d.ts for req.auth.
- Rewrite Grok prompt for combo-aware planning: charge+eat,
  stay+destination-charging, eat+viewpoint, etc., with amenities,
  cuisine, priceLevel, duration, day titles and trip highlights.
- Extend Stop schema + normalization to preserve all enrichment fields.
- New StopCard component renders combo pill, description, meta row
  (charge / stop / battery / cuisine / £-level) and amenity icons;
  map popups show the same enriched detail; timeline gains day titles
  and a HIGHLIGHTS sidebar.
- Fix server TS errors (vehicle accepted as string | {name,rangeKm},
  JSON parse results typed).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 10:32:53 +01:00

45 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# scripts/smoke.sh
# Fast UI smoke test for the Tesla Roadtrip project.
#
# This is the recommended quick check during iteration.
# It opens the real browser UI (like a user would) and verifies that:
# - The "Local Heavy" badge is visible (we're using your personal authenticated Grok CLI)
# - A chat message can be sent
# - Grok responds with something useful
#
# Much more representative than hitting the API directly.
#
# Usage:
# ./scripts/smoke.sh
#
# Completes in ~30-90 seconds.
set -e
echo "🚀 Tesla Roadtrip - Fast UI Smoke Test"
echo "======================================"
echo ""
# Make sure backend is running
if ! curl -s http://localhost:3000/health > /dev/null 2>&1; then
echo "⚠️ Backend not running on port 3000."
echo " Starting dev environment in background..."
./scripts/dev.sh &
echo " Waiting for backend to be ready..."
sleep 18
else
echo "✅ Backend is running"
fi
echo ""
echo "🧪 Running fast UI smoke test (real browser, like a user)..."
echo ""
npx playwright test tests/grok-api-diagnostic.spec.ts --reporter=list
echo ""
echo "✅ Smoke test complete."
echo " Check the output above for whether the Local Heavy path is working."