Skip to content

fix(flights): airline filter auto-select + UI audit fixes (contrast, TYPE scale, a11y) - #195

Merged
TargetMisser merged 10 commits into
mainfrom
claude/aerostaff-pro-code-limits-8rhhx2
Jul 3, 2026
Merged

fix(flights): airline filter auto-select + UI audit fixes (contrast, TYPE scale, a11y)#195
TargetMisser merged 10 commits into
mainfrom
claude/aerostaff-pro-code-limits-8rhhx2

Conversation

@TargetMisser

@TargetMisser TargetMisser commented Jul 2, 2026

Copy link
Copy Markdown
Owner

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, and FlightScreen.fetchAll auto-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 shared src/utils/airlineAliases.ts.

2. UI audit fixes (follow-up commits from a static design audit):

  • 2460066 Light-theme WCAG contrast: semantic fills darkened to their -600/-700 variants, textMuted alpha 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.
  • 3491442 Dead code: removed unmounted, theme-blind ShiftScreen (+16 orphaned translation keys); replaced remaining fontWeight: 'bold' literals with WEIGHT.semibold.
  • ca814cf TYPE scale: conservative migration extended to Manuals, Phonebook, Password, Notepad, Traveldoc, ProfileSwitcherModal, UpdateModal, ShiftTimeline.
  • 6f7d0c0 Accessibility: all 38 icon-only touchables now have accessibilityRole="button" + localized accessibilityLabel (new a11y* keys in IT and EN); labels went from 8 to 46.
  • 01339db primaryText token: light-theme primary orange stays for buttons/icons/surfaces; the 21 brand-colored text usages now use primaryText (#C2520A, 4.7:1 in light; unchanged teal in dark).
  • cc0dd7b SPACING/RADIUS adoption: value-preserving codemod across 26 files; no rendered pixel changes.

3. Widget reliability + week navigation:

  • 4a75713 Widget 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).
  • 0acf9d6 Week 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

  • I tested the main behavior (full npm test suite green, incl. new regression tests for filter reconciliation and widget self-heal; widget theme sync verified)
  • I verified that typecheck passes
  • I updated any relevant documentation (no docs affected)
  • I checked possible Android / Wear OS impact (widget task now reads the system calendar in the headless context — guarded by permission check + try/catch with fallback to previous behavior; theme snapshot flow unchanged)

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

  • reconcileSelectedAirlines intentionally never auto-adds airlines; "select all" remains available in the filter sheet.
  • Widget self-heal only runs when the stored snapshot date ≠ today, so the normal app-driven flow is untouched; if calendar permission is missing the widget behaves exactly as before.
  • Onboarding, ArionInbox, DrawerMenuPanel, FlightSourceDebugModal, FlightStates keep their intentional heavy-900 styling; off-scale sizes (14/17/28) left inline on purpose.
  • DrawerMenuPanel/AppTabBar keep their per-component palettes; promoting them to global theme tokens is a design decision left out of this PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_012vEkzMVahsn6d7vyL4xayt

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
@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flight-work-app Ready Ready Preview, Comment, Open in v0 Jul 3, 2026 11:49am

claude added 4 commits July 2, 2026 12:15
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
@TargetMisser TargetMisser changed the title fix(flights): stop auto-selecting newly detected airlines in the filter fix(flights): airline filter auto-select + UI audit fixes (contrast, TYPE scale, a11y) Jul 2, 2026
claude added 2 commits July 3, 2026 04:06
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
claude added 2 commits July 3, 2026 11:46
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
@TargetMisser
TargetMisser marked this pull request as ready for review July 3, 2026 11:49
@TargetMisser
TargetMisser merged commit 94e078f into main Jul 3, 2026
3 checks passed
@TargetMisser
TargetMisser deleted the claude/aerostaff-pro-code-limits-8rhhx2 branch July 3, 2026 11:50
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.

2 participants