Read this first in every Codex/agent session. It exists to avoid rediscovering the same workflow.
- Work from
C:\Users\turni\Documents\Progetti Antigravity\FlightWorkApp-flight-fixunless the user explicitly says otherwise. - Run
git status --short --branchbefore editing. - Do not modify or clean
C:\Users\turni\Documents\Progetti Antigravity\FlightWorkAppunless explicitly asked; it may contain user edits on an old branch. - Prefer the branch
codex/design-lab-storybookfor ongoing work. - Read this file and
docs/release-automation.mdbefore release/APK work.
For bugs and product fixes:
- Reproduce or trace the data flow first. Do not guess.
- Add or update a small regression test when possible.
- Make the smallest fix that addresses the root cause.
- Run the relevant checks.
- Commit and push when the user asked for implementation or when the fix should persist on GitHub.
- Do not release unless the user says release, APK, pubblica, or similar.
Useful checks:
npm test
npm run typecheck
npm run release:checkFor flight-provider bugs, start with:
npm run test:flight-helpersWhen the user says to release, use the automated flow:
npm run release:quickThis bumps patch version, runs release checks, runs the full test suite, runs TypeScript, commits, pushes, triggers the GitHub APK release workflow, waits for it, downloads/verifies the APK, and copies it to Downloads.
Before release work, run:
npm run dev:doctorTo verify an existing GitHub release APK:
npm run release:verify -- vX.Y.ZTo verify and install on a connected emulator/device:
npm run release:verify -- vX.Y.Z --installFull release docs: docs/release-automation.md.
If the local Windows runner is configured and the user wants the faster PC build, use:
npm run release:quick -- --local-runnerThe local runner must be a GitHub self-hosted Windows x64 runner with the custom label aerostaff. Initial setup helper:
npm run runner:setup -- -StartCurrent PC autostart helper, no admin required:
npm run runner:setup -- -InstallStartupTask -StartKeep the runner root short (C:\gha, work _w) or native Android/CMake builds can hit Windows path length limits.
Use this when the user asks to debug with the emulator, inspect UI regressions, or verify an APK in a realistic Android runtime:
npm run qa:emulatorUseful variants:
npm run qa:emulator -- --install-release v2.6.66
npm run qa:emulator -- --install-apk C:\path\to\AeroStaffPro.apkWhat the script does:
- Starts
Medium_Phone_API_36.1headlessly when no ADB device is connected. - Optionally installs a GitHub release or local APK.
- Launches
com.aerostaffpro.app, accepts the calendar permission prompt if shown, opens Home and Voli. - Saves screenshots, UI dumps, and filtered logcat under
tmp/emulator-qa. - Fails with exit code
2when it detects inverted visible time ranges such as22:48 – 21:10.
When fixing emulator-discovered UI issues, capture the failing evidence first, add a focused regression test where possible, then rerun the relevant checks before committing.
- Release APKs must come from GitHub Actions because the valid release signing key is stored in GitHub secrets.
- Do not trust locally named release/debug keystores for publishing unless the user explicitly verifies them.
- If Android refuses to update even with install permissions enabled, compare APK signing certificates first.
- If the in-app updater cached a bad APK for a version, publish a new patch version so the app downloads a fresh asset.
- Provider mode
autoshould not stop at thin live data. FR24 API live positions are useful overlays, not a complete airport schedule. - StaffMonitor PSA is the best operational fallback for Pisa day-of data.
- AeroDataBox is preferred for schedule coverage, especially today/tomorrow.
- AirLabs burns quota quickly; keep it late in automatic fallback order unless the user asks otherwise.
- Keep provider keys user-configurable in-app; never hardcode keys.
- When debugging missing flights, inspect provider diagnostics and counts for today/tomorrow before changing UI code.
npm run dev:doctor
npm run test:flight-helpers
npm test
npm run typecheck
npm run release:check
npm run release:verify -- vX.Y.Z --no-copy
npm run qa:emulator
npm run github:branches:audit- Keep feature/experiment branches short-lived.
- Do not delete or reset branches with user work unless explicitly asked.
- When asked for GitHub cleanup, audit first with
npm run github:branches:audit. - Never commit local logs, keystores, downloaded APKs, API keys, or temp files.
- App name is
AeroStaff Pro; remove oldFlightWork Appnaming when found. - The shipped app is not an AI app. Claude/Codex are development tools only.
- The user prefers practical Italian updates, concise summaries, GitHub Releases APKs, and quick iteration.
- Use warm, direct language. Keep final answers short unless the user asks for depth.