Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

Feature/hydration home snapshot - #856

Closed
nuriba wants to merge 16 commits into
mainfrom
feature/hydration-home-snapshot
Closed

Feature/hydration home snapshot#856
nuriba wants to merge 16 commits into
mainfrom
feature/hydration-home-snapshot

Conversation

@nuriba

@nuriba nuriba commented Dec 15, 2025

Copy link
Copy Markdown
Contributor
  • Added hydration as a first-class, weight-aware target (max of 35 ml/kg vs AI baseline ~3700 g for M, ~2700 g for F).

  • Incorporated hydration into web and mobile tracking, score, and UI breakdowns; hydration now falls back to both Water (g) and Water.

  • Aligned home/Daily Targets sidebar (web) and mobile hydration card styling and info/tooltips.

  • Fixed type gaps for planned entries and hydration fields; cleaned up serializer field mismatch.

Backend

  • accounts.models.NutritionTargets.create_from_metrics now sets Water (g) using weight-based vs baseline max.
  • Hydration serializer logic accepts Water (g) or Water, and removes planned_entries from DailyNutritionLogSerializer fields to match the model.
  • Tests now pass with hydration scoring intact.

Frontend (web)

  • Daily Targets card includes Hydration bar (actual/target, progress).
  • Nutrition Tracking page hydration uses fallback keys and shows score contribution/penalty and explanatory tooltip.
  • Types updated for planned entries and hydration fields.

Mobile

  • Hydration uses the same card styling as other macros.
  • Hydration info modal explains target formula and score impact.
  • Fallback to Water key for intake.

Testing

  • Frontend: npm run build
  • Backend: python3 manage.py test

@nuriba nuriba added this to the Final Release milestone Dec 15, 2025
@nuriba nuriba self-assigned this Dec 15, 2025
@nuriba nuriba added the bug Something isn't working label Dec 15, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have to write a migration for these changes in backend?

@ArdaSaygan
ArdaSaygan self-requested a review December 15, 2025 21:57

@ArdaSaygan ArdaSaygan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use Django to check whether we need migrations for these changes.

@y4z1c1

y4z1c1 commented Dec 15, 2025

Copy link
Copy Markdown
Contributor
image nurican kardeşim bu ne

@ArdaSaygan

Copy link
Copy Markdown
Contributor

This PR is too much to handle.

It touches on too many areas in the codebase.

It's also touching my heart to reject such an immense contribution.

But everything comes to an end, some of which are tragic.

Like this one...

@ArdaSaygan ArdaSaygan closed this Dec 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants