Open official airport web forms prefilled (EGTF book-out, PPR, out-of-hours) - #16
Conversation
…-out, PPR, out-of-hours)
Some airports take movements through their own web pages rather than a
document. A new `web_form` mapping type describes such a page, and
POST /prefill answers with a fill plan: the page URL plus a value per
input, keyed by the input's name (so the same plan can drive a direct
submission later). The app opens the official page in a web view,
applies the plan with a generic script, and the pilot submits on the
airport's own site.
- RedAtlas book-out and PPR as one mapping each ({site} URL template),
so other RedAtlas airports are an ICAO-list entry away
- Fairoaks out-of-hours departure/arrival (Elementor, local UK time)
- Book-out return details from the first later flight back to the
airport (new optional return_flight on the request)
- Forms can be pinned to a direction; web forms are only listed for
clients sending include_web, so older builds never see them
- pdf_filler's canonical values move into build_values(), shared with
the fill plans (no change to generated documents)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P3XXAkHdDjdoisPWZqmGaB
ReviewWent through the diff (Swift One correctness issue worth a look: Return-flight lookup can silently skip a valid candidate — ```swift
Nothing else stood out — the direction validation ( 🤖 Generated with Claude Code |
Summary
Some airports take movements through their own web pages — EGTF (Fairoaks) now wants a book-out, a PPR, and an out-of-hours form. Rather than submitting on the pilot's behalf, the app opens the official page prefilled from the flight; the pilot checks it and taps the site's own Submit.
web_formmapping type +POST /prefill: returns a fill plan (page URL + a value per input, keyed by the input'sname). Keying by name means the same plan can drive a direct server-side submission later.redatlas_bookout/redatlas_ppr(one mapping per RedAtlas form,https://{site}.redatlas.co.uk/...— other RedAtlas airports are anicao_listentry away; per-airport extra questions viaairport_fields),egtf_ooh_departure/egtf_ooh_arrival(Elementor, scoped to the right form on the shared page).return_flight,has_return_flightflag). Separate from the connecting-flight search, which looks back for a departure.GET /airports/{icao}?include_web=true;/airportsnever lists them, so older app builds are unaffected./generaterefuses web forms,/prefillrefuses documents.WebFormView(WKWebView, iOS + macOS). A banner reports filled fields and flags any not found on the page; Fill Again re-applies.pdf_filler's canonical values move intobuild_values(), shared with fill plans — generated documents are unchanged (all snapshots pass).Testing
pytest: 182 passed. 2 failures are pre-existing onmainand unrelated (TestPdfFillerLSGS::test_output_flattened,TestFrenchCustomsFiller::test_flattened).tests/unit/test_web_form.py+/prefillintegration tests.Notes
form_fields[field_…]) are generated and change if the form is rebuilt; the app flags fields it can't find.🤖 Generated with Claude Code
https://claude.ai/code/session_01P3XXAkHdDjdoisPWZqmGaB