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
104 changes: 99 additions & 5 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: iOS release-record consistency tests and draft check
if: ${{ !cancelled() && steps.install.outcome == 'success' }}
run: |
node --test scripts/ios-release/*.test.mjs
node --test scripts/ios-release/*.test.mjs scripts/ios-assets/*.test.mjs scripts/ios-native/*.test.mjs
node scripts/ios-release/check.mjs
- name: Unit and backend tests
if: ${{ !cancelled() && steps.install.outcome == 'success' }}
Expand All @@ -60,7 +60,6 @@ jobs:
env:
EXPO_OFFLINE: '1'
EXPO_NO_TELEMETRY: '1'
EXPO_PUBLIC_CONVEX_URL: https://fixture.invalid
run: bun run build:mobile
- name: Install client-test browser and host dependencies
id: browsers
Expand Down Expand Up @@ -121,19 +120,114 @@ jobs:
retention-days: 3
if-no-files-found: warn

native-build:
name: Build unsigned iOS simulator app
runs-on: macos-26
timeout-minutes: 50
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '24.12.0'
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: '1.4.2'
- name: Install locked dependencies without lifecycle scripts
run: bun install --frozen-lockfile --ignore-scripts
- name: Compile and inspect the source-bound Release app
env:
REFRESH_PODS: ${{ contains(github.event.pull_request.labels.*.name, 'native-pods-refresh') }}
run: |
if [ "$REFRESH_PODS" = true ]; then
bun scripts/ios-native/run.mjs --refresh-pods
else
bun scripts/ios-native/run.mjs --build-only
fi
- name: Freeze partial evidence if native execution ended early
if: ${{ always() }}
run: node scripts/ios-native/snapshot.mjs
- name: Retain native build or dependency-refresh evidence
if: ${{ always() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ios-native-build-${{ github.event.pull_request.head.sha || github.sha }}
path: reports/native-evidence/
retention-days: 1
compression-level: 9
if-no-files-found: warn

native:
name: Native qualification (${{ matrix.group }})
needs: native-build
runs-on: macos-26
timeout-minutes: 60
strategy:
fail-fast: false
max-parallel: 4
matrix:
group: [phone-5, phone-6, tablet-8, tablet-10]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '24.12.0'
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: '1.4.2'
- name: Install locked dependencies without lifecycle scripts
run: bun install --frozen-lockfile --ignore-scripts
- name: Download this run's source-bound simulator app
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ios-native-build-${{ github.event.pull_request.head.sha || github.sha }}
path: reports/native-build/
- name: Install hash-verified local Maestro CLI
shell: bash
run: |
curl --fail --location --retry 2 https://github.com/mobile-dev-inc/Maestro/releases/download/cli-2.10.0/maestro.zip -o "$RUNNER_TEMP/maestro.zip"
printf '%s %s\n' '29b675e10cc12080e445e9bfb2e2b4e4dfb9c0f2e30d5884120d258b5e1cd991' "$RUNNER_TEMP/maestro.zip" | shasum -a 256 -c -
unzip -q "$RUNNER_TEMP/maestro.zip" -d "$RUNNER_TEMP/maestro-tool"
test -x "$RUNNER_TEMP/maestro-tool/maestro/bin/maestro"
echo "$RUNNER_TEMP/maestro-tool/maestro/bin" >> "$GITHUB_PATH"
echo "JAVA_HOME=$(/usr/libexec/java_home -v 17)" >> "$GITHUB_ENV"
- name: Verify the app and exercise this device group
env:
NATIVE_TEST_GROUP: ${{ matrix.group }}
run: bun scripts/ios-native/run.mjs "--test-group=$NATIVE_TEST_GROUP"
- name: Freeze partial evidence if native execution ended early
if: ${{ always() }}
run: node scripts/ios-native/snapshot.mjs
- name: Retain unsigned native evidence, including failed-run diagnostics
if: ${{ always() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ios-native-${{ matrix.group }}-${{ github.event.pull_request.head.sha || github.sha }}
path: reports/native-evidence/
retention-days: 1
compression-level: 9
if-no-files-found: warn

quality-gate:
name: quality-gate
if: ${{ always() }}
needs: [validate, mutation]
needs: [validate, mutation, native-build, native]
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: Require every validation job to succeed
env:
VALIDATION_RESULT: ${{ needs.validate.result }}
MUTATION_RESULT: ${{ needs.mutation.result }}
NATIVE_BUILD_RESULT: ${{ needs.native-build.result }}
NATIVE_RESULT: ${{ needs.native.result }}
run: |
if [ "$VALIDATION_RESULT" != success ] || [ "$MUTATION_RESULT" != success ]; then
echo "Qualification did not succeed: validation=$VALIDATION_RESULT mutation=$MUTATION_RESULT"
if [ "$VALIDATION_RESULT" != success ] || [ "$MUTATION_RESULT" != success ] || [ "$NATIVE_BUILD_RESULT" != success ] || [ "$NATIVE_RESULT" != success ]; then
echo "Qualification did not succeed: validation=$VALIDATION_RESULT mutation=$MUTATION_RESULT native-build=$NATIVE_BUILD_RESULT native=$NATIVE_RESULT"
exit 1
fi
4 changes: 4 additions & 0 deletions apps/mobile/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# Editable release records are source, unlike generated desktop release output.
!/release/

# Generated by Expo prebuild. Keep native configuration in app.json/plugins.
/ios/
/android/
13 changes: 13 additions & 0 deletions apps/mobile/.impeccable/surfaces/apps-mobile-app-index-tsx.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Native local game

Mode: Operate. Target: Expo/React Native on iPhone and iPad. This is the separate native adaptation requested by issue #42, not a change to the desktop/web system.

Use the established evergreen dice deck, porcelain pip faces and clay action color as the game-specific layer. Use system typography, scalable text, semantic iOS surfaces and text colors, native stack navigation, sheets/alerts and safe areas for the surrounding interface. Do not copy the desktop's dense table or shrink it to phone width.

Compact windows use a vertical play/score flow with a reachable roll action. Expanded iPad windows separate the play controls from the score list. Window width and text scale determine that structure, not a hard-coded device name. All targets are at least 44 points; no fixed-height text containers or decorative permissions, sound, haptics or animation are required.

The local store owns acknowledgment, retries and persistence. Show loading, corrupt/unavailable data, pending-write retry, explicit reload/reset, Resume/Discard and local-only result states. Never imply that a local score is server-verified. Keep one accessible score action per category and describe held/suggested states in words as well as color.

The existing development name is not public branding approval. Support contacts, App Store IDs and final privacy/legal declarations remain unset until approved. Native simulator screenshots must identify their source commit and device; web-adapter tests are only supplemental coverage. Physical-device, VoiceOver, TestFlight and store acceptance remain separate.

Verification is bounded: implement the complete flow, inspect a batched iPhone/iPad light/dark and large-text pass, fix the observed issues together, then one confirmation pass. Native functional failures still need diagnosis and regression tests; do not polish indefinitely.
31 changes: 31 additions & 0 deletions apps/mobile/PRIVACY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Privacy policy draft

Prepared September 27, 2026. This is development copy, not an approved policy for a published app. The owner must approve the public identity, contact information and final declarations after the signed candidate is measured. See the [privacy acceptance issue](https://github.com/HemSoft/yahtzee/issues/48).

## Data on the device

The native gameplay code stores the player name, up to five recent names, game preferences, the active game and its held dice, completed scores, and local rankings in the app's private storage. It retains the latest 500 completed games and the all-time top ten entries per supported dice mode. Local rankings are not an online leaderboard.

The development build has no account, remote players, cloud-sync feature, advertising or purchases. It does not import online game records. Its SQLite document is not encrypted by the application. Device security and operating-system data protection are separate from application-level encryption.

## Retention, deletion and backups

An active game stays available until it is completed, explicitly discarded or removed with the local-data reset. A confirmed reset deletes the app's current game data and preferences from its container. A failed reset remains visible and can be retried. Damaged or unsupported data remains in place until an explicit recovery or reset choice.

Deleting the app removes its local container. Offloading may retain it. The storage location is eligible for operating-system backups, subject to device settings and backup behavior. Restoring a backup can restore older game data. Resetting the current app does not erase existing backups. Physical-device backup and restore verification is still pending.

## Diagnostics and support

The current source requires a preview before sharing diagnostics. The preview contains the app version and build, platform and OS version, a compact or expanded window category, and save-schema and scoring-rule versions. It excludes player names, game identifiers, scores, saved documents, error text, logs and credentials. Nothing is sent when a preview opens or closes.

Choosing Share opens the operating system's share controls with exactly the previewed text. The selected app or destination may use the network and follows its own privacy practices. Sharing is optional.

The repository's [GitHub issue page](https://github.com/HemSoft/yahtzee/issues) is public. Do not post player names, save files, credentials or screenshots containing private information there. GitHub handles information submitted to it under [GitHub's privacy statement](https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement).

An owner-approved private support contact and final public policy URL have not been selected. They must be provided before this draft is published as the release policy.

## Native SDKs and release verification

The first unsigned simulator build contains an embedded JavaScript bundle and has Expo updates disabled in its compiled configuration. Static inspection is not proof of zero network traffic or a completed privacy audit. Bundled SDK behavior, manifests and signatures, signed-archive permissions, and measured traffic still require release verification.

The [engineering inventory](../../docs/mobile-privacy-audit.md) records observations and open work. App Store privacy answers and export-compliance classification remain unset. No legal attestation is supplied by this draft.
36 changes: 25 additions & 11 deletions apps/mobile/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,39 @@
"expo": {
"name": "Yahtzee",
"slug": "yahtzee",
"version": "0.1.0",
"version": "1.0.0",
"scheme": "yahtzee",
"platforms": ["ios", "android"],
"orientation": "portrait",
"orientation": "default",
"userInterfaceStyle": "automatic",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#fafafa"
},
"ios": {
"bundleIdentifier": "com.hemsoft.yahtzee"
"bundleIdentifier": "com.hemsoft.yahtzee",
"buildNumber": "1",
"supportsTablet": true,
"requireFullScreen": false,
"icon": {
"light": "./assets/icon.png",
"dark": "./assets/icon-dark.png",
"tinted": "./assets/icon-tinted.png"
}
},
"android": {
"package": "com.hemsoft.yahtzee",
"adaptiveIcon": {
"foregroundImage": "./assets/icon.png",
"backgroundColor": "#fafafa"
"foregroundImage": "./assets/launch-mark.png",
"backgroundColor": "#1e453a"
}
}
},
"plugins": [
"expo-router",
["expo-build-properties", { "ios": { "deploymentTarget": "17.0" } }],
["expo-splash-screen", {
"image": "./assets/launch-mark.png",
"imageWidth": 160,
"backgroundColor": "#f2f2f7",
"dark": { "image": "./assets/launch-mark.png", "backgroundColor": "#000000" }
}]
]
}
}
27 changes: 16 additions & 11 deletions apps/mobile/app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
import React from "react";
import { Stack } from "expo-router";
import { ConvexProvider, ConvexReactClient } from "convex/react";

const url = process.env.EXPO_PUBLIC_CONVEX_URL;
if (!url) throw new Error("Missing EXPO_PUBLIC_CONVEX_URL environment variable");
const convex = new ConvexReactClient(url);
import { DarkTheme, DefaultTheme, Stack, ThemeProvider } from "expo-router";
import { StatusBar } from "expo-status-bar";
import { LocalProvider, useLocalGame } from "../src/local/LocalProvider";

function Navigation() {
const { colors, dark } = useLocalGame();
return <ThemeProvider value={dark ? DarkTheme : DefaultTheme}>
<StatusBar style={dark ? "light" : "dark"} />
<Stack screenOptions={{ headerLargeTitle: false, headerStyle: { backgroundColor: colors.page }, headerTintColor: colors.text,
contentStyle: { backgroundColor: colors.page }, freezeOnBlur: true }}>
<Stack.Screen name="index" options={{ title: "Yahtzee" }} />
<Stack.Screen name="history" options={{ title: "Local history" }} />
<Stack.Screen name="help" options={{ title: "Help", presentation: "modal" }} />
</Stack>
</ThemeProvider>;
}
export default function Layout() {
return (
<ConvexProvider client={convex}>
<Stack screenOptions={{ headerShown: false }} />
</ConvexProvider>
);
return <LocalProvider><Navigation /></LocalProvider>;
}
15 changes: 15 additions & 0 deletions apps/mobile/app/help.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from "react";
import { Stack, useRouter } from "expo-router";
import { SafeAreaView } from "react-native-safe-area-context";
import { useLocalGame } from "../src/local/LocalProvider";
import { Help } from "../src/screens/Help";
import { Action } from "../src/ui/controls";

export default function HelpRoute() {
const { colors } = useLocalGame();
const router = useRouter();
return <SafeAreaView edges={["bottom", "left", "right"]} style={{ flex: 1, backgroundColor: colors.page }}>
<Stack.Screen options={{ headerRight: () => <Action label="Done" onPress={() => router.back()} /> }} />
<Help />
</SafeAreaView>;
}
9 changes: 9 additions & 0 deletions apps/mobile/app/history.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from "react";
import { SafeAreaView } from "react-native-safe-area-context";
import { useLocalGame } from "../src/local/LocalProvider";
import { History } from "../src/screens/History";

export default function HistoryRoute() {
const { colors } = useLocalGame();
return <SafeAreaView edges={["bottom", "left", "right"]} style={{ flex: 1, backgroundColor: colors.page }}><History /></SafeAreaView>;
}
Loading
Loading