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

MushroomObserver / mushroom-observer / 30189249829
99%
main: 99%

Build:
Build:
LAST BUILD BRANCH: nimmo-4901-validation-errors-display
DEFAULT BRANCH: main
Ran 26 Jul 2026 05:26AM UTC
Jobs 1
Files 1802
Run time 3min
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

26 Jul 2026 05:21AM UTC coverage: 99.162%. Remained the same
30189249829

Pull #4914

github

nimmolo
Consolidate validation-error display into Components::Form::Errors (#4901)

Phase 1 of the validation-message item on issue #4901 -- consolidating
the fragmented error-display layer before any model switches its
validators to deferred tag resolution, so there's exactly one place to
update instead of several in lockstep with every future model PR.

A full investigation (not estimates) found 3 separate display paths:
flash (already mostly consolidated via AbstractModel#formatted_errors
-> FlashNotices#flash_object_errors, 44 call sites across 27
controllers, but with a few stragglers bypassing it), 5 (not 4)
independently-diverged Phlex render_errors methods, and 2 raw
API-rendering controllers (left alone -- a different, riskier
problem: API response-shape stability, not display duplication).

New Components::Form::Errors replaces the 5 duplicated render_errors/
error_count_message methods in field_slips/visual_groups/
visual_models/projects::aliases forms, unifying their genuinely
diverged copy (h2 vs p, :error.t vs :error.l, hardcoded English vs
per-model translation tags) into one generic
:errors_prohibited_save.t(type:) tag, replacing the two now-redundant
per-model tags (visual_model_errors, field_slip_errors).

Migrated 3 flash stragglers onto the shared formatted_errors/
flash_object_errors path: licenses_controller.rb (x2, preserving its
flash_warning severity rather than upgrading to flash_error),
glossary_terms_controller.rb (was using the legacy Hash-based
errors.messages API), projects/aliases_controller.rb.

Investigated but deliberately left alone:
observations/external_links_controller.rb already calls
formatted_errors -- its extra .strip_html on the joined flash message
is real XSS protection (flash content renders via `trusted_html`,
unescaped), not redundant duplication to consolidate away.

Phase 2 (switching the 84 real errors.add(:field, tag.t) call sites in
app/models/ to bare deferred tags, plus the shared resolver that
implies) ... (continued)
Pull Request #4914: Consolidate validation-error display into `Components::Form::Errors` (#4901, phase 1)

20 of 21 new or added lines in 14 files covered. (95.24%)

53349 of 53800 relevant lines covered (99.16%)

844.13 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
91.89
0.0% app/models/name/lifeform.rb
Jobs
ID Job ID Ran Files Coverage
1 30189249829.1 26 Jul 2026 05:26AM UTC 1802
99.16
GitHub Action Run
Source Files on build 30189249829
  • Tree
  • List 1802
  • Changed 7
  • Source Changed 7
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30189249829
  • Pull Request #4914
  • PR Base - main (#30186063554)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc