Skip to content

feat: native status badges, species modal, description field, presence records, i18n#13

Merged
teruselearning merged 1 commit into
mainfrom
pre-deployment
Jun 10, 2026
Merged

feat: native status badges, species modal, description field, presence records, i18n#13
teruselearning merged 1 commit into
mainfrom
pre-deployment

Conversation

@teruselearning

Copy link
Copy Markdown
Owner

Summary

  • Native status redesign: Replace the verbose Local/National text labels with a single colour-coded pill badge on all species and individual cards - Native (green), Non-Native (amber), Invasive (red). Introduced is relabelled Non-Native for clarity across SpeciesManager cards, IndividualManager grid + list, IndividualDetail species panels, and SpeciesModal.
  • Edit form override: New Native Status section in the SpeciesManager edit form with four pill-toggle buttons (Unknown / Native / Non-Native / Invasive) so staff can correct the AI-set value at any time.
  • AI prompt improvement: Backend /api/ai/species-data now explicitly asks Gemini to determine whether a species is Native, Introduced, or Invasive at the organisation's specific location (nativeStatusLocal) and at national level (nativeStatusCountry).
  • Species detail modal: New SpeciesModal component renders species hero image, conservation badge, description, stats grid, native status pill, and external links (Wikipedia/IUCN) as an overlay, opened from the ? icon and "Species Detail" button on IndividualDetail.
  • Species description field: Added to Species type, SpeciesManager edit form, species cards, AI prompt, DB migration, and sync mapping.
  • Presence-only records: 3-way radio on IndividualManager physical mapping (No location / Generally present / Pin location); teal "Presence" badge on grid cards; isPresenceOnly flag on Individual.
  • Unknown species rework: Each unidentified individual now gets its own unique species record with a working name and identifying features; static SVG placeholders (public/unknown-fauna.svg / public/unknown-flora.svg) replace the broken base64 pipeline.
  • IndividualDetail i18n: All hardcoded English labels replaced with t() calls; 36 new translation keys seeded into DB for all 7 supported languages.
  • CI fixes: tsconfig.json exclude array prevents stale src/ directory from breaking TypeScript checks; react-router bumped 7.13?7.16 to resolve 5 high-severity CVEs.

Test plan

  • Add a new species using AI autofill - native status badge should auto-populate and show Native/Non-Native/Invasive relative to org location
  • Edit a species - verify Native Status pill buttons toggle correctly and the badge updates on the card
  • Check species cards: single badge only, no Local/National labels, "Introduced" shows as "Non-Native"
  • Check individual grid cards and list view: native status badge matches species
  • Open an individual detail page - click ? icon and "Species Detail" button - species modal should open
  • Register an individual with "Generally present" - verify presence badge appears, no map pin shown
  • Register an individual with "Unidentified species" - verify working name + description form fields appear and a unique species record is created
  • Switch the UI language - verify all IndividualDetail labels translate correctly

?? Generated with Claude Code

…e records, i18n

- Native status: replace Local/National text labels with a single Native/Non-Native/Invasive
  colour pill on species cards (SpeciesManager), individual cards (IndividualManager grid +
  list), IndividualDetail species panels, and SpeciesModal. "Introduced" is relabelled
  "Non-Native" for clarity.
- Edit form: new Native Status section in SpeciesManager edit form with four pill-toggle
  buttons (Unknown / Native / Non-Native / Invasive) so staff can override the AI value.
- AI prompt: backend /api/ai/species-data now explicitly asks Gemini to determine whether
  the species is Native, Introduced, or Invasive at the organisation's specific location
  (nativeStatusLocal) and at national level (nativeStatusCountry).
- Species detail modal (SpeciesModal): new reusable component that renders species hero
  image, conservation badge, description, stats grid, native status pill, and Wikipedia /
  IUCN links as an overlay. Opened from the Info icon and Species Detail button on
  IndividualDetail.
- Description field: added to Species type, SpeciesManager edit form, species cards, AI
  prompt, DB migration, and sync mapping.
- Presence-only records: 3-way radio on IndividualManager physical mapping section
  (No location / Generally present / Pin location); teal Presence badge on grid cards.
- Unknown species: each unidentified individual now creates its own unique species record
  with a working name and identifying features form; static SVG placeholders replace
  base64 upload pipeline.
- IndividualDetail i18n: all hardcoded English labels replaced with t() calls; 36 new
  translation keys seeded into DB across all 7 supported languages.
- tsconfig: added exclude array to prevent stale src/ directory from breaking tsc.
- react-router bumped 7.13 to 7.16 to resolve 5 high-severity CVEs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@teruselearning teruselearning merged commit a6684e2 into main Jun 10, 2026
6 checks passed
@teruselearning teruselearning deleted the pre-deployment branch June 10, 2026 12:36
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.

1 participant