Refs #8. This is the scaffold PR that mobile-ios (#9) builds on.
What's in it
Dependencies (additive):@capacitor/core, android, ios, app and browser (sso needs the last for its Custom Tab login), plus the dev dependency @capacitor/cli, all at ^7. Capacitor 8 needs Node 22, and inspiron has Node 20. I regenerated the lockfile with npm 11 in node:24-alpine from the base lockfile, so the libc fields are kept. The only removed line is a hoisting move of is-fullwidth-code-point.
capacitor.config.ts: app id dev.eom.wikideck and webDir: 'dist'.
CapacitorHttp is enabled, so fetch goes through native HTTP.
android/: the generated project with these changes:
a dev.eom.wikideck: VIEW/BROWSABLE intent filter for the SSO redirect (singleTask was already set)
usesCleartextTraffic
adjustResize so the keyboard doesn't cover inputs
android/build-debug.sh, which builds against the testnet
src/native.ts (imported first in main.tsx; it does nothing on the web):
isNativeApp().
Node URL:VITE_NODE_URL, which defaults to http://192.168.1.32:3101 in the app. It's applied to relative fetch('/api/…') and fetch('/auth/…') calls, and globalThis.WIKIDECK_NODE_URL is set for sso's nodeBase().
Header fix: Capacitor's interceptor returns content-length: 0, 384, which makes StateClient throw "Node response exceeds client page limit". The wrapper drops that merged header; byte limits are still enforced while streaming.
Back button: closes an open dialog (through Escape) first, then goes back in history, then minimizes the app.
onDeepLink() and NATIVE_REDIRECT_URI for the SSO return path.
src/App.tsx: one import, and hidden={isNativeApp()} on the mining panel.
The Origin 403 that night-review raised: checked on the emulator against 192.168.1.32:3101. A POST from inside the app to /api/transfer returns 400 "Invalid request encoding", so it gets past the Origin check. The same POST from curl with Origin: https://localhost returns 403. Native HTTP sends no Origin header, so no change to http.ts is needed.
Verification
Node 24 gate: npm test gives 100 tests, 99 pass, 0 fail, 1 skipped. npm run build passes.
Debug APK built and running on an API 35 x86_64 emulator, showing TESTNET, RPC available and 2 peers.
Refs #8. This is the scaffold PR that mobile-ios (#9) builds on.
**What's in it**
- **Dependencies (additive):** `@capacitor/core`, `android`, `ios`, `app` and `browser` (sso needs the last for its Custom Tab login), plus the dev dependency `@capacitor/cli`, all at `^7`. Capacitor 8 needs Node 22, and inspiron has Node 20. I regenerated the lockfile with npm 11 in `node:24-alpine` from the base lockfile, so the `libc` fields are kept. The only removed line is a hoisting move of `is-fullwidth-code-point`.
- **`capacitor.config.ts`:** app id `dev.eom.wikideck` and `webDir: 'dist'`.
- `CapacitorHttp` is enabled, so `fetch` goes through native HTTP.
- Cleartext is allowed for the LAN testnet.
- `adjustMarginsForEdgeToEdge: 'auto'` handles Android 15's edge-to-edge drawing.
- `ios` is left at its defaults.
- **`android/`:** the generated project with these changes:
- a `dev.eom.wikideck:` VIEW/BROWSABLE intent filter for the SSO redirect (`singleTask` was already set)
- `usesCleartextTraffic`
- `adjustResize` so the keyboard doesn't cover inputs
- `android/build-debug.sh`, which builds against the testnet
- **`src/native.ts`** (imported first in `main.tsx`; it does nothing on the web):
- `isNativeApp()`.
- **Node URL:** `VITE_NODE_URL`, which defaults to `http://192.168.1.32:3101` in the app. It's applied to relative `fetch('/api/…')` and `fetch('/auth/…')` calls, and `globalThis.WIKIDECK_NODE_URL` is set for sso's `nodeBase()`.
- **Header fix:** Capacitor's interceptor returns `content-length: 0, 384`, which makes `StateClient` throw "Node response exceeds client page limit". The wrapper drops that merged header; byte limits are still enforced while streaming.
- **Back button:** closes an open dialog (through Escape) first, then goes back in history, then minimizes the app.
- `onDeepLink()` and `NATIVE_REDIRECT_URI` for the SSO return path.
- **`src/App.tsx`:** one import, and `hidden={isNativeApp()}` on the mining panel.
**The Origin 403 that night-review raised:** checked on the emulator against `192.168.1.32:3101`. A POST from inside the app to `/api/transfer` returns **400** "Invalid request encoding", so it gets past the Origin check. The same POST from curl with `Origin: https://localhost` returns **403**. Native HTTP sends no Origin header, so **no change to `http.ts` is needed**.
**Verification**
- Node 24 gate: `npm test` gives 100 tests, 99 pass, 0 fail, 1 skipped. `npm run build` passes.
- Debug APK built and running on an API 35 x86_64 emulator, showing TESTNET, RPC available and 2 peers.
- APK: `inspiron-3670:~/worker/jobs/night/mobile-android/wikideck/android/app/build/outputs/apk/debug/app-debug.apk`
No build output is committed: `android/app/build`, `.gradle` and `assets/public` are gitignored.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Capacitor deps (core, cli, android, ios, app, browser); additive lockfile
regenerated with npm 11 (node:24) so libc fields are kept.
- capacitor.config.ts: webDir dist, CapacitorHttp on (native fetch: no CORS,
no WebView Origin header for the node's POST origin check), cleartext for
the LAN testnet, edge-to-edge margins on Android 15.
- android/: generated project + SSO deep link (dev.eom.wikideck:), cleartext,
adjustResize for the keyboard; build-debug.sh builds against the testnet.
- src/native.ts: isNativeApp(), VITE_NODE_URL (default testnet node) applied to
relative /api and /auth fetches, sets WIKIDECK_NODE_URL for src/auth, fixes
the interceptor's merged content-length header, back button closes dialogs
first, onDeepLink() for the SSO redirect. No-op on the web.
- App.tsx: one import + hidden={isNativeApp()} on the mining panel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude
added this to the Night 1: Playable game, accounts and mobile milestone 2026-11-17 04:55:42 +00:00
Gate, exact head 396c16d (inspiron, Node 24 container, npm ci && npm test && npm run build with the new lockfile): 100 tests, 99 pass, 0 fail; build passes. No consensus files. It's 15 commits behind integration; the squash merge carries the shared hooks below.
package.json and the lockfile are additive only. Six new deps (@capacitor/{core,android,ios,app,browser,cli} 7.x), with no bumps or reformatting. All 80 new lockfile resolved URLs are https://registry.npmjs.org. Supply chain:android/gradle/wrapper/gradle-wrapper.jar SHA-256 2db75c40…48046matches Gradle's published checksum for 8.11.1.
Shared hooks, as BOUNDARIES allows:
App.tsx: one import, plus hidden={isNativeApp()} on the mining panel. Hidden, not deleted.
main.tsx: one import.
Origin check:CapacitorHttp routes requests through the native stack, so the node's browser POST-origin check isn't bypassed by a browser. That check exists to stop cross-site browser requests, and native HTTP isn't one. This addresses my earlier #8 note without loosening the server allowlist. The SSO redirect is handled through the appUrlOpen deep link (scheme-checked), and PKCE and state are verified in src/auth.
Follow-ups (not blocking):
Cleartext:usesCleartextTraffic="true" and server.cleartext: true allow HTTP to any host. Before any non-LAN use, replace them with a network_security_config.xml that permits cleartext only for 192.168.1.32 (and the emulator's 10.0.2.2 if needed).
Gradle download: add distributionSha256Sum to gradle-wrapper.properties so the downloaded Gradle distribution is verified as well.
setNodeUrl() accepts any http(s)://host. That's fine because the wallet only signs client-built messages (#15). Just never expose it through a deep link or URL parameter.
You can drop the template's ExampleUnitTest.java.
[night-review] **VERDICT: APPROVED** at **396c16d**.
**Gate, exact head 396c16d** (inspiron, Node 24 container, `npm ci && npm test && npm run build` with the new lockfile): **100 tests, 99 pass, 0 fail; build passes.** No consensus files. It's 15 commits behind integration; the squash merge carries the shared hooks below.
**`package.json` and the lockfile are additive only.** Six new deps (`@capacitor/{core,android,ios,app,browser,cli}` 7.x), with no bumps or reformatting. All **80** new lockfile `resolved` URLs are `https://registry.npmjs.org`.
**Supply chain:** `android/gradle/wrapper/gradle-wrapper.jar` SHA-256 `2db75c40…48046` **matches Gradle's published checksum for 8.11.1**.
**Shared hooks, as BOUNDARIES allows:**
- `App.tsx`: one import, plus `hidden={isNativeApp()}` on the mining panel. Hidden, not deleted.
- `main.tsx`: one import.
**Origin check:** `CapacitorHttp` routes requests through the native stack, so the node's browser POST-origin check isn't bypassed by a browser. That check exists to stop cross-site browser requests, and native HTTP isn't one. This addresses my earlier #8 note without loosening the server allowlist. The SSO redirect is handled through the `appUrlOpen` deep link (scheme-checked), and PKCE and state are verified in `src/auth`.
**Follow-ups (not blocking):**
1. **Cleartext:** `usesCleartextTraffic="true"` and `server.cleartext: true` allow HTTP to *any* host. Before any non-LAN use, replace them with a `network_security_config.xml` that permits cleartext **only** for `192.168.1.32` (and the emulator's `10.0.2.2` if needed).
2. **Gradle download:** add `distributionSha256Sum` to `gradle-wrapper.properties` so the downloaded Gradle distribution is verified as well.
3. `setNodeUrl()` accepts any `http(s)://host`. That's fine because the wallet only signs client-built messages (#15). Just never expose it through a deep link or URL parameter.
4. You can drop the template's `ExampleUnitTest.java`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Refs #8. This is the scaffold PR that mobile-ios (#9) builds on.
What's in it
@capacitor/core,android,ios,appandbrowser(sso needs the last for its Custom Tab login), plus the dev dependency@capacitor/cli, all at^7. Capacitor 8 needs Node 22, and inspiron has Node 20. I regenerated the lockfile with npm 11 innode:24-alpinefrom the base lockfile, so thelibcfields are kept. The only removed line is a hoisting move ofis-fullwidth-code-point.capacitor.config.ts: app iddev.eom.wikideckandwebDir: 'dist'.CapacitorHttpis enabled, sofetchgoes through native HTTP.adjustMarginsForEdgeToEdge: 'auto'handles Android 15's edge-to-edge drawing.iosis left at its defaults.android/: the generated project with these changes:dev.eom.wikideck:VIEW/BROWSABLE intent filter for the SSO redirect (singleTaskwas already set)usesCleartextTrafficadjustResizeso the keyboard doesn't cover inputsandroid/build-debug.sh, which builds against the testnetsrc/native.ts(imported first inmain.tsx; it does nothing on the web):isNativeApp().VITE_NODE_URL, which defaults tohttp://192.168.1.32:3101in the app. It's applied to relativefetch('/api/…')andfetch('/auth/…')calls, andglobalThis.WIKIDECK_NODE_URLis set for sso'snodeBase().content-length: 0, 384, which makesStateClientthrow "Node response exceeds client page limit". The wrapper drops that merged header; byte limits are still enforced while streaming.onDeepLink()andNATIVE_REDIRECT_URIfor the SSO return path.src/App.tsx: one import, andhidden={isNativeApp()}on the mining panel.The Origin 403 that night-review raised: checked on the emulator against
192.168.1.32:3101. A POST from inside the app to/api/transferreturns 400 "Invalid request encoding", so it gets past the Origin check. The same POST from curl withOrigin: https://localhostreturns 403. Native HTTP sends no Origin header, so no change tohttp.tsis needed.Verification
npm testgives 100 tests, 99 pass, 0 fail, 1 skipped.npm run buildpasses.inspiron-3670:~/worker/jobs/night/mobile-android/wikideck/android/app/build/outputs/apk/debug/app-debug.apkNo build output is committed:
android/app/build,.gradleandassets/publicare gitignored.🤖 Generated with Claude Code
- Capacitor deps (core, cli, android, ios, app, browser); additive lockfile regenerated with npm 11 (node:24) so libc fields are kept. - capacitor.config.ts: webDir dist, CapacitorHttp on (native fetch: no CORS, no WebView Origin header for the node's POST origin check), cleartext for the LAN testnet, edge-to-edge margins on Android 15. - android/: generated project + SSO deep link (dev.eom.wikideck:), cleartext, adjustResize for the keyboard; build-debug.sh builds against the testnet. - src/native.ts: isNativeApp(), VITE_NODE_URL (default testnet node) applied to relative /api and /auth fetches, sets WIKIDECK_NODE_URL for src/auth, fixes the interceptor's merged content-length header, back button closes dialogs first, onDeepLink() for the SSO redirect. No-op on the web. - App.tsx: one import + hidden={isNativeApp()} on the mining panel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>[night-review] VERDICT: APPROVED at
396c16d.Gate, exact head
396c16d(inspiron, Node 24 container,npm ci && npm test && npm run buildwith the new lockfile): 100 tests, 99 pass, 0 fail; build passes. No consensus files. It's 15 commits behind integration; the squash merge carries the shared hooks below.package.jsonand the lockfile are additive only. Six new deps (@capacitor/{core,android,ios,app,browser,cli}7.x), with no bumps or reformatting. All 80 new lockfileresolvedURLs arehttps://registry.npmjs.org.Supply chain:
android/gradle/wrapper/gradle-wrapper.jarSHA-2562db75c40…48046matches Gradle's published checksum for 8.11.1.Shared hooks, as BOUNDARIES allows:
App.tsx: one import, plushidden={isNativeApp()}on the mining panel. Hidden, not deleted.main.tsx: one import.Origin check:
CapacitorHttproutes requests through the native stack, so the node's browser POST-origin check isn't bypassed by a browser. That check exists to stop cross-site browser requests, and native HTTP isn't one. This addresses my earlier #8 note without loosening the server allowlist. The SSO redirect is handled through theappUrlOpendeep link (scheme-checked), and PKCE and state are verified insrc/auth.Follow-ups (not blocking):
usesCleartextTraffic="true"andserver.cleartext: trueallow HTTP to any host. Before any non-LAN use, replace them with anetwork_security_config.xmlthat permits cleartext only for192.168.1.32(and the emulator's10.0.2.2if needed).distributionSha256Sumtogradle-wrapper.propertiesso the downloaded Gradle distribution is verified as well.setNodeUrl()accepts anyhttp(s)://host. That's fine because the wallet only signs client-built messages (#15). Just never expose it through a deep link or URL parameter.ExampleUnitTest.java.