fix: resolve a large collection of issues and bugs (PR #313 mirror)#9
Merged
fix: resolve a large collection of issues and bugs (PR #313 mirror)#9
Conversation
…gative macro values Co-authored-by: erikpt <4423348+erikpt@users.noreply.github.com>
Co-authored-by: erikpt <4423348+erikpt@users.noreply.github.com>
…ation Co-authored-by: erikpt <4423348+erikpt@users.noreply.github.com>
…ility Co-authored-by: erikpt <4423348+erikpt@users.noreply.github.com>
… functionality Co-authored-by: erikpt <4423348+erikpt@users.noreply.github.com>
Co-authored-by: erikpt <4423348+erikpt@users.noreply.github.com>
… Add height/weight validation and prevent negative values Co-authored-by: erikpt <4423348+erikpt@users.noreply.github.com>
…ity and name validation Co-authored-by: erikpt <4423348+erikpt@users.noreply.github.com>
Co-authored-by: erikpt <4423348+erikpt@users.noreply.github.com>
Co-authored-by: erikpt <4423348+erikpt@users.noreply.github.com>
… for FDC imports Co-authored-by: erikpt <4423348+erikpt@users.noreply.github.com>
Co-authored-by: erikpt <4423348+erikpt@users.noreply.github.com>
… UX improvements - next key, error message, and recent list extension Co-authored-by: erikpt <4423348+erikpt@users.noreply.github.com>
Co-authored-by: erikpt <4423348+erikpt@users.noreply.github.com>
…ve indicator Co-authored-by: erikpt <4423348+erikpt@users.noreply.github.com>
Co-authored-by: erikpt <4423348+erikpt@users.noreply.github.com>
Co-authored-by: erikpt <4423348+erikpt@users.noreply.github.com>
Fix critical bugs, input validation, and data quality: 23 issues including data loss, negative values, keyboard focus, custom meal search, FDC import validation, duplicate warnings, and UX improvements
Co-authored-by: erikpt <4423348+erikpt@users.noreply.github.com>
simonoppowa#212, simonoppowa#213, simonoppowa#215 Co-authored-by: erikpt <4423348+erikpt@users.noreply.github.com>
Comprehensive analysis and categorization of 136 open issues into prioritized task list with code verification
Fix diary showing zero intake for days at date range boundaries
Fix FDC import: prefer Atwater Specific Factors and validate nutritional data
Revert "Fix FDC import: prefer Atwater Specific Factors and validate nutritional data"
- Add INDEX.md for navigation hub with role-based reading paths - Add README.md with documentation overview and recommendations - Add QUICK-REFERENCE.md for quick status checks and decisions - Add UPDATES.md summarizing all documentation changes - Add 07-BRANCH-REORGANIZATION-2025-12-03.md detailing branch cleanup - Update 00-OVERALL-PLAN.md to reflect accurate branch status * Clarify 17 issues on main, 3 pending on bugfixes branch * Add repository status section * Update completion counts This ensures documentation reflects the current state after moving PRs #3, #4, #5 from main to erikpt/bugfixes branch.
- Update QUICK-REFERENCE.md to show bugfixes as main working branch - Update README.md to clarify development workflow - Update 00-OVERALL-PLAN.md with working branch context - Update INDEX.md with working branch notice - Update UPDATES.md with revision history This clarifies that erikpt/bugfixes is the primary development branch with 20 completed issues, while main (17 issues) is the stable upstream.
…owa#154) - Add optional dayToRefresh parameter to RefreshCalendarDayEvent - Update CalendarDayBloc to use provided date instead of _currentDay - Pass selected date when refreshing calendar after meal addition When adding a meal for a future date, the diary now stays on that date instead of navigating back to today. Previously, the calendar always refreshed to DateTime.now() causing the view to jump to the current date. This fix allows the meal_detail_bottom_sheet to pass the selected date when refreshing the calendar, preserving the user's position in the UI. Fixes simonoppowa#154
fix: preserve diary date selection when adding meal entries (simonoppowa#154)
- Fix LoadCalendarDayEvent props to include day parameter - Previously: List<Object?> get props => []; - Now: List<Object?> get props => [day]; This fixes a critical bug where Equatable comparison fails because the day field is not included in the props list. Events with different dates would be incorrectly considered equal, leading to duplicate event processing bugs. - Add technical debt documentation (09-TECHNICAL-DEBT-FIXES.md) - Identifies dummy user data handling - Documents rating enum refactoring opportunity - Tracks all identified technical debt Impact: HIGH - Fixes Equatable equality comparison Severity: CRITICAL - Affects event deduplication logic
- Create new DayRating enum with good/poor values - Add color methods to enum (getCalendarColor, getTextColor, getTextBackgroundColor) - Refactor TrackedDayEntity to use rating getter - Rename private method to _isWithinAcceptableCalorieDifference for clarity - Remove TODO comment as it's now implemented - Update technical debt documentation - Pin Flutter SDK to 3.27.0 via FVM for consistent builds
- Add missing l10n strings: warningLabel, duplicateMealDialogContent - Update meal_detail_bottom_sheet to use proper l10n keys - Remove unused intl import from tracked_day_data_source.dart - Remove unused variable in tracked_day_data_source_test.dart - Regenerate localization files with intl_translation - Add intl_translation as dev dependency for l10n generation All errors resolved - only info-level lints remain (pre-existing)
- Mark simonoppowa#229 (API rate limiting) as COMPLETE - Mark simonoppowa#125 (Search quality) as COMPLETE - Mark simonoppowa#212 (Duplicate meal detection) as COMPLETE - Mark DayRating enum as COMPLETE - Add 10-STATUS-UPDATE-2025-12-04.md with session summary - Update INDEX.md with new documents - Update QUICK-REFERENCE.md with current status - Update 02-REMAINING-TASKS.md with completed items
fix: resolve technical debt - props bug, DayRating enum, analyzer errors
- Correct 02-INPUT-VALIDATION.md: all items verified complete except simonoppowa#222 (reverted) - Flag 5 use_build_context_synchronously violations in meal_detail_bottom_sheet.dart - Correct simonoppowa#229/simonoppowa#125 status: code not found, likely reverted in PR #5 - Document hardcoded validation strings (not localized) as tech debt - Update QUICK-REFERENCE.md: current branch, active bug, corrected priorities - UPDATES.md: add March 2026 review session entry
- simonoppowa#213: validate macro values in edit_meal_screen before saving - each macro must not exceed base quantity - total macros must not exceed base quantity (5% tolerance) - kcal must not exceed 9 kcal/g * base quantity - docs: consolidate .copilot/workitems — remove 10 stale session/PR docs, update remaining 5 files to reflect current branch state (2026-03-11) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…simonoppowa#277) - simonoppowa#235: Show macros (carbs/fat/protein) per meal section header and per intake item card on home screen - simonoppowa#277: Add 'Show Activity Tracking' toggle in Settings; persisted via ConfigDBO.showActivityTracking (HiveField 9); ActivityVerticalList conditionally rendered on home page based on setting Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add a 'Per Xg/ml' / 'Total' toggle above the nutritional fields in the edit meal screen. In Total mode, users enter absolute values for the specified meal quantity; values are converted to per-base-qty before validation and saving. Meal quantity must be set to use Total mode. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
, simonoppowa#174) Custom meals are now saved to a dedicated CustomMealBox (Box<MealDBO>) when the user finishes the edit-meal flow. RecentMealBloc merges these templates with recent intakes so custom meals appear in the 'Recently Added' tab even before they are logged for the first time. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…a#182) - DayInfoWidget now computes calories/macros from actual intake lists instead of the stale TrackedDayDBO cache, so 0 kcal never shows when food was logged - CalendarDayBloc reconciles the cache on each day load: if actual kcal differs from cached by >0.5, it overwrites the stored values, fixing calendar dot colors over time as the user browses past days Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…oppowa#267/simonoppowa#174 complete Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
erikpt
added a commit
that referenced
this pull request
Mar 15, 2026
…licts Merges all changes from main (PRs #9, #10): - Keeps showActivityTracking (field 9), notificationsEnabled (10), notificationHour (11), notificationMinute (12) from main - Adds showMicronutrients at HiveField 13 (renumbered from 9 to avoid collision) - Merges all l10n keys from both branches in messages_en/de/tr.dart - Flutter upgraded to stable (3.41.4), mobile_scanner 6→7 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirror of upstream PR simonoppowa/OpenNutriTracker#313 — kept in sync on this fork for visibility and testing.
Summary
Bug Fixes
GestureDetectorwraps the Add Meal screen body; all three resultListViews usekeyboardDismissBehavior: onDragif (!context.mounted) return;guards after async gaps inmeal_detail_bottom_sheet.dart(fixesuse_build_context_synchronouslyviolations)lastDate: DateTime.now()on both the onboarding and profile date pickerslastDay: widget.currentDate)LoadItemsEventfired after item deleted so spinner clearsminValueclamped to prevent negative inputsdivisions: 1000)OFFProductDTO.nutrimentsmade nullable; products with missing nutriments no longer crash entire OFF search resultsEnhancements
settingsSystemLabel,settingsMetricLabel,settingsImperialLabeladded tointl_de.arbkcalExceededLabeladded to EN/DE/TRTechnical Debt
assert(x != null)+ force-unwraps inhome_bloc.dartwith proper null guardsDayRatingenum introduced for calorie goal rating coloursTest plan
🤖 Generated with Claude Code