Skip to content

Test the local stack from a phone and give Claude its own local account - #125

Merged
jamesembling merged 1 commit into
mainfrom
local-dev-phone-sim-claude-account
Nov 10, 2026
Merged

jamesembling merged 1 commit into
mainfrom
local-dev-phone-sim-claude-account

Conversation

@jamesembling

Copy link
Copy Markdown
Owner

Summary

  • npm run dev:e2e now discovers the Mac's Wi-Fi addresses each time it starts and allows them for the pairing login and Next.js allowedDevOrigins. This replaces a stale hard-coded IP, so a phone on the same Wi-Fi can use http://<LocalHostName>.local:3010.
  • The local reset seeds an empty claude@pokenotes.local (Claude Tester) account. The login page offers Sign in as Claude next to Sign in locally, and npm run auth:e2e:save:claude saves its agent-browser state.
  • New npm run auth:e2e:copy-code; the login hint names the right copy command on the local stack.
  • The LAN-host discovery is shared by next.config.js, local-e2e.mjs and setup-local-test-login.mjs through scripts/local-network-hosts.cjs. ESLint allows require() in CommonJS files only.
  • The import journey now clicks the default sign-in button explicitly, because the form has a second submit button.

Local-only. Production login is unchanged: local login still requires NODE_ENV=development, the flag, an allowed host and the pairing code.

Verification

  • npm run lint, npm run typecheck, npm test: 330 passed, 1 skipped.
  • npm run e2e:local:import and -- --expired-session: both PASS.
  • npm run e2e:local:reset seeds both accounts. Saved states open /profile as E2E Trainer and as Claude Tester respectively.
  • iOS Simulator Safari at http://192.168.1.73:3010: pairing code, then Sign in as Claude, reaches Claude's dashboard.

Tests

Executed cases 330 → 331 passing (1 skipped either way). The new case in tests/local-test-login.test.ts checks that the Claude account signs in with its own credentials only when they are configured. Usefulness 8/10: it catches signing in as the wrong account, which no existing case covers. A physical phone over real Wi-Fi was not tested; the simulator shares the Mac's network.

🤖 Generated with Claude Code

- dev:e2e discovers the Mac's Wi-Fi addresses at start and allows them for
  pairing login and Next.js dev origins, replacing a stale hard-coded IP.
- The reset seeds an empty claude@pokenotes.local account; the login page
  offers "Sign in as Claude" and auth:e2e:save:claude saves its state.
- Add auth:e2e:copy-code and document phone and iOS Simulator use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jamesembling jamesembling added the merge-when-green Squash-merge automatically once every check is green label Nov 10, 2026
@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
poke-notes-app Ready Ready Preview Nov 10, 2026 12:06am UTC

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T00:07:00.351251Z 835f9d6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jamesembling
jamesembling merged commit 5b1bfb0 into main Nov 10, 2026
5 checks passed

This branch was successfully deployed

1 active deployment
Preview — 835f9d67 Deployed Nov 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-when-green Squash-merge automatically once every check is green

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant