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

MushroomObserver / mushroom-observer / 26680380128
97%

Build:
DEFAULT BRANCH: main
Ran 30 May 2026 09:31AM UTC
Jobs 1
Files 1042
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

30 May 2026 09:27AM UTC coverage: 96.483% (-0.03%) from 96.508%
26680380128

push

github

web-flow
account/preferences: convert form + action templates to Phlex (#4394)

Replaces `account/preferences/edit.html.erb` + its 6 section partials (login / privacy / appearance / filters / notes / email) + 3 filter sub-partials + `_put_buttons.html.erb` + `no_email.html.erb` — 13 ERB files, 256 lines — with three Phlex classes totaling 390 lines of rendering logic.

- `Components::AccountPreferencesForm` (`app/components/account_preferences_form.rb`, 326 lines) owns the whole `<form>`. Sections render in order via 6 private `render_*_section` methods. Each section keeps its own submit button so users don't have to scroll to the bottom of the page.
- `Views::Controllers::Account::Preferences::Edit` (`app/views/controllers/account/preferences/edit.rb`) is the action view — adds the page title + context nav, renders the form, then renders the three `PUT`-method bulk-action buttons (vote-anonymity, filename-purge, bulk-license-updater) OUTSIDE the form so a click submits to its own target instead of `PATCH /preferences`.
- `Views::Controllers::Account::Preferences::NoEmail` is the small confirmation page rendered after an unsubscribe link click.

Controller switches to explicit `render(View.new(…))` per the no-Phlex-resolver convention; `render_edit` / `render_no_email` private helpers keep the action bodies thin.

Controller test tweaks (same file):

- `assert_input_value(:user_lichen, nil)` → `:user_lichen, ""` — Phlex's `select_field` marks the empty-value "filter off" option as `selected` when `content_filter[:lichen]` is nil; ERB's pre-conversion output left it unmarked. Visually identical (browsers default to the first option either way) — the new markup more accurately reflects the actual selection state.
- `assert_request(..., result: "no_email")` → explicit `get` + `assert_response(:success)` + `assert_select("body.preferences__no_email")`. `assert_template` doesn't fire on Phlex views, so the body-marker class is the right hook.

Two intentional marku... (continued)

165 of 166 new or added lines in 4 files covered. (99.4%)

15 existing lines in 1 file now uncovered.

39698 of 41145 relevant lines covered (96.48%)

674.36 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
99.24
app/components/account_preferences_form.rb

Coverage Regressions

Lines Coverage ∆ File
15
62.28
-5.34% app/helpers/forms_helper.rb
Jobs
ID Job ID Ran Files Coverage
1 26680380128.1 30 May 2026 09:31AM UTC 1042
96.48
GitHub Action Run
Source Files on build 26680380128
  • Tree
  • List 1042
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26680380128
  • 1adf8fd9 on github
  • Prev Build on main (#26634894646)
  • Next Build on main (#26681282442)
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