Skip to content

v4.46.0 - #828

Merged
rzueger merged 1 commit into
masterfrom
develop
Jul 20, 2026
Merged

v4.46.0#828
rzueger merged 1 commit into
masterfrom
develop

Conversation

@rzueger

@rzueger rzueger commented Jul 20, 2026

Copy link
Copy Markdown
Member

No description provided.

## What & why

Logging a movement means re-typing the same aerodrome ICAO codes into
the
destination/origin field every time. Aircraft already have profile-based
quick-picks; aerodromes had nothing. This adds a quick-pick chip bar
under
the destination/origin field in both the departure and arrival wizards.

## Two complementary parts

**1. Home aerodrome first — for everyone (incl. guests / kiosk)**
The most common `location` at a small field is the field itself
(circuits /
local flights). `__CONF__.aerodrome.ICAO` is pinned as the first chip
and
sorted first in the aerodrome dropdown. It's labelled **"local flight"**
(the
app's own `routes.localFlight` term), not "home" — a house icon would
clash
with the existing "home base = aircraft based here" concept and mislead
visiting pilots whose base is elsewhere.

**2. Personal most-frequent destinations — for logged-in pilots**
Derived from the pilot's own movements, keyed on `createdBy` (their
email):

- **Regular users**: computed client-side from the already-loaded
`state.movements` (which is bounded to their own `createdBy`) — **no
extra
  Firebase read**.
- **Admins / `allMovements` operators**: their loaded list is club-wide,
so
filtering it by their email can return nothing even though their
movements
exist further down (the "row 51" problem). They instead do one bounded,
  session-cached fetch via the existing `createdBy_orderKey` index.

## Freshness

An aerodrome just flown to is recorded on `SAVE_MOVEMENT_SUCCESS` and
shown
immediately (first) in the next form — no dependency on the
movement-list
realtime listener, which previously meant a new destination only
appeared
after a full page reload.

## Layout

Chips render in a new `LabeledComponent` `footer` slot, so they sit
inside the
destination field and share its width without inheriting the input
styling.
Shared chip styling was extracted from `AircraftPage` into
`QuickPickBar`.

## Cost

Zero additional hosting cost for the common case (regular users reuse
already-downloaded data); only the few admin sessions issue one small
bounded,
cached read. No new Firebase index, Cloud Function, or stored data.

## Scope / limitations

- Personal list applies on email-login projects (movements carry
`createdBy`);
  elsewhere only the home chip shows. Gated by `profileEnabled`.
- Attribution keys on the email a movement was filed under.

## Tests

Specs added for the dropdown comparator, aggregation helper, reducer
(incl.
session recording), admin fetch saga, selector
(regular/admin/session/home/
guest), the component (render/click/guest/readOnly + fetch behaviour),
and the
`LabeledComponent` footer slot.

Note: Jest was not run in the authoring sandbox (platform-mismatched
`node_modules` vs Jest 30's native resolver); `npm run typecheck` passes
and
CI runs the suites.
@rzueger
rzueger merged commit 5318acb into master Jul 20, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant