[QA] §8 — ~4 of 15 species cards silently fail to open their summary panel
Section: §8 Species (/species)
Severity: medium (silent dead-click; ~27% of rows; no error, no feedback)
Environment: confirmed manually on local/preview; verify on staging
Found via: §8 manual pass + Playwright §8 clicking a species opens the summary panel
Summary
Clicking a species name on /species is supposed to open the EntitySummaryModal
(SpeciesSummary). For about 4 of the 15 species, clicking does nothing — no
panel, no error, no console message. The affected species have no obvious pattern from
the UI, which is itself a symptom of the root cause.
Repro
- Go to
/species (signed out is fine).
- Click each species name in turn.
- Most open the right-hand summary panel; ~4 do nothing at all.
Expected: every species opens its summary panel.
Actual: ~4/15 are silent no-ops.
Root cause
The species grid is YAML-backed (useMarrYaml) and its rows carry no DB id, so
SpeciesBadge has to resolve the display name back to a species row at click time:
const { data: sp } = await supabase
.from("species")
.select("id, resource_id")
.or(`common_name.ilike.${value},name.ilike.${value}`) // exact match, no % wildcards
.maybeSingle(); // null on 0 OR >1 matches
if (sp) { open(...) } // else: nothing happens, silently
value is the YAML display name (capitalized common name, else the Latin name).
.maybeSingle() yields no row when the query returns 0 matches (the YAML name
doesn't exactly match any species.common_name or species.name) or >1 matches
(the name is ambiguous / duplicated). In both cases sp is falsy, open() is never
called, and there's no user-facing feedback — hence the "random" dead-clicks.
(Secondary: a display name containing a comma or parentheses would also break the
.or(...) filter string, producing the same silent failure.)
Suggested fix (any one, roughly in order of preference)
- Carry a stable id through the data — enrich the YAML→grid rows with the
species table id (or resource_id) so the click opens directly by id, no lookup.
This is what the Resources and Investigators grids do, and they don't have this bug.
- Make the lookup tolerant —
%value% ilike + .order(...).limit(1) instead of
exact .ilike + .maybeSingle(), plus reconcile the species table's
common_name/name values against the YAML names so they actually match.
- At minimum, fail loudly — if no row resolves, show a toast ("Couldn't open
details for {name}") instead of a silent no-op, so it's never an invisible dead-click.
Acceptance criteria
Notes
- Tracked in the suite two ways:
§8 clicking a species opens the summary panel
(green — proves the modal mechanism works for resolvable names) and
§8 every species opens its summary panel (test.fail() — tracks this bug; its
failure message lists exactly which species didn't open).
[QA] §8 — ~4 of 15 species cards silently fail to open their summary panel
Section: §8 Species (
/species)Severity: medium (silent dead-click; ~27% of rows; no error, no feedback)
Environment: confirmed manually on local/preview; verify on staging
Found via: §8 manual pass + Playwright
§8 clicking a species opens the summary panelSummary
Clicking a species name on
/speciesis supposed to open theEntitySummaryModal(
SpeciesSummary). For about 4 of the 15 species, clicking does nothing — nopanel, no error, no console message. The affected species have no obvious pattern from
the UI, which is itself a symptom of the root cause.
Repro
/species(signed out is fine).Expected: every species opens its summary panel.
Actual: ~4/15 are silent no-ops.
Root cause
The species grid is YAML-backed (
useMarrYaml) and its rows carry no DB id, soSpeciesBadgehas to resolve the display name back to aspeciesrow at click time:valueis the YAML display name (capitalized common name, else the Latin name)..maybeSingle()yields no row when the query returns 0 matches (the YAML namedoesn't exactly match any
species.common_nameorspecies.name) or >1 matches(the name is ambiguous / duplicated). In both cases
spis falsy,open()is nevercalled, and there's no user-facing feedback — hence the "random" dead-clicks.
(Secondary: a display name containing a comma or parentheses would also break the
.or(...)filter string, producing the same silent failure.)Suggested fix (any one, roughly in order of preference)
speciestable id (or resource_id) so the click opens directly by id, no lookup.This is what the Resources and Investigators grids do, and they don't have this bug.
%value%ilike +.order(...).limit(1)instead ofexact
.ilike+.maybeSingle(), plus reconcile thespeciestable'scommon_name/namevalues against the YAML names so they actually match.details for {name}") instead of a silent no-op, so it's never an invisible dead-click.
Acceptance criteria
/speciesopens its summary panel.§8 every species opens its summary panelregression test (currentlytest.fail()+// bug #<this>) goes green; remove thetest.fail().Notes
§8 clicking a species opens the summary panel(green — proves the modal mechanism works for resolvable names) and
§8 every species opens its summary panel(test.fail()— tracks this bug; itsfailure message lists exactly which species didn't open).