diet-guard/app/test/services
Krzysztof kuhy Rudnicki c77e7d9acf Split the last four Dart lib files; file-length gate now reports zero
Final batch of the 250-line sweep. `check_file_length.sh --all` exits 0: every
file in the repo is at or under 250 lines.

  github_mirror_screen.dart  391 -> 205  (+ actions, client_id_dialog parts)
  foodbank_service.dart      314 -> 209  (+ foodbank_service_manual part)
  settings_screen.dart       286 -> 237  (+ settings_kcal_goal part)
  firebase_backend.dart      282 -> 100  (+ firebase_client.dart)

Three of the four are `part` files rather than separate libraries, and that is
forced rather than stylistic: the moved code drives private state
(`_busy`, `_status`, the text controllers) and calls private helpers
(`_readBank`, `_normalize`), none of which are visible across a library
boundary in Dart. Widening them to public just to split a file would leak
internals the rest of the app has no business calling.

Within those parts, mixins rather than extensions, for a concrete reason: an
extension is not a subclass of `State`, so calling `setState` from one is an
`invalid_use_of_protected_member`. Fields the State must own (the controllers
it creates and disposes) stay declared there and are reached through abstract
getters.

`firebase_client.dart` is a real library split -- opening an authenticated
client has no private coupling to the keystore-backed account record, only to
its public API. The one exception, dropping the account marker without setting
the opt-out flag, became `forgetAccountMarker()` rather than exposing the
secure store.

Verified: flutter test 555 (unchanged), flutter analyze clean, 707 Python
tests / 100% branch coverage, check_patch_targets 0, pre-commit clean,
check_file_length.sh --all exit 0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RA9ynjqXPnexRQnR5oAuCC
2026-08-15 21:07:24 +02:00
..
app_settings_service_sync_test.dart Split the remaining seven Dart test files 2026-08-15 20:53:55 +02:00
app_settings_service_test.dart Split the remaining seven Dart test files 2026-08-15 20:53:55 +02:00
average_service_periods_test.dart Split the remaining seven Dart test files 2026-08-15 20:53:55 +02:00
average_service_test.dart Split the remaining seven Dart test files 2026-08-15 20:53:55 +02:00
background_sync_service_test.dart Make the phone publish on every tick, and fail closed on Firebase errors 2026-08-10 14:35:37 +02:00
budget_history_service_test.dart Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
budget_schedule_test.dart Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
day_status_service_streaks_test.dart Split the remaining seven Dart test files 2026-08-15 20:53:55 +02:00
day_status_service_test.dart Split the remaining seven Dart test files 2026-08-15 20:53:55 +02:00
due_slot_check_test.dart Make the phone publish on every tick, and fail closed on Firebase errors 2026-08-10 14:35:37 +02:00
foodbank_service_manual_test.dart Split six Dart test files; share the sync fixtures via a support sibling 2026-08-15 20:49:54 +02:00
foodbank_service_test.dart Split six Dart test files; share the sync fixtures via a support sibling 2026-08-15 20:49:54 +02:00
fuzzy_test.dart Add food bank, edit-entry, and app settings screens; history redesign 2026-07-04 05:18:32 +02:00
indexeddb_stores_test.dart Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
log_storage_service_edit_test.dart Split six Dart test files; share the sync fixtures via a support sibling 2026-08-15 20:49:54 +02:00
log_storage_service_test.dart Split six Dart test files; share the sync fixtures via a support sibling 2026-08-15 20:49:54 +02:00
notification_service_test.dart app: run the companion app's desktop target as a web build 2026-07-20 16:31:32 +02:00
sync_device_id_test.dart Push under a persisted per-install uuid, not a fixed role id 2026-08-09 17:18:42 +02:00
sync_health_test.dart Make the phone publish on every tick, and fail closed on Firebase errors 2026-08-10 14:35:37 +02:00
sync_merge_banks_test.dart Split six Dart test files; share the sync fixtures via a support sibling 2026-08-15 20:49:54 +02:00
sync_merge_budget_test.dart Split six Dart test files; share the sync fixtures via a support sibling 2026-08-15 20:49:54 +02:00
sync_merge_curated_test.dart Split six Dart test files; share the sync fixtures via a support sibling 2026-08-15 20:49:54 +02:00
sync_merge_test.dart Split six Dart test files; share the sync fixtures via a support sibling 2026-08-15 20:49:54 +02:00
sync_merge_wire_test.dart Split six Dart test files; share the sync fixtures via a support sibling 2026-08-15 20:49:54 +02:00
sync_service_budget_test.dart Split six Dart test files; share the sync fixtures via a support sibling 2026-08-15 20:49:54 +02:00
sync_service_test_support.dart Split six Dart test files; share the sync fixtures via a support sibling 2026-08-15 20:49:54 +02:00
sync_service_test.dart Split six Dart test files; share the sync fixtures via a support sibling 2026-08-15 20:49:54 +02:00
sync_settings_test.dart Point sync at the consolidated utils/syncs monorepos 2026-07-10 14:12:16 +02:00
sync_state_factory_test.dart Split the last four Dart lib files; file-length gate now reports zero 2026-08-15 21:07:24 +02:00