• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MushroomObserver / mushroom-observer / 26550324451
97%

Build:
DEFAULT BRANCH: main
Ran 28 May 2026 02:12AM UTC
Jobs 1
Files 1022
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 May 2026 02:09AM UTC coverage: 96.456% (+0.006%) from 96.45%
26550324451

push

github

web-flow
species_lists/write_in: convert form + new template to Phlex; fix AutocompleterField hidden-id slicing (#4386)

Three things, all ratcheting forward:

## 1. Convert write-in form + action template to Phlex

`species_lists/write_in/_form.html.erb` → `Views::Controllers::SpeciesLists::WriteIn::Form`,
`species_lists/write_in/new.html.erb` → `Views::Controllers::SpeciesLists::WriteIn::New`,
and inline `species_lists/form/_fields_for_member.erb` (only ever
rendered from this form) into the new Phlex form's private methods.

The form's fields fall into three groups, all backed by the
recently-generalized field-helper API:

- Top-level params (`approved_names`, `approved_deprecated_names`):
  `hidden_field("approved_names", value: ...)` — String, raw `name=`.
- Non-model nested namespaces (`list[members]`, `member[*]`):
  `text_field("member[lat]", value: ...)`, `checkbox_field("member[specimen]",
  value: "1", checked: ...)`, etc. — String, raw `name=`.
- Model attributes (`:place_name` — a `SpeciesList` column):
  `autocompleter_field(:place_name, type: :location, ...)` — Symbol,
  model-bound.

`new.html.erb` becomes `Views::Controllers::SpeciesLists::WriteIn::New`,
rendered explicitly by `SpeciesLists::WriteInController#new` and the
failure-reload path of `#create` (MO doesn't wire `Phlex::Rails::Resolver`,
so a bare `render(:new)` can't pick up the Phlex action view).

## 2. Fix `AutocompleterField`'s hidden-id field name slicing

`AutocompleterField` auto-derives a paired hidden input — its
`name` is `"<namespace>[<key>_id]"` (e.g. `name="list[members_id]"`
for a visible field named `list[members]`). The implementation
sliced the field's `dom.name` using a regex built from `field.key`:

    field.dom.name.sub(/\[#{field.key}\]$/, "[#{key}_id]")

That works when `field.key` is a leaf identifier (Symbol or simple
String like `:place_name`), but silently fails for FieldProxy
instances built by the String-form helpers, where `field.key`
contains the full n... (continued)

104 of 104 new or added lines in 4 files covered. (100.0%)

1 existing line in 1 file now uncovered.

39216 of 40657 relevant lines covered (96.46%)

666.64 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
84.71
-1.18% app/helpers/autocompleter_helper.rb
Jobs
ID Job ID Ran Files Coverage
1 26550324451.1 28 May 2026 02:12AM UTC 1022
96.46
GitHub Action Run
Source Files on build 26550324451
  • Tree
  • List 1022
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26550324451
  • a267132b on github
  • Prev Build on main (#26549298654)
  • Next Build on main (#26609188726)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc