fix: anchor check-in and gate closure times to scheduled departure - #194
Conversation
Closure times (check-in open/close, gate open/close) must be computed from the scheduled departure time (STD) so they never drift when a flight is delayed. Previously getBestDepartureTs was used, which follows the real/estimated time and would silently shift all closure timestamps whenever an ETD update arrived. Changes: - FlightScreen widget: filter and map now use getScheduledFlightTs for closure time overlap checks and ciOpen/ciClose/gateOpen/gateClose values; departureTs/departureTime still use ETD for correct display. - autoNotifications: closure notification timestamps (CI open/close, gate open/close) computed from STD; departure display text still shows ETD. - flightNotificationScheduler: pinned closure-phase notifications use STD as base; only the pinned_departure phase keeps ETD. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwhK5jVxWTojXNS8qTQ4D3
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwhK5jVxWTojXNS8qTQ4D3
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 850bd9dced
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "name": "AeroStaff Pro", | ||
| "slug": "AeroStaffPro", | ||
| "version": "2.7.28", | ||
| "version": "2.7.29", |
There was a problem hiding this comment.
Sync package version with native bump
This bumps Expo/Android to 2.7.29 while package.json, README.md, and src/utils/updateChecker.ts remain at 2.7.28 in this commit. scripts/release-check.cjs requires app.json and Android versionName to match package.json, so the release check will fail, and UI paths that import package.json still show the old version.
Useful? React with 👍 / 👎.
| const depTs = getBestDepartureTs(item); | ||
| if (!depTs || isNaN(depTs)) continue; | ||
| const etdTs = getBestDepartureTs(item); | ||
| const stdTs = getScheduledFlightTs(item, 'departure') ?? etdTs; |
There was a problem hiding this comment.
Select closure notifications by scheduled time
Because shiftDepartures is still built from getBestDepartureTs above, this new scheduled-time anchoring never runs for a delayed departure whose ETD moves after the shift even though its STD-based CI/gate close warnings fall during the shift. In that scenario the startup scheduler silently skips all CI/gate notifications for the flight; filter departures by the scheduled/ops overlap before scheduling these STD-based warnings.
Useful? React with 👍 / 👎.
Problema
Gli orari di chiusura check-in e gate venivano calcolati usando
getBestDepartureTs, che restituisce il tempo reale/stimato (ETD). Di conseguenza, se un volo ritardava, tutti gli orari di chiusura si spostavano insieme all'ETD — comportamento errato dal punto di vista operativo.Soluzione
Gli orari di chiusura (check-in open/close, gate open/close) devono essere ancorati al tempo schedulato (STD) e non cambiare mai in caso di ritardo. Solo l'orario di partenza effettivo (per la visualizzazione e la notifica di partenza) continua a usare l'ETD.
Modifiche
FlightScreen.tsx— widget: filter e map usanogetScheduledFlightTsper il calcolo dell'overlap sui tempi di chiusura e per i valoriciOpen/ciClose/gateOpen/gateClose;departureTsedepartureTimecontinuano a usare l'ETD.autoNotifications.ts: i timestamp delle notifiche di chiusura (CI apre/chiude, gate apre/chiude) sono calcolati dallo STD; il testo "partenza alle…" nel corpo notifica mostra comunque l'ETD.flightNotificationScheduler.ts: le fasi del volo pinnato relative alla chiusura usano STD come base; solo la fasepinned_departureusa l'ETD.Test plan
Generated by Claude Code