Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -16,7 +19,7 @@ jobs:

- uses: actions/setup-node@v5
with:
node-version: lts/*
node-version-file: .nvmrc
cache: pnpm

- name: Install
Expand Down
24 changes: 19 additions & 5 deletions .github/workflows/mobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@ on:
paths:
- 'apps/mobile/**'
- '.github/workflows/mobile.yml'
- '.nvmrc'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
pull_request:
paths:
- 'apps/mobile/**'
- '.github/workflows/mobile.yml'
- '.nvmrc'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
# EAS cloud builds / store submits are manual so they don't burn build
# credits on every push. Trigger from the Actions tab → "Run workflow".
workflow_dispatch:
Expand All @@ -29,13 +37,16 @@ on:
type: boolean
default: false

permissions:
contents: read

defaults:
run:
working-directory: apps/mobile

jobs:
# Fast, free check on every push/PR: typecheck, lint, and prove the JS bundle
# builds via `expo export` (no device, no EAS minutes).
# Fast, free check on every push/PR: typecheck, lint, test, and prove both JS
# bundles build via `expo export` (no device, no EAS minutes).
ci:
runs-on: ubuntu-latest
steps:
Expand All @@ -45,7 +56,7 @@ jobs:

- uses: actions/setup-node@v5
with:
node-version: lts/*
node-version-file: .nvmrc
cache: pnpm

- name: Install
Expand All @@ -58,8 +69,11 @@ jobs:
- name: Lint
run: pnpm lint

- name: Test
run: pnpm test

- name: Bundle (expo export)
run: pnpm exec expo export --platform android --output-dir dist-export
run: pnpm export

# Cloud build + optional store submit via EAS. Requires the EXPO_TOKEN repo
# secret (Expo account access token). iOS/Android signing credentials are
Expand All @@ -74,7 +88,7 @@ jobs:

- uses: actions/setup-node@v5
with:
node-version: lts/*
node-version-file: .nvmrc
cache: pnpm

- name: Install
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
45 changes: 45 additions & 0 deletions apps/mobile/BUILD_READINESS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Mobile build readiness

This checklist covers the Expo companion in `apps/mobile`. It does not cover
the native Chromium build in `apps/android-engine`.

## Local toolchain

- Node.js 24 (see the repository `.nvmrc` and root `engines` field)
- pnpm 9.12.0 via Corepack

Run these local release-readiness checks from the repository root:

```bash
corepack enable
pnpm install --frozen-lockfile
pnpm --filter @tronbrowser/mobile typecheck
pnpm --filter @tronbrowser/mobile lint
pnpm --filter @tronbrowser/mobile test
pnpm --filter @tronbrowser/mobile export
cd apps/mobile && pnpm dlx expo-doctor
```

The mobile package intentionally stays on the workspace TypeScript 5.x line.
Expo Doctor currently recommends TypeScript 6 for SDK 57, but changing the
compiler major is a workspace-wide migration rather than a mobile-only update.
The exception is declared in `package.json`; typecheck, tests, lint, and both
platform bundles remain the CI acceptance checks. Expo Doctor is a
network-backed local diagnostic and is not run in CI.

## EAS preview build

The app is linked to the `profullstack/tronbrowserdev` EAS project. Cloud builds
require an Expo access token from the `profullstack` account. The account owner
should add that token directly to the GitHub repository as the `EXPO_TOKEN`
Actions secret; the token should not be shared in chat or committed to git.

After the secret is present, run the `Mobile` workflow manually with:

- platform: `android`
- profile: `preview`
- submit: `false`

The workflow starts an asynchronous EAS build. Its EAS build URL is the handoff
artifact for review. Store submission remains a separate production step and
requires the corresponding Apple or Google developer account and signing setup.
3 changes: 3 additions & 0 deletions apps/mobile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ TronBrowser mobile **companion** app (iOS + Android) — **Expo / React Native**
Expo SDK 57. See [`docs/mobile-architecture.md`](../../docs/mobile-architecture.md)
for how this fits the three mobile tracks.

Build prerequisites and the EAS access checklist are documented in
[`BUILD_READINESS.md`](BUILD_READINESS.md).

> **This is the companion app, not the engine.** It uses the *system* WebView
> (WKWebView on iOS — mandatory; system WebView on Android), so it is **not** the
> Ungoogled Chromium engine and has **no Chrome extensions / no bundled Tor**.
Expand Down
2 changes: 0 additions & 2 deletions apps/mobile/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ config.resolver.nodeModulesPaths = [
path.resolve(projectRoot, 'node_modules'),
path.resolve(workspaceRoot, 'node_modules'),
];
// pnpm stores real packages under a symlinked layout; follow them.
config.resolver.unstable_enableSymlinks = true;
config.resolver.disableHierarchicalLookup = false;

module.exports = config;
18 changes: 13 additions & 5 deletions apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,28 @@
"scripts": {
"build": "tsc --noEmit",
"typecheck": "tsc --noEmit",
"test": "vitest run --passWithNoTests",
"test": "vitest run",
"lint": "eslint . --ext .ts,.tsx",
"start": "expo start",
"android": "expo run:android",
"ios": "expo run:ios",
"export": "expo export --platform all",
"prebuild": "expo prebuild"
},
"expo": {
"install": {
"exclude": [
"typescript"
]
}
},
"dependencies": {
"expo": "^57.0.1",
"expo-constants": "~57.0.2",
"expo-status-bar": "~57.0.0",
"@expo/dom-webview": "~57.0.1",
"expo": "~57.0.9",
"expo-constants": "~57.0.8",
"expo-status-bar": "~57.0.1",
"react": "19.2.3",
"react-native": "0.86.0",
"react-native": "0.86.2",
"react-native-webview": "13.16.1"
},
"devDependencies": {
Expand Down
Loading
Loading