mirror of
https://github.com/kuhyx/diet-guard.git
synced 2026-11-28 17:19:04 +01:00
Compare commits
No commits in common. "4e3778823f094805a08a9bb415aeeaae4505ae2f" and "a573cc11e034c5532b8356db9e1f2d2de71d7f58" have entirely different histories.
4e3778823f
...
a573cc11e0
@ -16,12 +16,6 @@ analyzer:
|
|||||||
- "**/*.g.dart"
|
- "**/*.g.dart"
|
||||||
- "**/*.freezed.dart"
|
- "**/*.freezed.dart"
|
||||||
- "test/**"
|
- "test/**"
|
||||||
- android/**
|
|
||||||
- ios/**
|
|
||||||
- web/**
|
|
||||||
- windows/**
|
|
||||||
- macos/**
|
|
||||||
- linux/**
|
|
||||||
|
|
||||||
linter:
|
linter:
|
||||||
rules:
|
rules:
|
||||||
|
|||||||
@ -101,10 +101,12 @@ class _CalendarScreenState extends State<CalendarScreen> {
|
|||||||
|
|
||||||
/// Opens [HistoryScreen] pre-filtered to the tapped day.
|
/// Opens [HistoryScreen] pre-filtered to the tapped day.
|
||||||
void _onDaySelected(DateTime day) {
|
void _onDaySelected(DateTime day) {
|
||||||
Navigator.of(context).push<void>(
|
unawaited(
|
||||||
MaterialPageRoute(
|
Navigator.of(context).push<void>(
|
||||||
builder: (_) => HistoryScreen(
|
MaterialPageRoute(
|
||||||
initialDateRange: DateTimeRange(start: day, end: day),
|
builder: (_) => HistoryScreen(
|
||||||
|
initialDateRange: DateTimeRange(start: day, end: day),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/// screen: "I can open the diet app on my phone and fill meal I ate."
|
/// screen: "I can open the diet app on my phone and fill meal I ate."
|
||||||
library;
|
library;
|
||||||
|
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:developer';
|
import 'dart:developer';
|
||||||
import 'package:crdt_sync/crdt_sync.dart';
|
import 'package:crdt_sync/crdt_sync.dart';
|
||||||
@ -322,27 +323,35 @@ class _LogMealScreenState extends State<LogMealScreen>
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _onOpenHistory() {
|
void _onOpenHistory() {
|
||||||
Navigator.of(context).push<void>(
|
unawaited(
|
||||||
MaterialPageRoute(builder: (_) => const HistoryScreen()),
|
Navigator.of(context).push<void>(
|
||||||
|
MaterialPageRoute(builder: (_) => const HistoryScreen()),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onOpenCalendar() {
|
void _onOpenCalendar() {
|
||||||
Navigator.of(context).push<void>(
|
unawaited(
|
||||||
MaterialPageRoute(builder: (_) => const CalendarScreen()),
|
Navigator.of(context).push<void>(
|
||||||
|
MaterialPageRoute(builder: (_) => const CalendarScreen()),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onOpenFoodBank() {
|
void _onOpenFoodBank() {
|
||||||
Navigator.of(context).push<void>(
|
unawaited(
|
||||||
MaterialPageRoute(builder: (_) => const FoodBankScreen()),
|
Navigator.of(context).push<void>(
|
||||||
|
MaterialPageRoute(builder: (_) => const FoodBankScreen()),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onOpenSettings() {
|
void _onOpenSettings() {
|
||||||
Navigator.of(context).push<void>(
|
unawaited(
|
||||||
MaterialPageRoute(
|
Navigator.of(context).push<void>(
|
||||||
builder: (_) => SettingsScreen(httpClient: widget.httpClient),
|
MaterialPageRoute(
|
||||||
|
builder: (_) => SettingsScreen(httpClient: widget.httpClient),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -405,10 +405,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
sha256: "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd"
|
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.20"
|
version: "0.12.19"
|
||||||
material_color_utilities:
|
material_color_utilities:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -421,10 +421,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: "307249ce4ff29d58a18e97f6345f539382eb9c9c29ecda628900f31de0443dd9"
|
sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.19.0"
|
version: "1.18.0"
|
||||||
objective_c:
|
objective_c:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -723,10 +723,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: "2a122cbe059f8b610d3a5415f42e255b6c17b1f21eee1d960f31080237fb4f11"
|
sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.7.12"
|
version: "0.7.11"
|
||||||
timezone:
|
timezone:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -819,10 +819,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vector_math
|
name: vector_math
|
||||||
sha256: f36f9f3be64c6198714492bb455c11056e33e2f85d9a0b676a48301e44fdcf47
|
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.2"
|
version: "2.2.0"
|
||||||
very_good_analysis:
|
very_good_analysis:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
|
|||||||
@ -2,7 +2,7 @@ name: diet_guard_app
|
|||||||
description: "Companion phone app for diet_guard: log meals on the go."
|
description: "Companion phone app for diet_guard: log meals on the go."
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
|
|
||||||
version: 1.0.8+1
|
version: 1.0.7+1
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.12.2
|
sdk: ^3.12.2
|
||||||
|
|||||||
@ -13,15 +13,14 @@ enforced by a gate that fails the commit, not by a note anyone can ignore.
|
|||||||
Why: a file that cannot be read in one piece forces re-reads and partial edits,
|
Why: a file that cannot be read in one piece forces re-reads and partial edits,
|
||||||
which is the single largest avoidable cost in an LLM-assisted workflow. Aim by
|
which is the single largest avoidable cost in an LLM-assisted workflow. Aim by
|
||||||
churn, not size alone — refactoring pays where code is read and changed often
|
churn, not size alone — refactoring pays where code is read and changed often
|
||||||
(Fowler, _refactoring economic benefit_).
|
(Fowler, *refactoring economic benefit*).
|
||||||
|
|
||||||
## Scope in this repo
|
## Scope in this repo
|
||||||
|
|
||||||
- **53 files** currently exceed 250 lines (of 222 eligible files).
|
- **56 files** currently exceed 250 lines (of 244 eligible files).
|
||||||
- **21,714 lines** sit in violation; longest file is **1101 lines**.
|
- **22,916 lines** sit in violation; longest file is **1101 lines**.
|
||||||
|
|
||||||
Exempt (do NOT split these):
|
Exempt (do NOT split these):
|
||||||
|
|
||||||
- generated files — `*.g.dart`, `*.freezed.dart`, `*.gr.dart`, `**/l10n/generated/**`,
|
- generated files — `*.g.dart`, `*.freezed.dart`, `*.gr.dart`, `**/l10n/generated/**`,
|
||||||
anything with a `GENERATED` header
|
anything with a `GENERATED` header
|
||||||
- markup — `.html`, `.css`, `.scss`
|
- markup — `.html`, `.css`, `.scss`
|
||||||
@ -33,25 +32,25 @@ Exempt (do NOT split these):
|
|||||||
ROI = lines x commits in the last year. Work top-down; a long file nobody edits
|
ROI = lines x commits in the last year. Work top-down; a long file nobody edits
|
||||||
has near-zero payoff and should not be first.
|
has near-zero payoff and should not be first.
|
||||||
|
|
||||||
| lines | commits/yr | kind | file |
|
| lines | commits/yr | kind | file |
|
||||||
| ----: | ---------: | :---- | :------------------------------------------- |
|
|------:|-----------:|:-----|:-----|
|
||||||
| 1101 | 12 | prose | `CLAUDE.md` |
|
| 1101 | 12 | prose | `CLAUDE.md` |
|
||||||
| 440 | 15 | code | `app/lib/screens/log_meal_screen.dart` |
|
| 440 | 15 | code | `app/lib/screens/log_meal_screen.dart` |
|
||||||
| 1052 | 6 | code | `app/lib/screens/history_screen.dart` |
|
| 1052 | 6 | code | `app/lib/screens/history_screen.dart` |
|
||||||
| 1017 | 6 | code | `app/test/screens/history_screen_test.dart` |
|
| 1017 | 6 | code | `app/test/screens/history_screen_test.dart` |
|
||||||
| 498 | 10 | code | `diet_guard/_sync.py` |
|
| 498 | 10 | code | `diet_guard/_sync.py` |
|
||||||
| 286 | 16 | code | `app/lib/screens/settings_screen.dart` |
|
| 286 | 16 | code | `app/lib/screens/settings_screen.dart` |
|
||||||
| 482 | 9 | code | `diet_guard/tests/test_sync.py` |
|
| 482 | 9 | code | `diet_guard/tests/test_sync.py` |
|
||||||
| 694 | 5 | code | `app/test/services/sync_merge_test.dart` |
|
| 694 | 5 | code | `app/test/services/sync_merge_test.dart` |
|
||||||
| 472 | 7 | code | `diet_guard/_gatelock_ui.py` |
|
| 472 | 7 | code | `diet_guard/_gatelock_ui.py` |
|
||||||
| 466 | 7 | code | `diet_guard/_cli.py` |
|
| 466 | 7 | code | `diet_guard/_cli.py` |
|
||||||
| 282 | 11 | code | `diet_guard/tests/conftest.py` |
|
| 282 | 11 | code | `diet_guard/tests/conftest.py` |
|
||||||
| 274 | 11 | code | `app/test/screens/settings_screen_test.dart` |
|
| 274 | 11 | code | `app/test/screens/settings_screen_test.dart` |
|
||||||
| 362 | 8 | code | `app/test/screens/log_meal_screen_test.dart` |
|
| 362 | 8 | code | `app/test/screens/log_meal_screen_test.dart` |
|
||||||
| 357 | 8 | code | `diet_guard/_state.py` |
|
| 357 | 8 | code | `diet_guard/_state.py` |
|
||||||
| 475 | 6 | code | `app/lib/services/sync_merge.dart` |
|
| 475 | 6 | code | `app/lib/services/sync_merge.dart` |
|
||||||
|
|
||||||
_(38 further files over 250 lines not listed — re-run the survey for the full set.)_
|
_(41 further files over 250 lines not listed — re-run the survey for the full set.)_
|
||||||
|
|
||||||
## How to split
|
## How to split
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user