Skip to content

feat: presence records, unknown species, landing translations, confirm modals, CI fixes#10

Merged
teruselearning merged 2 commits into
mainfrom
pre-deployment
Jun 4, 2026
Merged

feat: presence records, unknown species, landing translations, confirm modals, CI fixes#10
teruselearning merged 2 commits into
mainfrom
pre-deployment

Conversation

@teruselearning

Copy link
Copy Markdown
Owner

Summary

  • Presence-only records: 3-way Physical Mapping selector (no location / generally present / pin); teal badge in grid + list views
  • Unknown species: "not yet identified" picker creates/reuses Unknown Fauna/Flora Species per project with static SVG placeholders
  • Landing auto-translate: one-click Gemini translation of all landing text; Landing.tsx reads active-language translation with fallback chain
  • Save feedback: all Super Admin save buttons now show spinner + Saved! confirmation
  • Confirm modals: reusable ConfirmModal replaces all browser confirm()/alert() delete dialogs
  • CI type fixes: exclude stale src/ from tsconfig; fix L.LeafletMouseEvent namespace error; declare missing localOnlySpecies/localOnlyInds; remove duplicate COL_MAP key; fix Set unknown inference

Test plan

  • Register individual with Generally present selected
  • Unknown species picker (Fauna + Flora)
  • Auto-translate landing then switch language
  • Delete species/individual via confirm modal
  • GitHub Actions typecheck job passes on this PR

?? Generated with Claude Code

teruselearning and others added 2 commits June 4, 2026 12:50
…m modals, CI type fixes

Individual registration:
- Add "Register Individual or Presence" form with 3-way mapping selector
  (no location / generally present / pin to specific location)
- Presence-only records saved with isPresenceOnly flag; shown with teal
  "Presence" badge in grid and list views; name auto-fills from species
- Add "not yet identified" species picker (fauna / flora) that creates or
  reuses a shared Unknown Fauna/Flora Species per project; static SVG
  placeholder images at public/unknown-fauna.svg and public/unknown-flora.svg
  avoid the base64 upload pipeline that was producing .svgxml files

UI / UX:
- Replace all browser confirm()/alert() delete dialogs with a reusable
  ConfirmModal component (SpeciesManager, IndividualManager, IndividualDetail)
- Add loading/saved feedback to all four Super Admin settings save buttons
- Landing page: Auto-translate button sends heroTitle, heroSubtitle,
  registrationBanner, customContentHtml and feature cards to all supported
  languages via Gemini; translations saved immediately to localStorage;
  Landing.tsx reads the active-language translation with fallback chain

TypeScript / CI:
- tsconfig.json: exclude src/ (stale pre-reorganisation copies) and backend/
  so tsc --noEmit no longer picks up files with wrong relative imports
- IndividualDetail.tsx: change e: L.LeafletMouseEvent to e: any (L is a
  value not a namespace, so the type annotation was invalid)
- App.tsx: declare missing localOnlySpecies / localOnlyInds variables from
  server vs local ID diff
- IndividualManager.tsx: remove duplicate weightkg key in COL_MAP; fix
  Set<unknown> inference by explicitly typing the intermediate string array

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Addresses 2 high-severity CVEs flagged by npm audit:
- GHSA-49rj-9fvp-4h2h (RCE via turbo-stream deserialization)
- GHSA-2j2x-hqr9-3h42 (open redirect via protocol-relative URL)
- GHSA-8646-j5j9-6r62 (XSS in RSC redirect handling)
- GHSA-f22v-gfqf-p8f3 (stored XSS via unescaped Location header)
- GHSA-8x6r-g9mw-2r78 (DoS via unbounded path expansion)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@teruselearning teruselearning merged commit 983578b into main Jun 4, 2026
6 checks passed
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