Skip to content

webui: only handle channels in the running function test update loop - #83

Merged
jens-maus merged 1 commit into
mainfrom
jens-maus/migrate-0083-webui-devicetest-channel-check
Sep 30, 2026
Merged

jens-maus merged 1 commit into
mainfrom
jens-maus/migrate-0083-webui-devicetest-channel-check

Conversation

@jens-maus

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

Copy link
Copy Markdown
Member

Original OpenCCU rootfs patch: 0083
Original filename: 0083-WebUI-Fix-DeviceTestScriptError.patch
Original patch: ''https://github.com/OpenCCU/OpenCCU/blob/2396923033e90ba84b7c0fc4d50463da3c4bf136/buildroot-external/package/openccu-base/rootfs-patches/0083-WebUI-Fix-DeviceTestScriptError.patch''
Original issue: OpenCCU/OpenCCU#939 (fixed by OpenCCU/OpenCCU#941)

::UpdateUI() in src/webui/rega/www/esp/system.fn iterates over dom.TestRunningIDs() and treats every entry as a channel, calling Device() and ChnGroupPartnerId() on it. When the function test is started for a whole device in the general device settings, the list can also contain the device ID. The channel methods then fail on the device object, and ReGaHss logs a ScriptRuntimeError about every 3 seconds while the test is running. This change only processes entries that are channels (IsTypeOf( OT_CHANNEL )).

OpenCCU rootfs patches 0035, 0039, 0044, 0073 and 0075 also modify this file and precede 0083 in the series. 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 (3115152f, sha256 d6e3a7d6366d548d968d30f6a3b66370b0ac18fc12420dd4ec7b48a97680ae70) and --skip-patch 0083: PASS (the other 120 rootfs patches apply with zero fuzz).
  • compare against the current pin baseline (f484a5bf, all 121 patches at OpenCCU 23969230): IDENTICAL (4668 entries).

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

Summary by CodeRabbit

  • Bug Fixes
    • Test-status updates are now applied only to existing channel objects associated with running tests. Other objects listed alongside running tests are no longer marked with channel test status. This keeps the displayed status specific to the relevant channel objects.

::UpdateUI() iterates over dom.TestRunningIDs() and treats every
entry as a channel, calling Device() and ChnGroupPartnerId() on it.
When the function test is started for a whole device in the general
device settings, the list can also contain the device ID. The channel
methods then fail on the device object and ReGaHss logs a
ScriptRuntimeError about every 3 seconds while the test is running.
Only process entries that are channels.

This natively replaces OpenCCU rootfs patch
0083-WebUI-Fix-DeviceTestScriptError.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: d68f0763-10d7-443e-bfba-0d8104722e4e

📥 Commits

Reviewing files that changed from the base of the PR and between f484a5b and 3115152.

📒 Files selected for processing (1)
  • src/webui/rega/www/esp/system.fn

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

UpdateUI now applies running-test status updates only when the resolved object exists and is an OT_CHANNEL.

Changes

Running test status

Layer / File(s) Summary
Channel guard
src/webui/rega/www/esp/system.fn
The running-test loop now proceeds only when the resolved object exists and is a channel.

Priority: ➖ Normal

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 31151

The change keeps running-test status updates for channels while avoiding channel-specific operations on other objects. No concrete merge-blocking risk is established.

Architecture Summary

Architecture risk: 🔵 Low · up to 31151

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/rega/www/esp/system.fn: The running-test loop now proceeds only when the resolved object exists and is a channel; previously any existing object passed this check.
🚥 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 0…
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 clearly and concisely describes the main change: the running function test update loop now handles only channels.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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 c827595 into main Sep 30, 2026
5 checks passed
@jens-maus
jens-maus deleted the jens-maus/migrate-0083-webui-devicetest-channel-check branch September 30, 2026 11:52
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