Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9c37c32
test(collection): build standalone Android candidates for native flows
jackshim415 Nov 12, 2026
f24816d
docs(collection): prepare owner-assigned mobile release checks
jackshim415 Nov 12, 2026
006f4d4
fix(ci): retain native setup logs and settle emulator permissions
jackshim415 Nov 12, 2026
4aef896
chore(ci): use stat for emulator permission diagnostics
jackshim415 Nov 12, 2026
b4d1632
fix(collection): declare exact loopback hosts in native test policy
jackshim415 Nov 12, 2026
aab12cb
fix(ci): retain Collection build failures through diagnostic pipes
jackshim415 Nov 12, 2026
4a6fb10
fix(collection): recognize native offline transport failures
jackshim415 Nov 13, 2026
fafe2bf
build(collection): align current SDK 58 patch requirements
jackshim415 Nov 13, 2026
d8d8a86
test(collection): wait for landscape state before native match input
jackshim415 Nov 13, 2026
2e679d7
chore(ci): integrate merged contract and Dashboard validation
jackshim415 Nov 13, 2026
61f06b4
test(collection): retain native command traces and stabilize pose input
jackshim415 Nov 13, 2026
14cff47
test(collection): isolate orientation transitions in native journeys
jackshim415 Nov 13, 2026
5923135
docs(collection): align manual native flow sequence
jackshim415 Nov 13, 2026
4129469
fix(collection): unmount closed field overlays
jackshim415 Nov 13, 2026
bfd3736
test(collection): use Android shell gestures for landscape controls
jackshim415 Nov 13, 2026
c13e7cf
test(collection): tap native end menu through Android input
jackshim415 Nov 20, 2026
f9b656b
Merge remote-tracking branch 'origin/main' into jackshim415/lvt-262-n…
jackshim415 Nov 20, 2026
ec7a140
test(collection): assert native record and undo state
jackshim415 Nov 20, 2026
d245b41
fix(collection): align current Expo SDK 58 compatibility patches
jackshim415 Nov 20, 2026
1e6c923
fix(collection): preserve match controls during native navigation
jackshim415 Nov 21, 2026
fcfb4bc
test(collection): drive landscape reports with verified Android taps
jackshim415 Nov 21, 2026
55fbf88
test(collection): acknowledge Android immersive education before fiel…
jackshim415 Nov 21, 2026
10776a4
test(collection): capture native setup before the match timer starts
jackshim415 Nov 21, 2026
9aa0e0a
Merge remote-tracking branch 'origin/main' into jackshim415/lvt-262-n…
jackshim415 Nov 21, 2026
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
77 changes: 75 additions & 2 deletions .github/workflows/collection-native-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,78 @@ on:
inputs:
candidate_run_id:
description: GitHub Actions run containing a candidate APK built from this exact SHA
required: true
required: false
artifact_name:
description: Artifact containing one standalone APK with localhost HTTP enabled for the fixture API
required: true
required: false
permissions:
contents: read
actions: read
defaults:
run:
shell: bash
jobs:
validate:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Test native input and state assertion guards
run: python3 -m unittest discover -s apps/collection/test/native -p '*_test.py'
- env:
RUN_ID: ${{ inputs.candidate_run_id }}
ARTIFACT: ${{ inputs.artifact_name }}
run: |
if [[ -n "$RUN_ID" || -n "$ARTIFACT" ]]; then
[[ "$RUN_ID" =~ ^[0-9]+$ ]] && test -n "$ARTIFACT"
fi
build:
needs: validate
if: inputs.candidate_run_id == '' && inputs.artifact_name == ''
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24.6.0
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- run: npm ci
working-directory: apps/collection
- name: Build standalone synthetic candidate from a fresh native project
env:
LOVAT_DISPOSABLE_BUILD: "1"
run: |
mkdir -p apps/collection/.maestro/results
bash apps/collection/scripts/build-native-candidate.sh 2>&1 | tee apps/collection/.maestro/results/build-full.log
- uses: actions/upload-artifact@v4
with:
name: collection-native-candidate-${{ github.sha }}
path: apps/collection/candidate/
if-no-files-found: error
retention-days: 14
- uses: actions/upload-artifact@v4
if: always()
with:
name: collection-native-build-logs-${{ github.sha }}
path: apps/collection/.maestro/results/
retention-days: 14
android:
needs: [validate, build]
if: ${{ always() && needs.validate.result == 'success' && (needs.build.result == 'success' || (needs.build.result == 'skipped' && inputs.candidate_run_id != '' && inputs.artifact_name != '')) }}
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
if: inputs.candidate_run_id == ''
with:
name: collection-native-candidate-${{ github.sha }}
path: candidate
- name: Verify candidate source revision
if: inputs.candidate_run_id != ''
env:
GH_TOKEN: ${{ github.token }}
CANDIDATE_RUN_ID: ${{ inputs.candidate_run_id }}
Expand All @@ -26,6 +84,7 @@ jobs:
candidate_sha=$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$CANDIDATE_RUN_ID" --jq .head_sha)
test "$candidate_sha" = "$GITHUB_SHA"
- uses: actions/download-artifact@v4
if: inputs.candidate_run_id != ''
with:
name: ${{ inputs.artifact_name }}
run-id: ${{ inputs.candidate_run_id }}
Expand All @@ -43,10 +102,24 @@ jobs:
curl --fail --location https://github.com/mobile-dev-inc/maestro/releases/download/cli-2.12.1/maestro.zip -o /tmp/maestro.zip
unzip -q /tmp/maestro.zip -d "$RUNNER_TEMP"
echo "$RUNNER_TEMP/maestro/bin" >> "$GITHUB_PATH"
- name: Enable hardware acceleration
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
sudo udevadm settle
sudo chmod a+rw /dev/kvm
mkdir -p apps/collection/.maestro/results
stat /dev/kvm | tee apps/collection/.maestro/results/kvm.txt
test -r /dev/kvm && test -w /dev/kvm
- uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 35
arch: x86_64
cores: 2
ram-size: 2048M
disable-linux-hw-accel: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -no-snapshot -camera-back none -accel on
script: bash apps/collection/scripts/test-native-candidate.sh candidate
- uses: actions/upload-artifact@v4
if: always()
Expand Down
5 changes: 5 additions & 0 deletions apps/collection/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@ dependency-audit.json

test-report/
.maestro/results/

/candidate/

# Native test helper bytecode
__pycache__/
4 changes: 4 additions & 0 deletions apps/collection/.maestro/end-match.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
appId: com.frc8033.lovatcollection
---
- tapOn: "End match"
- tapOn: "End match"
8 changes: 8 additions & 0 deletions apps/collection/.maestro/enter-game.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
appId: com.frc8033.lovatcollection
---
- tapOn: "Scout this match"
- extendedWaitUntil:
visible: "Start position Hub"
timeout: 20000
- waitForAnimationToEnd:
timeout: 5000
9 changes: 0 additions & 9 deletions apps/collection/.maestro/offline-restart.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
appId: com.frc8033.lovatcollection
---
- tapOn: "Scout this match"
- extendedWaitUntil:
visible: "Start position Hub"
timeout: 20000
- tapOn: "Start position Hub"
- tapOn: "Start match"
- tapOn: "Undo"
- tapOn: "End match"
- tapOn: "End match"
- scrollUntilVisible:
element:
text: "Submit"
Expand Down
4 changes: 2 additions & 2 deletions apps/collection/.maestro/reconnect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ appId: com.frc8033.lovatcollection
- tapOn:
text: ".*1234.*"
- assertNotVisible: "Upload"
- back
- back
- tapOn: "Back"
- tapOn: "Back"
- tapOn: "settings"
- assertVisible: "Settings"
- openLink: "lovat-collection://history"
Expand Down
31 changes: 31 additions & 0 deletions apps/collection/.maestro/record-match.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
appId: com.frc8033.lovatcollection
---
# Shared installed-app flow; Android dismisses its system hint before this flow.
- tapOn: "Start position Hub"
- assertVisible:
text: "Start position Hub"
selected: true
- assertVisible:
text: "Start match"
enabled: true
- tapOn:
text: "Start match"
enabled: true
- assertNotVisible: "Start position Hub"
- assertVisible:
text: "Undo"
enabled: false
- tapOn: "Open outpost actions"
- tapOn: "Intake from outpost"
- assertVisible:
text: "Undo"
enabled: true
- tapOn: "Undo"
- assertVisible:
text: "Undo"
enabled: false
- tapOn: "Open outpost actions"
- tapOn: "Intake from outpost"
- assertVisible:
text: "Undo"
enabled: true
8 changes: 7 additions & 1 deletion apps/collection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ Tests execute real Zustand stores, AsyncStorage persistence, report serializatio

`.maestro/` provides installed-app onboarding/deep-link, offline recording, process restart, reconnect/History retry and Settings checks. `scripts/test-native-android.sh` starts a synthetic fixture API, disables airplane connectivity and stops the API so an ADB tunnel cannot hide offline failures, then restarts the app without clearing storage. It verifies that the retried lifecycle preserves one UUID and produces one successful submission. Run it against an installed standalone APK with localhost HTTP permitted for the fixture; it never changes the production app network policy or auth behavior. Install Maestro CLI `cli-2.12.1` and Android platform tools first.

The manual **Collection native candidate tests** workflow accepts an APK artifact run/name and requires that artifact's source SHA to match the selected workflow revision. A failed native flow fails the workflow and retains JUnit/logs. It is a candidate/release check, not a required PR test until Android build stability is proven (LVT-217). No cloud builds or releases are started by the test workflow. Use the existing `native-smoke-ios` EAS simulator profile for iOS candidates; run the same flows with a reachable local fixture, omitting Android airplane/ADB commands. iOS has no simulator airplane mode.
The manual **Collection native candidate tests** workflow can build a fresh standalone synthetic Android APK when both inputs
are empty, or accepts an APK artifact run/name and requires that artifact's source SHA to match the selected workflow revision. A failed native flow fails the workflow and retains JUnit/logs. It is a candidate/release check, not a required PR test until Android build stability is proven (LVT-217). The test build runs locally on GitHub with template test signing and loopback-only
fixture networking; it does not start cloud builds or publish releases. Use the existing `native-smoke-ios` EAS simulator profile for iOS candidates; run the same flows with a reachable local fixture, omitting Android airplane/ADB commands. iOS has no simulator airplane mode.

Before a release, the release owner must run the candidate checks and record the build SHA/version, then manually verify camera permission grant/deny, physical-device multi-code QR transfer, background/restart persistence, and the iOS system/browser permission prompts. Unit/component tests do not claim to validate native camera, signing, installation or permissions. Native flows require a candidate device/build and are documented separately from the automated Pages suite. Related: LVT-259/260/261/262 and LVT-273.

The owner-assigned acceptance matrix and candidate evidence template are in
[manual release checks](docs/manual-release-checks.md). Unexecuted physical-device
and iOS simulator checks remain pending.
4 changes: 4 additions & 0 deletions apps/collection/app/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ export default function Home() {
>
<View style={{ alignItems: "stretch", flex: 1, maxWidth: 450 }}>
<View
// Checking changes pointerEvents as Home is replaced. Keep the
// native parent stable so Fabric cannot flatten/reparent its
// children during Android's outgoing screen transition.
collapsable={false}
style={{ flex: 1 }}
pointerEvents={checkingMatch ? "none" : "auto"}
>
Expand Down
91 changes: 91 additions & 0 deletions apps/collection/docs/manual-release-checks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Collection manual release checks

Related: LVT-217 and LVT-262. Status: **prepared; device acceptance pending**.
Jack Shim (Collection issue assignee) owns the acceptance record. Name the release
operator and reviewer for each candidate. Run on a disposable Android device and
an iOS 27 device with a sandbox team; use only fictional scouting information.
An unexecuted/blocked check is pending and prevents mobile release approval.

## Evidence record

Copy into LVT-262 for each candidate:

- Operator / reviewer / UTC date: **pending**
- Source SHA / build workflow or EAS run URL: **pending**
- Version / Android versionCode or iOS buildNumber: **pending**
- Signed candidate artifact URL / SHA-256 (`shasum -a 256 <file>`): **pending**
- Device model / OS / previous installed version: **pending**
- Sandbox API origin / synthetic team code (no credentials): **pending**
- Native Android run URL / iOS simulator evidence: **pending**
- Each row's result, redacted evidence and linked defect: **pending**
- Release decision / owner sign-off: **pending**

The CI APK is a test-only x86_64 standalone release-mode build with generated
loopback network access. It uses the template's test signing and is not a store
candidate. Its hash and source revision are retained with test results. Testing
that APK does not certify the signed mobile artifact distributed to users.

## Device acceptance matrix

Record pass/fail separately for Android and iOS; do not combine them into one
unchecked statement.

| Check | Expected result | Android / iOS evidence |
| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ---------------------- |
| Clean install from normal signed distribution channel | Correct version/build launches and onboarding works; iOS 27 does not crash on launch | Pending / Pending |
| Upgrade from previous supported version with one saved old report | Settings and report remain readable; migration preserves report identity and data | Pending / Pending |
| Set sandbox API with `lovat-collection://set-url?u=<encoded-sandbox-origin>`; enroll synthetic team | Correct sandbox origin/team/scouter/event are shown | Pending / Pending |
| Record a complete report while airplane mode is enabled | Save succeeds locally; upload failure is visible and recoverable | Pending / Pending |
| Background, force-terminate and relaunch without clearing app storage | Saved report remains in History with the same UUID and event data | Pending / Pending |
| Reconnect and retry from History, then reopen/retry again | Exactly one successful server report; UUID is unchanged; no duplicate successful submission | Pending / Pending |
| Open Settings, change event/scouter/server, then relaunch | Expected selections persist and saved reports stay associated with their original data | Pending / Pending |
| Display a multi-part synthetic report QR and scan with Dashboard on a second physical device | Dashboard reconstructs one identical report; partial/repeated chunks recover safely | Pending / Pending |
| Dashboard scanner camera denied, retried, then granted via system settings | Permission denial is recoverable and transfer succeeds after grant | Pending / Pending |
| Scan unrelated/invalid QR with Dashboard | Clear error; existing report data is preserved | Pending / Pending |
| Phone lock/background during QR display, then reopen | QR remains readable and represents the same saved report | Pending / Pending |

Collection displays QR codes; camera permission belongs to the receiving
Dashboard scanner. Do not invent a Collection camera-permission pass. Record the
receiving Dashboard version/build and OS alongside each transfer result. Keep
Auth0 login checks in Dashboard's LVT-265/266 acceptance record.

## Automated candidate run and iOS handoff

Dispatch **Collection native candidate tests** at the exact candidate SHA with
both inputs empty to generate and test a fresh standalone Android APK. Or provide
both the build run ID and artifact name for an externally built standalone APK;
the workflow rejects a different source revision. Never provide only one input.
The Android runner verifies airplane/offline, real process restart, saved History,
reconnect/retry and one preserved UUID. Failures remain failures, with diagnostics.
Do not use a personal device: bootstrap intentionally clears app storage.

For iOS, build the existing `native-smoke-ios` EAS simulator profile with Xcode 27
from that same source SHA, record the run URL, version and artifact hash, install
on a disposable simulator, and run `.maestro/bootstrap.yaml`,
`.maestro/enter-game.yaml`, `.maestro/record-match.yaml`, `.maestro/end-match.yaml`,
`.maestro/offline-restart.yaml` and `.maestro/reconnect.yaml` in that order,
each in a separate Maestro invocation against the synthetic fixture
(`node test/native/fixture-api.mjs`). Stop the fixture before `enter-game.yaml`
and restart it before reconnect; iOS simulators have no airplane-mode API.
Retain Maestro JUnit/screenshots and the fixture submission ledger. This iOS
procedure is a pending operator check until its actual build/run evidence is
attached; a build profile alone is not a passed native test. Physical-device
rows above still apply after a simulator pass.

On Android CI, `scripts/prepare-native-android.py` runs before the shared
`record-match.yaml` and `end-match.yaml` Maestro flows. It acknowledges only
Android's known first-use full-screen hint, identified by its Android package and
specific title/button resource IDs, then reads the active window again. It
retains the hint snapshot and rejects disabled or ambiguous confirmations.
Preparation requires the field to be enabled and Start to remain disabled.

Android's `uiautomator dump` CLI waits for global idle and cannot reliably capture
the running match timer. It is used only during static pre-match preparation;
Maestro performs every timed recording, Undo, end-menu, offline and reconnect
assertion. Outpost intake exists in every phase, so the flow does not race the
real Auto timer. Failed idle capture cannot reuse an old snapshot. Each stage
retains its JUnit result and diagnostics.

If CI cannot boot/install, attach its failure and run the same journey on a
physical test device. Record that separate result explicitly. Attach redacted
synthetic screenshots only; never publish real notes, strategy or login tokens.
4 changes: 4 additions & 0 deletions apps/collection/lib/collection/ui/GameAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useFieldRelativeDimensions } from "../useFieldRelativeDimensions";

export const GameAction = ({
onPress,
label,
children,
icon,
color,
Expand All @@ -16,6 +17,7 @@ export const GameAction = ({
iconSize,
}: {
onPress: () => void;
label?: string;
children?: React.ReactNode;
backgroundViewReplacement?: React.ReactNode;
color: string;
Expand All @@ -35,6 +37,8 @@ export const GameAction = ({

return (
<TouchableOpacity
accessibilityRole="button"
accessibilityLabel={label}
onPress={() => {
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
onPress();
Expand Down
12 changes: 9 additions & 3 deletions apps/collection/lib/collection/ui/GameViewTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,15 @@ function GameViewOverlay({
overlay: boolean;
setOverlay: (value: boolean) => void;
}) {
// Remove the modal's native touch targets while it is closed. Opacity only
// changes painting; hidden controls should not remain over the playing field.
if (!overlay) return null;

return (
<Pressable
pointerEvents={overlay ? "auto" : "none"}
disabled={overlay}
accessible={false}
style={{
backgroundColor: "#45454540",
opacity: overlay ? 1 : 0,
position: "absolute",
zIndex: 50,
width: "100%",
Expand Down Expand Up @@ -270,6 +272,8 @@ function OutpostOverlay({
}}
>
<TouchableOpacity
accessibilityRole="button"
accessibilityLabel="Outtake to outpost"
style={{
backgroundColor: "#3EE6794d",
borderRadius: 7,
Expand All @@ -289,6 +293,8 @@ function OutpostOverlay({
<Icon name="download" size={100} color="#3EE679" />
</TouchableOpacity>
<TouchableOpacity
accessibilityRole="button"
accessibilityLabel="Intake from outpost"
style={{
backgroundColor: "#c1c3374d",
borderRadius: 7,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export function DepotIntakeAction() {
})}
>
<GameAction
label="Intake from depot"
onPress={() =>
reportState.addEvent({
type: MatchEventType.Intake,
Expand Down Expand Up @@ -45,6 +46,7 @@ export function NeutralZoneAutoIntakeAction() {
})}
>
<GameAction
label="Intake in neutral zone"
onPress={() =>
reportState.addEvent({
type: MatchEventType.Intake,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export function OutpostAction({
})}
>
<GameAction
label="Open outpost actions"
onPress={() => setOverlay(true)}
color="#C1C337"
icon="flag"
Expand Down
Loading
Loading