todo-app/lib/sync
Krzysztof kuhy Rudnicki 9d2aa1c178 Enforce the 250-line file cap, and split the first four files
Wires the shared gate (~/utils/scripts/check_file_length.sh) into a new
.pre-commit-config.yaml as a local hook, checking only the files in the
commit and failing rather than warning. No baseline, no allowlist.

The repo had a hand-written .git/hooks/pre-commit running two checks;
both are ported verbatim into the config rather than dropped, with the
version bump ordered last so it cannot rewrite pubspec.yaml for a commit
a gate is still about to reject. scripts/install_hooks.sh now installs
pre-commit (and removes the legacy hook) instead of writing its own.

.github/workflows/file-length.yml runs the same check on push, kept
separate from release-apk.yml so an over-long file fails lint rather than
blocking an APK release.

Splits the four cleanest violations, all behaviour-preserving:

  note_template.dart      370 -> 203 + parser (186)
  firebase_backend.dart   308 -> barrel (24) + project/store/client
  port_guard.dart         315 -> 232 + linux_system_probe (100)
  notes_list_screen.dart  698 -> 225 + 5 widget/nav files

Where a file had external callers, the original path stays as a barrel
that re-exports the split parts, so no call site changed.

Verified: 313 tests pass, coverage identical at 99.9% / 1922 lines
(per-file too -- notes_list's 281 covered lines are now 81+75+51+41+22+11),
flutter analyze clean, and a staged 260-line file makes git commit fail.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-14 16:01:24 +02:00
..
backlog_export_io.dart Cut the llm-design-spec template from 12 sections to 7 2026-07-26 22:03:35 +02:00
backlog_export_web.dart Make the app compile and run for web, behind platform seams 2026-07-20 13:14:03 +02:00
backlog_export.dart Make the app compile and run for web, behind platform seams 2026-07-20 13:14:03 +02:00
desktop_wrapper.dart Make the app compile and run for web, behind platform seams 2026-07-20 13:14:03 +02:00
firebase_account_store.dart Enforce the 250-line file cap, and split the first four files 2026-08-14 16:01:24 +02:00
firebase_backend.dart Enforce the 250-line file cap, and split the first four files 2026-08-14 16:01:24 +02:00
firebase_client.dart Enforce the 250-line file cap, and split the first four files 2026-08-14 16:01:24 +02:00
firebase_project.dart Enforce the 250-line file cap, and split the first four files 2026-08-14 16:01:24 +02:00
github_device_auth.dart Switch to very_good_analysis, matching the rest of the Flutter ecosystem 2026-07-20 11:05:13 +02:00
google_platform_io.dart Fix desktop Firebase sync: seed a Google-derived session, not a dead password 2026-08-12 19:35:18 +02:00
google_platform_web.dart Fix desktop Firebase sync: seed a Google-derived session, not a dead password 2026-08-12 19:35:18 +02:00
google_platform.dart Fix desktop Firebase sync: seed a Google-derived session, not a dead password 2026-08-12 19:35:18 +02:00
google_sign_in_backend.dart Fix desktop Firebase sync: seed a Google-derived session, not a dead password 2026-08-12 19:35:18 +02:00
local_backup_factory_io.dart Make the app compile and run for web, behind platform seams 2026-07-20 13:14:03 +02:00
local_backup_factory_web.dart Make the app compile and run for web, behind platform seams 2026-07-20 13:14:03 +02:00
local_backup_factory.dart Make the app compile and run for web, behind platform seams 2026-07-20 13:14:03 +02:00
local_backup.dart Switch to very_good_analysis, matching the rest of the Flutter ecosystem 2026-07-20 11:05:13 +02:00
notes_markdown.dart Switch to very_good_analysis, matching the rest of the Flutter ecosystem 2026-07-20 11:05:13 +02:00
run_sync.dart Simplify capture UI behind an advanced-mode toggle, add usage analytics 2026-08-12 21:30:40 +02:00
sync_service.dart Fix desktop Firebase sync: seed a Google-derived session, not a dead password 2026-08-12 19:35:18 +02:00
sync_settings.dart Switch to very_good_analysis, matching the rest of the Flutter ecosystem 2026-07-20 11:05:13 +02:00
sync_state_factory_io.dart Sync through Firebase, mirroring to GitHub, and stop re-downloading peers 2026-08-04 23:36:24 +02:00
sync_state_factory_web.dart Sync through Firebase, mirroring to GitHub, and stop re-downloading peers 2026-08-04 23:36:24 +02:00
sync_state_factory.dart Sync through Firebase, mirroring to GitHub, and stop re-downloading peers 2026-08-04 23:36:24 +02:00