bumicerts-clean-rewrite · observations-measurements-inline

Observations: inline measurements + simplified media tabs

@daviddao

The Observations surface no longer splits field data into Observations / Measurements / Audio / Drone tabs — it now shows just Photos and Field sounds, and every sighting's measurements (e.g. tree DBH & height) render inline on the gallery card, the detail drawer, and the full observation page. Smoke-tested live against Bees & Trees Uganda and the 1,099-occurrence Koko Dao dataset on the production indexer.

Date: 2026-06-27 · Target: localhost:3040 (prod indexer api.hi.gainforest.app) · partial


Headline result

3
Surfaces showing measurements
5
Languages translated
1,099
Occurrences scale-tested
2
Tabs removed (Measurements, Drone)

Works end-to-end. Tree measurements now appear as ruler-icon chips on every gallery card that has them (DBH 1.29 cm · Height 15 m), as a dedicated “Measurements” block in the detail drawer, and as a “Measurements” section on the full observation page. The Measurements and Drone tabs are gone; only Photos and Field sounds remain. Card data is fetched in one batched indexer round-trip and a chip renders only where a sighting actually carries measurements. tsc --noEmit is clean and the i18n sync check passes across all five locales.

Walkthrough

Bees & Trees Uganda observation cards each showing DBH and Height measurement chips
01Bees & Trees Uganda → Observations → All media. Every (photo-less) tree-data card now carries a ruler chip: DBH 1 cm · Height 0.5 m, DBH 0.4 cm · Height 0.7 m, …
Koko Dao observation gallery with real species names and measurement chips at scale
02Scale test — Koko Dao (1,099 occurrences). Real species (Lafoensia acuminata, Roble blanco, Yarumo…) render their DBH + Height chips alongside the media-count badge. Chips only appear on sightings that have measurements.
Observation detail drawer with a Measurements panel showing DBH 1 cm and Height 0.5 m
03Detail drawer — new Measurements panel (“2 measurements”) sits between the owner card and the map: DBH 1 cm, Height 0.5 m.
Full observation page for a Koko Dao tree with photo and a Measurements section
04Full observation page (Sp N. Identificada, Koko Dao) — real tree photo plus a server-rendered MEASUREMENTS section: DBH 1.29 cm, Height 15 m, above the Details grid.
Bees & Trees full observation page Measurements section
05Same section on a photo-less Bees & Trees sighting — the Measurements block renders independently of media.
COBEC observations page empty state
06Edge case — COBEC’s profile has 0 indexed occurrences, so the feed is empty (no broken chips). See findings.

End-to-end: Koko Dao Observations → All media (chips stream in) → open a sighting → full observation page with its Measurements section.

Findings

Inline measurement chips on gallery cards — works

Cards fetch measurements for the visible sightings in one batched query (mirroring the existing media-count fetch) and render up to two facts as ruler chips, with a +N overflow. Verified on Bees & Trees Uganda (shot 01) and at scale on Koko Dao’s 1,099-occurrence feed (shot 02). A chip appears only when the sighting has measurements — photo/audio sightings without field data stay clean.

Measurements on the detail drawer & full observation page — works

The drawer gained a “Measurements” panel (shot 03) and the full /observations/<did>/<rkey> page a “Measurements” section (shots 04–05). Values match the indexer out-of-band: occurrence mtea3a9c… ↔ measurement 3miipbnasx223dbh: "1.29", totalHeight: "15", rendered as DBH 1.29 cm / Height 15 m (verify-koko-measurement.json).

Simplified media tabs — Measurements & Drone removed

The Observations sub-nav now offers only Observations (+ Audio for managers); the Measurements and Drone pills are gone, and the tree-data management layer (upload/edit) stays reachable but unlisted via “Add data” / the legacy /trees redirect, so nothing was orphaned. New marketplace.measurements strings were added to en, es, id, pt, sw; check:i18n passes and tsc --noEmit is clean.

COBEC has no indexed field data under its certified DID

The requested COBEC dataset (“1000s of trees”) could not be verified: the certified profile community-based-en.certified.one (did:plc:tkj5pqpkfy5srko45wptuubp) returns 0 occurrences and 0 measurements from the indexer, so its Observations feed is empty (shot 06). The data is likely under a different importer DID or not yet indexed. Used Koko Dao (1,099 occurrences / 189 measurements) for the scale test instead. Not a regression in this change.

Sub-nav pill removal verified by code, not a logged-in screenshot

The Observations sub-nav only renders for the account owner / org manager (showPrivate), and these test runs were logged-out, so the before/after pill row isn’t captured in a screenshot. The removal is verified through the component diff (ObservationsSubNav.tsx now builds only observations + audio tabs) plus a clean typecheck. A logged-in manager pass would close this gap.

Pre-existing data quality on Bees & Trees (not this change)

Several Bees & Trees sightings show raw CSV values as their name (“1”, “0”, “()”) and carry no photo. That stems from the original tree-CSV import, not this feature — the measurement chips render correctly on them regardless. Koko Dao’s records have proper species names and show the feature at its best.

Reproducing

Cards + drawer/account/t0fl10.certified.one/observationsAll media Scale (1,099)/account/koko-dao.gainforest.id/observationsAll media Full page/observations/koko-dao.gainforest.id/mtea3a9c1798560ca6b0d3 Out-of-bandcurl api.hi.gainforest.app/graphqlappGainforestDwcMeasurement(where:{occurrenceRef:{eq:…}}) Checksnpx tsc --noEmit · node scripts/check-i18n-untranslated.mjs — both pass Videowalkthrough.webm Screenshotsassets/03…07*.png