Skip to content

fanctrlplus2: one value per column in the dashboard widget - #16

Merged
andrebrait merged 2 commits into
mainfrom
fcp-widget-columns
Oct 6, 2026
Merged

andrebrait merged 2 commits into
mainfrom
fcp-widget-columns

Conversation

@andrebrait

@andrebrait andrebrait commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

The dashboard widget's temperature cell packed the value and its source into fixed 30px and 55px grid tracks. "40 °C" ran into the source, and a long disk-group name was cut mid-word with no ellipsis, then drawn over the RPM column on hover by Unraid's span.w18:hover { overflow: visible } (reported in #13).

The widget now has one value per column, with units in the headers:

Name Temp (°C) Source Speed (RPM) PWM (%) Status Run
  • Cells clip with an ellipsis and never overflow into the next column. Names and sources carry their full text as a tooltip.
  • Numbers are right-aligned with tabular digits. Status and Run are narrower.
  • Below 1080px, headers are abbreviated (°C, RPM, %) and each fan's source moves to a second line under the fan instead of taking a column.
  • An idling fan shows -- for temperature (previously *), since the Source column says "Idle".
  • Fanctrl2Dashboard.php sends the PWM percentage as a bare number and drops the unused temp field; the widget is its only consumer.
  • Fan names are HTML-escaped in the markup (they were interpolated raw), and two regexes mangled into $begin:math:text$… in an earlier commit are gone.

Verification: rendered the real page output with Unraid's DashStats.css (10px root, 1.1rem uppercase headers) in headless Chromium at tile widths of 780, 520, 380 and 340px. Nothing overflows; only long names and the long disk-group source are ellipsized. Not yet checked on a real Unraid dashboard. bash tests/run-all.sh passes.

Summary by CodeRabbit

  • Updates
    • Fan dashboard rows now display labeled temperature, source, RPM, PWM, status, and manual run controls.
    • At narrower widths, headings are abbreviated and the source moves to a second line; long values are clipped.
    • Missing or unavailable temperature, RPM, PWM, and source values display as --. Fan values reset to this placeholder if a refresh fails.
    • Fan percentages display as a number without a trailing % sign, or as - when unavailable.

The temperature cell packed the value and its source into fixed 30px and
55px grid tracks: "40 °C" ran into the source, and a long disk group
name was cut mid-word and drawn over the RPM column on hover (#13).

The widget now has one value per column, with units in the headers:
Name, Temp (°C), Source, Speed (RPM), PWM (%), Status, Run. Cells clip
with an ellipsis and never overflow, numbers are right-aligned, and
names and sources carry their full text as a tooltip. On narrow screens
the headers are abbreviated and each fan's source moves to a second
line. The server sends the PWM percentage as a bare number, fan names
are escaped, and the unused JSON field and mangled regexes are gone.
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b51731d9-f74d-4061-9da4-6e239f59d902
📥 Commits

Reviewing files that changed from the base of the PR and between 2480e85 and ff3932c.

📒 Files selected for processing (2)
  • src/usr/local/emhttp/plugins/fanctrlplus2/Fanctrl2Dashboard.php
  • src/usr/local/emhttp/plugins/fanctrlplus2/FanctrlPlus2.Dashboard.page

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The fan dashboard now displays temperature, source, RPM, PWM, status, and run controls in separate labeled cells. The response fields and row updates use raw values and defined fallback values.

Changes

Fan dashboard

Layer / File(s) Summary
Fan data fields
src/usr/local/emhttp/plugins/fanctrlplus2/Fanctrl2Dashboard.php
Fan entries no longer include the formatted temp field. The percent value no longer has a trailing percent sign.
Labeled responsive fan rows
src/usr/local/emhttp/plugins/fanctrlplus2/FanctrlPlus2.Dashboard.page
Fan rows use separate labeled cells for temperature, source, RPM, PWM, status, and run controls. At widths up to 1080px, headings abbreviate and the source appears on a second line.
Fan row updates and fallback values
src/usr/local/emhttp/plugins/fanctrlplus2/FanctrlPlus2.Dashboard.page
setFanRow updates each fan row and displays -- for specified missing values. Fetch failures reset the temperature, source, RPM, PWM, and status cells to --.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to ff393

The dashboard changes are mergeable after normal checks. A narrow tile in a wide viewport has not been shown to cause the reported display problem.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: presenting each fan value in a separate dashboard column.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@andrebrait

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T10:16:59.854773Z ff3932c Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: ff3932c486

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@andrebrait

Copy link
Copy Markdown
Owner Author

Renders of the widget: the real FanctrlPlus2.Dashboard.page output from each version, styled with Unraid's DashStats.css (10px root, uppercase headers) in headless Chromium. The data is fake and matches the fans in #13 plus one idle fan. The tile background is approximated, and the blue gear is a font-loading artifact of the harness.

Before (main): "40 °C" runs into the source, and "(Disk: Hard" is cut mid-word against the RPM column.

Widget before

After, desktop: one value per column, with units in the headers. The long disk-group source ends in "…" and shows in full on hover.

Widget after, desktop

After, narrow screen (360px tile): abbreviated headers, and each fan's source on a second line.

Widget after, narrow

The images live on the review-only branch review-assets/pr16, which can be deleted after this PR is merged.

@andrebrait

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@andrebrait
andrebrait merged commit d18add8 into main Oct 6, 2026
2 checks passed
@andrebrait
andrebrait deleted the fcp-widget-columns branch October 6, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant