Skip to content

Claude/fix shift permissions cn8gk#100

Open
TargetMisser wants to merge 74 commits intomainfrom
claude/fix-shift-permissions-Cn8gk
Open

Claude/fix shift permissions cn8gk#100
TargetMisser wants to merge 74 commits intomainfrom
claude/fix-shift-permissions-Cn8gk

Conversation

@TargetMisser
Copy link
Copy Markdown
Owner

What Changed

Describe the outcome of the change in a few lines.

Checklist

  • I tested the main behavior
  • I verified that typecheck passes
  • I updated any relevant documentation
  • I checked possible Android / Wear OS impact

Screenshot or Video

If the change affects UI or UX, attach something here.

Review Notes

Call out sensitive areas, open questions, or review focus points here.

claude added 8 commits April 16, 2026 17:42
- Remove release-snapshot.yml (was creating main-XX junk prereleases on every push to main)
- Remove build-apk.yml (was creating duplicate versioned prereleases on every push to main)
- Rewrite build-release.yml: single tag-triggered workflow using proven Gradle/NDK build config from build-apk.yml, creates proper non-prerelease on v* tags only
- Bump app.json version 1.3.5 → 1.3.6 to match build.gradle

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
Adds branch trigger so the workflow fires immediately on push,
computing tag from app.json version (v1.3.6). Reverts to tag-only
after this release is created.

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
Each airport now has its own list of airlines to monitor:
- Added Ryanair, Volotea, Vueling, Transavia to AIRLINE_OPS and AIRLINE_COLORS
- Added AIRPORT_AIRLINES map in airportSettings.ts (PSA/FCO/CIA/MXP/LIN/BGY/BLQ/VCE/FLR/NAP/CTA/PMO)
- Added getAirportAirlines() — returns airport-specific list, falls back to ALLOWED_AIRLINES
- filterAirlines() in fr24api.ts now uses the airport-specific list
- Widget handler uses getAirportAirlines() instead of global ALLOWED_AIRLINES

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
The filter modal now shows a scrollable checklist of all airlines
for the selected airport. Each row has a colored dot, airline name,
and checkbox. A "Select all / Deselect all" button at the top lets
the user reset quickly. Selection is persisted to AsyncStorage.
Filter button turns orange when any airline is deselected.

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
FR24 removes flights from its schedule endpoint once they depart/arrive.
Instead of replacing state on each refresh, merge fresh data with a
daily AsyncStorage cache using flight ID as dedup key. Fresh data
overrides stale entries (updates status/times), but flights absent
from FR24 are kept until the date changes at midnight.

Cache is pre-loaded on app open so flights show immediately before
the first fetch completes.

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
Instead of hardcoded column indices (which break when Pisa Airport
adds/moves columns), the parser now scans the header row for
recognisable keywords (volo/flight, stand, check/ci, gate, belt/nastro)
and builds the column map dynamically. Falls back to the old indices
if no header row is detected.

Also rejects cell values that look like phone numbers (6+ digits or
>15 chars) to prevent junk like contact numbers leaking into pills.

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 16, 2026

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 Apr 21, 2026 11:31am

FlightScreen: smFooter is now always visible on every flight card.
Shows Stand / Check-in / Gate (departures) or Stand / Belt (arrivals)
with '—' when staffMonitor data is not yet available.

Widget: added stand/banco/uscita row (row 3) to FlightRow, always
visible with '—' as placeholder. FlightScreen populates the values
via staffMonitorDepsRef when pushing widget data.

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
Replaces the per-build keytool generation (which produced a different
signature every time) with a fixed keystore decoded from the
KEYSTORE_BASE64 GitHub Secret. This ensures every APK is signed with
the same key, allowing over-the-air updates without reinstalling.

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
Cards in light theme used semi-transparent white backgrounds with a
more-opaque white glassBorder, creating faint inner outlines against
the gray page background. Switching to fully opaque card colors and
transparent glassBorder eliminates the effect entirely.

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
- Move smFooter inside the card View so border-radius/overflow applies
  and it visually connects to the card body
- Change cardBody from row to column layout so CI/Gate badges take
  full width and the Scheduled/Estimated pill sits on its own row,
  right-aligned, with proper spacing from the ops badges

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
Same cause as light mode: glassBorder was rgba(255,255,255,0.13)
which created visible rectangular outlines around cards on the
near-black background.

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
White airplane + dark badge with checkmark on orange background.
Updated all icon variants: icon.png (1024×1024), adaptive foreground,
background and monochrome. Set adaptiveIcon backgroundColor to #F47B16.

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
Inject CSS filter invert+hue-rotate when the app is in dark mode,
re-invert images/video so they stay colour-correct. WebView background
is also set to #111 to avoid a white flash during load.

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
Replace all mipmap WebP files (mdpi→xxxhdpi) with the new icon:
launcher, round, adaptive foreground/background, monochrome.

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
Semi-transparent card colors (rgba(255,255,255,0.07)) caused alpha
blending artefacts at rounded corners that looked like inner borders.
Switched to solid opaque equivalents (#1C1C1E / #2C2C2E).

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
- package.json was still on 1.1.0 causing drawer to show wrong version
- Replace programmatic AeroIconMark with the actual app icon PNG in the
  drawer header so it matches the launcher icon

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
detectColumns was returning null when the flight header was found but
none of the stand/checkin/gate/belt column names matched our keywords.
This caused parseSection to call detectColumns on every data row too
(always null), skipping all rows and parsing zero flights.

Fix: remove the guard that required at least one operational column.
A valid flight header alone is enough to establish the colMap; any
columns that don't match simply remain undefined (showing — in UI).
Also widened keywords for Italian variants (posiz, piazzola, imbarco,
bancone, reclam) and added console.warn so column layout is visible
in adb logcat.

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
getWidgetData was falling through to return the stale WIDGET_CACHE_KEY
value when WIDGET_SHIFT_KEY dated today. If the cache said 'rest' but
the shift key said isRestDay=false (e.g. yesterday was rest, today has
a shift), the widget kept showing "Giorno di riposo".

Fix: make WIDGET_SHIFT_KEY the authoritative source for today's
work/rest classification. The cache is now only used for flight data
(work/work_empty states). Any conflict between cache and shift key
resolves in favour of the shift key.

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
- isPhoneOrJunk now catches 'Albe 3284693677' style values (any 8+
  consecutive digits in the string, not just pure-digit strings)
- standH keyword uses word-boundary match (\bstand\b) so columns like
  'ADDETTO STAND' or 'STANDBY' no longer pollute the stand field

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
- FlightScreen: when a Lavoro calendar event is found for today,
  clear isRestDay — prevents a stale Riposo event from hiding a
  real shift that was added/updated later
- staffMonitor: store detected column map in _lastDebugColumns
- SettingsScreen: 'Debug StaffMonitor' row shows fetch status and
  detected column names in an Alert so we can see the actual headers

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
- Add setInterval(fetchAll, 2min) so status, departure times, and
  estimated arrivals update automatically without pull-to-refresh
- Fix flightKey to use flightNumber_scheduledTs instead of
  identification.id, which FR24 sometimes omits — this was causing
  cached and fresh versions of the same flight to have different keys,
  leaving stale status visible in the UI

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
Adds first 5 parsed departures (flightNumber, stand, checkin, gate)
to the StaffMonitor debug alert in Settings, so we can verify whether
the values are empty in the server data or just not matching FR24.

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
- Updates: dedicated card with icon, version label, 'Controlla'
  pill button and full-width 'Scarica' button when update is available
- Backup: two side-by-side tiles (green upload / blue download) instead
  of plain list rows

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
Pisa StaffMonitor cells contain extra data after the value:
- "17◆ Federico" → should extract "17"
- "674 RICCARDO F" → should extract "674"
- "FEDE 658" (no stand, just handler) → should return undefined

New logic: take only the leading alphanumeric/hyphen token from each
cell; reject pure-letter tokens of 4+ chars (handler names, not codes).

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
- cell(): reject pure-letter codes of 3+ chars (was 4+) to catch
  short handler abbreviations like 'ana'
- Debug: track D and A flights separately; getStaffMonitorDebugFlights()
  now shows first 5 flights for both departures and arrivals

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
…for today

Calendar .find() returned the first match, so a stale Riposo event earlier
in the list silently won over a valid Lavoro entry. Now Lavoro is always
preferred; Riposo is only used when no work shift is found.

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
…timeout

Arrivals (nature=A) was always timing out (AbortError) waiting 20s × 3 URLs
sequentially. New approach:
- Race 9 URLs simultaneously (3 primary + 6 alternative param variants);
  fastest winner resolves in ≤22s instead of worst-case 60s+
- If all specific URLs fail, try 3 combined pages (no nature filter) and
  extract the arrivals <table> section using keyword scoring
- AsyncStorage cache (20-min TTL): any successful result is stored and
  returned on subsequent failures — arrivals data survives network hiccups
- Departures unchanged in behaviour but now use shared tryFetch helper (12s)

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
…lback URLs

- D regression: 12s timeout was too short for the slow Pisa server (was 20s
  before); raised to 25s so departures stop failing with AbortError
- A garbage numbers: alternative URLs like ?type=A and ?inbound=true don't
  include nature=A, so the server returns departures data which gets mis-parsed
  as arrivals (AF5G0166, 90IG0186, etc.); removed all non-nature=A variants
- Arrivals now race only nature=A URLs (7 total) with 30s timeout
- Combined-page fallback also removed as it caused the same wrong-data issue
- Cache fallback still in place for both D and A

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
The arrivals servlet likely requires an active session. Previously every
fetch() was stateless — no cookies sent or stored. Now:
- captureSessionCookie() extracts JSESSIONID from Set-Cookie response headers
- tryFetch() includes the stored cookie in all subsequent requests
- Before racing arrivals URLs, a quick D request primes the session if no
  cookie is present yet (so A always runs with a valid JSESSIONID)
- Arrivals parallel-race timeout raised 30s → 40s for extra headroom
- Debug status now shows cookie=yes/no to confirm whether session was used

https://claude.ai/code/session_01BMGHvh4H3rx7bz4Zh8opu4
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