## Original task Validate and fix the Expo mobile app (Face/Matrix/Feed tabs) against the live API server. Restart the API server (was EADDRINUSE from prior merge), verify domain config, test all three tabs, fix issues, and confirm TypeScript typecheck passes. ## Changes made ### artifacts/mobile/app/(tabs)/matrix.tsx - Fixed getMatrixUrl(): was returning `https://{domain}/` (API landing page), now returns `https://{domain}/tower` (Three.js 3D world). This was the main UI bug — the Matrix tab was showing the wrong page. ### artifacts/api-server/src/app.ts - Fixed tower static file path: replaced `path.resolve(process.cwd(), "the-matrix", "dist")` with `path.resolve(__dirname_app, "../../..", "the-matrix", "dist")` using `fileURLToPath(import.meta.url)`. - Root cause: pnpm `--filter` runs scripts from the package directory (`artifacts/api-server`), so `process.cwd()` resolved to `artifacts/api-server/the-matrix/dist` (missing), not `the-matrix/dist` at workspace root. This caused /tower to 404 in development. - The import.meta.url approach works correctly in both dev (tsx from src/) and production (esbuild CJS bundle from dist/) since both are 3 levels deep from workspace root. ### Infrastructure - Killed stale process on port 18115, restarted Expo workflow (was stuck waiting for port with interactive prompt). - Restarted API server (was EADDRINUSE from prior task merge). ## Verification - API healthz returns 200, /tower/ returns 200. - TypeScript typecheck passes for @workspace/mobile (no errors). - TypeScript typecheck passes for @workspace/api-server (no errors). - Expo dev server running on port 18115, Metro bundler active. - WebSocket connections visible in API server logs (clients connected). - EXPO_PUBLIC_DOMAIN set to $REPLIT_DEV_DOMAIN in dev script (correct for wss:// and https:// connections).
322 KiB
1206x2311px
322 KiB
1206x2311px