Repository navigation
fix(pwa): Custom Feed lists every category (N6); "Calves" label (N9) - #125
Merged
Merged
Conversation
…abel (N9) N6 — the Custom Feed popup took its categories from the country's library, so a new feed could only go in a category the country already had (India Concentrate: Energy Source only; Minerals and Additive were unreachable). It now lists the type's master categories in catalogue order, falling back to the country list if that lookup fails. Feed Selection still offers only categories that have feeds. N9 — the Physiological State option "Baby calves/heifers" now reads "Calves" (all 9 languages + Tigrigna/French/Arabic). The API value stays "Baby Calf/Heifer"; the unused old label row is removed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
satishbagali
enabled auto-merge
November 5, 2026 05:15
satishbagali
approved these changes
Nov 5, 2026
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.
N6: Custom Feed popup lists every category of the type
useCustomFeedusedgetFeedCategories(type, country), which keeps only categories the country already has feeds in. So India › Concentrate offered only Energy Source, and Minerals and Additive (with their own nutrient forms) couldn't be reached.getCatalogCategoriesForType(type), the existing master-list lookup, now exported. It returns every active category in catalogue order. If that lookup fails, the popup falls back to the country list, so it's never empty.getFeedCategoriesand the Feed Selection cards are unchanged: they still offer only categories that have feeds.N9: "Calves"
ANIMAL_CATEGORY_LABELS["Baby Calf/Heifer"]changed from "Baby calves/heifers" to "Calves". The API value stays"Baby Calf/Heifer".Tests
useCustomFeed.test.tsx: all master categories even when the country list is shorter; fallback when the lookup fails.api-feed-taxonomy.test.ts: the master list vsgetFeedCategoriesoverlap for the same country; null on failure.api-helpersandcattle-info.The full gate passes on Node 20: 983 tests.
Check on Test
🤖 Generated with Claude Code