Summary
The Mischkultur (companion planting) tab on the species detail page (/stammdaten/species/{key}#companion-planting) lists compatible and incompatible species by their scientific name only (e.g. Daucus carota, Apium graveolens var. rapaceum, Pisum sativum). A normal user without botanical knowledge cannot tell that these are carrot, celeriac, and pea. The tab should also show the common (German) name so the information is actionable for everyday gardeners.
Observed on Allium porrum (Lauch) at /stammdaten/species/10337#companion-planting.
Good news: the data is already served
This is a frontend-only rendering gap — the common names already travel all the way to the client and are simply not displayed:
- Backend populates
common_names: src/backend/app/domain/services/species_service.py:83-84 (compatible) and :96-97 (incompatible) pass common_names straight through from the graph vertex.
- API schema exposes it:
src/backend/app/api/v1/companion_planting/schemas.py:22,29 → common_names: list[str].
- Frontend type already has it:
src/frontend/src/api/types.ts — CompatibleSpecies.common_names / IncompatibleSpecies.common_names (the field comment even says "UI leads with [0]" — DE first by convention).
- But the UI ignores it:
src/frontend/src/pages/stammdaten/species-detail/SpeciesCompanionTab.tsx:182 (compatible) and the incompatible list both render only c.scientific_name ?? c.species_key; common_names is never referenced.
Proposed change (frontend)
In SpeciesCompanionTab.tsx, for both the compatible and incompatible lists:
- Lead with the common name
common_names[0] (DE-first by convention) as the primary label, and show the scientific name as secondary text (smaller/italic) — consistent with how other species views present the name pair.
- Fall back gracefully: if
common_names is empty, show scientific_name; if that is also missing, show species_key (current behaviour).
- Keep the link target (
/stammdaten/species/{species_key}), the score chip, and the incompatible reason line intact.
- Mind mobile-first layout (the tab is used on the species detail page) and i18n (no hard-coded German in code; the names themselves come from the data).
Acceptance criteria
Notes
- No backend change required —
common_names is already returned by GET /api/v1/species/{key}/compatible and /incompatible.
- Aligns with the project's usability direction (descriptive texts / plain-language for non-expert users).
Summary
The Mischkultur (companion planting) tab on the species detail page (
/stammdaten/species/{key}#companion-planting) lists compatible and incompatible species by their scientific name only (e.g. Daucus carota, Apium graveolens var. rapaceum, Pisum sativum). A normal user without botanical knowledge cannot tell that these are carrot, celeriac, and pea. The tab should also show the common (German) name so the information is actionable for everyday gardeners.Observed on
Allium porrum(Lauch) at/stammdaten/species/10337#companion-planting.Good news: the data is already served
This is a frontend-only rendering gap — the common names already travel all the way to the client and are simply not displayed:
common_names:src/backend/app/domain/services/species_service.py:83-84(compatible) and:96-97(incompatible) passcommon_namesstraight through from the graph vertex.src/backend/app/api/v1/companion_planting/schemas.py:22,29→common_names: list[str].src/frontend/src/api/types.ts—CompatibleSpecies.common_names/IncompatibleSpecies.common_names(the field comment even says "UI leads with [0]" — DE first by convention).src/frontend/src/pages/stammdaten/species-detail/SpeciesCompanionTab.tsx:182(compatible) and the incompatible list both render onlyc.scientific_name ?? c.species_key;common_namesis never referenced.Proposed change (frontend)
In
SpeciesCompanionTab.tsx, for both the compatible and incompatible lists:common_names[0](DE-first by convention) as the primary label, and show the scientific name as secondary text (smaller/italic) — consistent with how other species views present the name pair.common_namesis empty, showscientific_name; if that is also missing, showspecies_key(current behaviour)./stammdaten/species/{species_key}), the score chip, and the incompatiblereasonline intact.Acceptance criteria
Allium porrum/ species10337: Daucus carota also reads as its common name).species_key— no empty rows.Notes
common_namesis already returned byGET /api/v1/species/{key}/compatibleand/incompatible.