wake-alarm/phone_app
Krzysztof kuhy Rudnicki b9abbf7043 phone_app: use the shared github_device_auth package
The inline `_DeviceCodeDialog` (86 lines) was byte-for-byte identical to
diet-guard's, and `services/github_device_auth.dart` was a fourth copy of
the auth client. Both now come from `github_device_auth` in the
kuhyx/utils monorepo.

This app's client was not merely a drifted copy -- it carried a fix the
other three lacked: `pollForToken` swallowed a transient socket failure and
kept polling, because GitHub can close the connection at the exact moment
the user authorizes. Extracting todo's version would have silently deleted
that. The package took this behaviour instead, so the fix now protects all
four apps rather than just this one.

It is expressed as `on http.ClientException` rather than the local
`SocketException` arm, because the package is also imported by
diet-guard's **web** build where `dart:io` will not compile. Verified that
nothing is lost: package:http wraps a dead socket as
`_ClientSocketException`, which implements both types.

19 tests pass, analyze clean, and the release APK is installed on the
phone and launching.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U4Rj3s7K2qzrLNgJqqPhno
2026-08-15 16:16:17 +02:00
..
android Build and publish a signed APK on every push to main 2026-08-04 20:55:04 +02:00
assets/icon Bump gatelock pin to released v0.1.1, regenerate launcher icon 2026-07-21 21:18:02 +02:00
lib phone_app: use the shared github_device_auth package 2026-08-15 16:16:17 +02:00
test phone_app: migrate Sync settings to the shared sync_settings_ui package 2026-08-14 11:29:32 +02:00
.gitignore Add wake_alarm_sync phone-side Flutter companion app 2026-07-10 23:16:11 +02:00
.metadata Add wake_alarm_sync phone-side Flutter companion app 2026-07-10 23:16:11 +02:00
analysis_options.yaml phone_app: use the shared github_device_auth package 2026-08-15 16:16:17 +02:00
pubspec.lock phone_app: use the shared github_device_auth package 2026-08-15 16:16:17 +02:00
pubspec.yaml phone_app: use the shared github_device_auth package 2026-08-15 16:16:17 +02:00
README.md Add wake_alarm_sync phone-side Flutter companion app 2026-07-10 23:16:11 +02:00

wake_alarm_sync

A new Flutter project.

Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.