Skip to content

webui: only treat a duration of 31 hours as permanent in channel actions - #86

Merged
jens-maus merged 1 commit into
mainfrom
jens-maus/migrate-0123-webui-channel-action-duration
Sep 30, 2026
Merged

jens-maus merged 1 commit into
mainfrom
jens-maus/migrate-0123-webui-channel-action-duration

Conversation

@jens-maus

@jens-maus jens-maus commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Original OpenCCU rootfs patch: 0123
Original filename: 0123-WebUI-Fix-ChannelActionDuration.patch
Original patch: ''https://github.com/OpenCCU/OpenCCU/blob/34d2133d4ba912ea8f26ee18556227ced6a8fc36/buildroot-external/package/openccu-base/rootfs-patches/0123-WebUI-Fix-ChannelActionDuration.patch''
Original issue: OpenCCU/OpenCCU#1306

In the combined parameter dialog for program channel actions (src/webui/www_source/webui/js/dialog/switchCombinedParamDialog.js), a duration value of 31 means "permanent" only with the unit hours (durationUnit == 2). getConfigString() checked the value alone, so a duration of 31 seconds or 31 minutes was also written without an on-time (OT), and the channel stayed on permanently. This change also checks that the unit is hours.

The file's ISO-8859-1 encoding and LF line endings are preserved. It is part of the generated www/webui/webui.js.

40 earlier OpenCCU rootfs patches (0001 to 0122) also modify the generated www/webui/webui.js. None of their hunks covers this line, and the line count is unchanged, so they all still apply unchanged.

Validation

  • OpenCCU scripts/base-patch-migration.py validate with the canonical Buildroot 2026.08 git4 archive of this branch (acc56ee0, sha256 017c61f2dc1e37e060c77a2b2c51f192228c9b8670c54a3af9d0a3ce52e70471) and --skip-patch 0123: PASS (the other 117 rootfs patches apply with zero fuzz).
  • compare against the current pin baseline (40894ac0, all 118 patches): IDENTICAL (4668 entries).

OpenCCU cleanup PR (patch removal, pin and archive hash update): OpenCCU/OpenCCU#4285

Summary by CodeRabbit

  • Bug Fixes
    • Corrected duration handling so a value of 31 is treated as permanent only when the hours unit is selected. With other units, it is converted to a timed duration.

In the combined parameter dialog of program channel actions, a duration
value of 31 means "permanent" only with the unit hours. getConfigString()
checked the value alone, so a duration of 31 seconds or 31 minutes was
also written without an on-time and the channel stayed on permanently.
Also check that the unit is hours.

This natively replaces OpenCCU rootfs patch
0123-WebUI-Fix-ChannelActionDuration.patch.
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 80248f4f-d9c3-496a-b000-3059380a0bce

📥 Commits

Reviewing files that changed from the base of the PR and between 40894ac and acc56ee.

📒 Files selected for processing (1)
  • src/webui/www_source/webui/js/dialog/switchCombinedParamDialog.js

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

getConfigString now treats a duration of 31 as permanent only when the selected unit is hours. For other units, the value follows the timed-duration path and is converted to on-time seconds.

Changes

Duration handling

Layer / File(s) Summary
Unit-specific permanent-duration condition
src/webui/www_source/webui/js/dialog/switchCombinedParamDialog.js
The permanent-duration condition applies to value 31 only when the selected unit is hours. Other units use the timed-duration path.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to acc56

The change prevents 31-second and 31-minute channel actions from becoming permanent while preserving the permanent-hours option. No actionable merge-blocking issue is identified.

Architecture Summary

Architecture risk: 🔵 Low · up to acc56

The change affects 1 system.

Changed systems: src

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — src (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in src/webui/www_source/webui/js/dialog/switchCombinedParamDialog.js: getConfigString now applies the permanent-duration condition to value 31 only when the unit is hours; previously, value 31 was permanent for every unit. A value of 31 in another unit now follows the timed-duration path.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately identifies the main change: only a 31-hour duration is treated as permanent in channel actions.
✨ 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

Autopilot is currently an internal CodeRabbit preview.


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.

@jens-maus
jens-maus merged commit afa0cd9 into main Sep 30, 2026
5 checks passed
@jens-maus
jens-maus deleted the jens-maus/migrate-0123-webui-channel-action-duration branch September 30, 2026 16: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