Skip to content

feat(pwa): show "Limits You Set" on the recommendation report (N3) - #116

Merged
satishbagali merged 2 commits into
mainfrom
feat/limits-you-set-card
Nov 4, 2026
Merged

satishbagali merged 2 commits into
mainfrom
feat/limits-you-set-card

Conversation

@Aiyappa-DigitalGreen

Copy link
Copy Markdown
Collaborator

What

Request N3: the report screen now shows the Limits You Set card, matching the PDF section from backend PR #115.

  • models.ts: optional user_limits (inclusion_limits, diet_limits) on RecommendationResponse.
  • New report/UserLimitsCard.tsx, placed after Cost-Effective Diet and before Environmental Impact:
  • Shows display_name / display_label, falling back to the English name.
  • 10 label rows with all 9 languages. The translations are machine-made and need native review. It reuses the existing "Feed" and "Custom Diet Limits" labels.

Tests

UserLimitsCard.test.tsx covers: both tables, one table, absent / null / empty, null → "—", and ≥ for ndf_for_min. The full gate passes on Node 20: 958 tests.

Check on Test

  1. TD-LC1, Soybean meal Max 2 → card shows — · 2.00 · 1.88.
  2. Add Fat max 3 → second table shows ≤ 3 · ≤ 7 · % DM.
  3. No limits → no card.
  4. Amharic → headings are translated.

🤖 Generated with Claude Code

The PDF lists the inclusion limits and custom diet limits that shaped a
run (backend PR #115); the screen now shows the same card from the new
optional `user_limits` key, after Cost-Effective Diet. It also shows when
no diet was found, so the user can see which limits may have caused it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@satishbagali
satishbagali merged commit 468a303 into main Nov 4, 2026
7 checks passed
@satishbagali
satishbagali deleted the feat/limits-you-set-card branch November 4, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants