fix(flights): airline filter auto-select + UI audit fixes (contrast, TYPE scale, a11y) - #195
Merged
Merged
Conversation
Every schedule fetch permanently adds any airline seen in the data to the airport's airline list. When the user had all airlines selected (the default state), the screen then auto-selected the grown list, so carriers the user does not handle kept appearing on the board. Replace the expansion heuristic with reconcileSelectedAirlines: newly detected airlines stay unchecked in the filter until the user opts in, and keys that disappear from the airport list are pruned from the selection. Also consolidate the three drifted copies of the airline alias table (flightScheduleAdapter, airportSettings, airlineOps) into a single shared airlineAliases module, and add regression tests for the reconciliation and for 3-letter canonical names (SAS, DHL) surviving the raw-code filter. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vEkzMVahsn6d7vyL4xayt
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Light-theme tokens failed WCAG checks when used as text: textMuted 2.39:1, success 2.54, warning 2.15, danger 3.76, info 3.68, inactive tab icons 2.01. Darken the semantic fills to their -600/-700 variants (>=4.5:1 on card and bg), raise textMuted alpha 0.45 -> 0.68 (~4.3:1, matching the dark theme) and tabIconInactive 0.38 -> 0.60 (>=3:1 for icons). Chip backgrounds (*Soft) keep the original bright tints. The dark theme already passed everywhere and is unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vEkzMVahsn6d7vyL4xayt
ShiftScreen is not mounted anywhere (App.tsx routes tabs to HomeScreen for
shifts) and was the only theme-blind screen left; drop it together with its
16 orphaned translation keys. Replace the remaining fontWeight: 'bold'
literals with WEIGHT.semibold ('700', same rendered weight) per the
typography scale rule.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vEkzMVahsn6d7vyL4xayt
…nents Conservative pass, same rules as the first migration: exact size+weight matches and clear roles only (screen/modal titles -> headline, 22/w titles -> title, 16/700 -> subhead, 13/600 -> callout, 12/600 -> caption, 10/800 -> micro). Touches Manuals, Phonebook, Password, Notepad, Traveldoc, ProfileSwitcherModal, UpdateModal, ShiftTimeline. Onboarding, ArionInbox, DrawerMenuPanel, FlightSourceDebugModal and FlightStates keep their intentional heavy-900 operations styling; off-scale sizes (14/17/28) were left inline on purpose. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vEkzMVahsn6d7vyL4xayt
Icon-only touchables (close, edit, delete, call, refresh, steppers, password reveal, webview nav, app-bar back/menu) announced as unnamed buttons under TalkBack: 8 accessibilityLabels across 156 touchables. Add accessibilityRole="button" and localized labels (new a11y* keys in both languages) to all 38 icon-only sites across screens, shared modals and the app bar. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vEkzMVahsn6d7vyL4xayt
Light-theme primary orange is 2.7:1 on card - fine for buttons and large graphics, unreadable as text. primaryText resolves to the dark orange (#C2520A, 4.7:1) in light mode and stays the standard teal in dark mode, so the Operations board look is unchanged. Migrated the 21 text usages (links, active labels, hour totals, onboarding actions); icons and surfaces keep primary. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vEkzMVahsn6d7vyL4xayt
Value-preserving codemod: padding/margin/gap literals already on the 4-based scale (4/8/12/16/20/24/32) and radii on the radius scale (8/12/16/20/999) swapped for SPACING.*/RADIUS.* tokens in 26 files. Off-scale values (10, 14, 18...) left inline on purpose - no rendered pixel changes in this commit. dev/ previews and widget primitives excluded. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vEkzMVahsn6d7vyL4xayt
The widget's shift snapshot (WIDGET_SHIFT_KEY) is written by the app and only covers today and tomorrow. If the app was not opened for more than a day, every periodic widget update resolved to no_shift/error until the next app launch - the widget appeared dead. The widget task now detects a stale snapshot (date != today), re-reads today's and tomorrow's Lavoro/Riposo events straight from the system calendar (permission check only, never a prompt) and rewrites the snapshot, falling back to the old behavior on any error. Covered by a regression test with mocked calendar/storage; the test loader now transpiles JSX so widget modules can be tested. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vEkzMVahsn6d7vyL4xayt
The week view was locked to the week of the selected day. Add prev/next week arrows around the range label; navigation moves the selected day by 7 days and re-anchors the visible month so events for the new range load automatically. Localized a11y labels included. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vEkzMVahsn6d7vyL4xayt
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vEkzMVahsn6d7vyL4xayt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
Three work streams, one commit per concern (all individually revertable):
1. Flight filter fix (
b736589) — fixes "I keep seeing flights I don't handle": every schedule fetch permanently adds any airline seen in provider data to the airport's airline list, andFlightScreen.fetchAllauto-selected the grown list whenever the user had all airlines selected (the default). Newly detected carriers now stay unchecked until the user opts in (reconcileSelectedAirlines, pure + tested). Also consolidates the three drifted airline-alias tables into a sharedsrc/utils/airlineAliases.ts.2. UI audit fixes (follow-up commits from a static design audit):
2460066Light-theme WCAG contrast: semantic fills darkened to their -600/-700 variants,textMutedalpha 0.45→0.68 (~4.3:1, matching dark theme), inactive tab icons 0.38→0.60 (≥3:1). Chip backgrounds (*Soft) unchanged; dark theme already passed everywhere.3491442Dead code: removed unmounted, theme-blindShiftScreen(+16 orphaned translation keys); replaced remainingfontWeight: 'bold'literals withWEIGHT.semibold.ca814cfTYPE scale: conservative migration extended to Manuals, Phonebook, Password, Notepad, Traveldoc, ProfileSwitcherModal, UpdateModal, ShiftTimeline.6f7d0c0Accessibility: all 38 icon-only touchables now haveaccessibilityRole="button"+ localizedaccessibilityLabel(newa11y*keys in IT and EN); labels went from 8 to 46.01339dbprimaryText token: light-theme primary orange stays for buttons/icons/surfaces; the 21 brand-colored text usages now useprimaryText(#C2520A, 4.7:1 in light; unchanged teal in dark).cc0dd7bSPACING/RADIUS adoption: value-preserving codemod across 26 files; no rendered pixel changes.3. Widget reliability + week navigation:
4a75713Widget self-heal: the widget's shift snapshot only covers today/tomorrow and was written by the app — if the app wasn't opened for over a day, every periodic update resolved to no_shift/error and the widget looked dead until the next launch. The widget task now detects a stale snapshot and re-reads today's/tomorrow's Lavoro/Riposo events directly from the system calendar (permission check only, never a prompt), falling back to the old behavior on any error. Regression-tested with mocked calendar/storage (test loader now transpiles JSX).0acf9d6Week navigation: the calendar week view was locked to the selected day's week; prev/next arrows now move week by week, re-anchoring the visible month so events load for the new range.Checklist
npm testsuite green, incl. new regression tests for filter reconciliation and widget self-heal; widget theme sync verified)Screenshot or Video
Not run on emulator in this session (no Android emulator in the cloud container). Contrast retune,
primaryText, TYPE migration and the new week-nav row are visible changes — worth an emulator pass (npm run qa:emulator) before release.Review Notes
reconcileSelectedAirlinesintentionally never auto-adds airlines; "select all" remains available in the filter sheet.🤖 Generated with Claude Code
https://claude.ai/code/session_012vEkzMVahsn6d7vyL4xayt