Skip to content

Next release#1660

Merged
jokob-sk merged 7 commits into
mainfrom
next_release
May 28, 2026
Merged

Next release#1660
jokob-sk merged 7 commits into
mainfrom
next_release

Conversation

@jokob-sk
Copy link
Copy Markdown
Collaborator

@jokob-sk jokob-sk commented May 28, 2026

Summary by CodeRabbit

  • New Features

    • Added device filtering troubleshooting guide and in-app help link for the devices table.
  • Bug Fixes

    • Preserve device presence status during sync/upsert operations.
  • Documentation

    • Updated plugin developer docs, data-contract guidance, and workflow examples; added docs navigation entry.
  • Style

    • Tweaked external link icon spacing and refined settings/devices UI layout; updated footer links.
  • Chores

    • Updated schedule validation patterns across multiple plugins.
  • Tests

    • Added regression test to ensure presence-status preservation.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ed0e3281-6b00-4987-89bc-32a62580f0a3

📥 Commits

Reviewing files that changed from the base of the PR and between 721cdf0 and 62e4070.

📒 Files selected for processing (2)
  • docs/DEVICE_FILTERS.md
  • front/devices.php
✅ Files skipped from review due to trivial changes (1)
  • docs/DEVICE_FILTERS.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • front/devices.php

📝 Walkthrough

Walkthrough

Adds a Device Filters troubleshooting doc and help link in the devices UI; preserves hub device presence in sync carbon-copy UPSERTs with tests; updates RUN_SCHD base64 regexes across many plugin configs; tweaks frontend CSS/footer/settings layout; and reorganizes plugin documentation.

Changes

Device Filtering Documentation and Devices Page Enhancements

Layer / File(s) Summary
Device Filters Troubleshooting Guide
docs/DEVICE_FILTERS.md, mkdocs.yml
New comprehensive documentation page explaining device visibility, filters, display settings, auto-refresh, and troubleshooting steps. Integrated into mkdocs navigation under "Device guides" → "Editing Devices".
Devices Page Help Icon and IP Column Updates
front/devices.php
Adds help icon in table header linking to new DEVICE_FILTERS documentation, adjusts IP column width constraints, and restructures IP cell rendering with separate HTTP/HTTPS clickable links and lock icon.

Sync Carbon-Copy Device Presence Preservation

Layer / File(s) Summary
Carbon-Copy UPSERT Logic and Logging Gating
front/plugins/sync/sync.py
Updates sync plugin carbon-copy mode to exclude devPresentLastScan from UPSERT column updates (preserving hub-side device state), and wraps device write and sync success notifications in verbosity checks to reduce logging noise.
Test Infrastructure and Regression Test
test/db_test_helpers.py, test/plugins/test_sync_protocol.py
Updates db_test_helpers.py to exclude devPresentLastScan from carbon-copy UPSERT columns and adds regression test asserting hub-side device presence is not overwritten by offline node reports.

Plugin Configuration Schedule Validation Updates

Layer / File(s) Summary
Schedule Regex Pattern Updates Across All Plugins
front/plugins/__template/config.json, front/plugins/_publisher_mqtt/config.json, front/plugins/adguard_import/config.json, front/plugins/arp_scan/config.json, front/plugins/asuswrt_import/config.json, front/plugins/avahi_scan/config.json, front/plugins/csv_backup/config.json, front/plugins/db_cleanup/config.json, front/plugins/ddns_update/config.json, front/plugins/dhcp_leases/config.json, front/plugins/dhcp_servers/config.json, front/plugins/dig_scan/config.json, front/plugins/freebox/config.json, front/plugins/fritzbox/config.json, front/plugins/icmp_scan/config.json, front/plugins/internet_ip/config.json, front/plugins/internet_speedtest/config.json, front/plugins/ipneigh/config.json, front/plugins/kea_api/config.json, front/plugins/maintenance/config.json, front/plugins/mikrotik_scan/config.json, front/plugins/nbtscan_scan/config.json, front/plugins/nmap_dev_scan/config.json, front/plugins/nmap_scan/config.json, front/plugins/nslookup_scan/config.json, front/plugins/omada_sdn_imp/config.json, front/plugins/omada_sdn_openapi/config.json, front/plugins/pihole_api_scan/config.json, front/plugins/pihole_scan/config.json, front/plugins/snmp_discovery/config.json, front/plugins/sync/config.json, front/plugins/unifi_api_import/config.json, front/plugins/vendor_update/config.json, front/plugins/wake_on_lan/config.json, front/plugins/website_monitor/config.json
Systematic replacement of base64-encoded cron schedule validation regex patterns in RUN_SCHD settings across many plugins, plus adguard_import description text update and maintenance plugin NOTI_LENGTH description clarification.

Frontend CSS, Styling, and Layout Updates

Layer / File(s) Summary
CSS External Link and Scan ETA Styling
front/css/app.css
Adjusts external-link anchor (a[target="_blank"]) pseudo-element spacing and icon positioning for the ↗ indicator, and adds left padding rule for #nextScanEta element.
Footer Navigation and Links Restructure
front/php/templates/footer.php
Updates NetAlertX GitHub repository link and replaces "Ask AI" gurubase chat link with GitHub "Report a bug" issues link in footer right-aligned links.
Plugin Settings Accordion Header Grid Layout
front/settings.php
Restructures plugin accordion header to use Bootstrap grid columns for icon, prefix text, display name (hidden on mobile), and enabled/disabled indicator.

Plugin Development Documentation Reorganization

Layer / File(s) Summary
De-duplicate and Reorganize Plugin Helper Documentation
docs/PLUGINS_DEV.md, docs/PLUGINS_DEV_DATA_CONTRACT.md, docs/WORKFLOW_EXAMPLES.md
Moves plugin_helper.py guidance section earlier in PLUGINS_DEV_DATA_CONTRACT.md as single occurrence, removes duplicate later section, adjusts DateTime Format section spacing, simplifies PLUGINS_DEV.md settings examples to reference pointer documentation, and fixes Markdown code-fence termination in WORKFLOW_EXAMPLES.md.

Possibly related PRs

  • netalertx/NetAlertX#1655: Both PRs modify the SYNC "carbon-copy" device-write logic and its tests (e.g., sync_insert_devices(...)/TestSyncBehavior).

Poem

🐰 I hopped through docs to make filters clear,
Kept presence safe when syncs draw near,
Tweaked plugin patterns, CSS, and footer bright,
Tests now guard the hub's device-light,
A little rabbit cheer for code done right!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The pull request title 'Next release' is vague and generic, using a non-descriptive term that does not convey meaningful information about the specific changes in the changeset. Replace the generic title with a specific, descriptive summary of the main changes. For example, 'Update plugin schedules and enhance device filtering documentation' or 'Refactor schedule validation and add device filter guidance' would better convey the primary objectives.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch next_release

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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/DEVICE_FILTERS.md`:
- Around line 44-45: The docs list `NEWDEV_ignored_IPs` twice which is
confusing; update the example so the duplicated key is removed and replaced with
the correct hidden-device setting (verify the actual setting name in the
codebase/config and use that) so the line reads something like "Devices marked
as ignored (`NEWDEV_ignored_IPs` and `<correct_other_ignored_setting>`)"; keep
the `UI_hide_rel_types` mention as-is. Ensure you reference the real setting
name from the code/config instead of leaving a duplicate.

In `@front/devices.php`:
- Around line 101-103: The external anchor element that currently uses
target="_blank" (the <a target="_blank"
href="https://docs.netalertx.com/DEVICE_FILTERS"> link in front/devices.php)
should be hardened by adding rel="noopener noreferrer" to the same <a> tag to
prevent reverse-tabnabbing and avoid exposing window.opener; update that anchor
to include the rel attribute while keeping the target and href unchanged.
- Line 887: The width targets currently reference COL.devLastIp which is a
casing typo; update the targets array in the mapIndx(...) call to use the
correct constant COL.devLastIP (matching other usages) so the width rule applies
to the intended column alongside COL.devIpLong; locate the line containing
mapIndx(COL.devLastIp) and replace the symbol with COL.devLastIP.
- Around line 970-977: The HTML template assigned in the $(td).html call opens a
wrapper div with `<div class="anonymizeIp alignRight">` but mistakenly closes it
with `<div>` instead of `</div>`; update the string in the $(td).html(...) call
so the final tag is a proper closing `</div>` to produce valid HTML for the
anonymizeIp wrapper.

In `@front/php/templates/footer.php`:
- Line 31: The anchor for the icon-only "Report a bug" link lacks an accessible
name; add aria-label="Report a bug" to the <a> element that wraps the bug icon
(the anchor containing <i class="fa fa-bug" title="Report a bug">) so screen
readers read the link label, and keep the existing title on the <i> for the
tooltip.

In `@front/plugins/ddns_update/config.json`:
- Line 181: The base64Regex value (key "base64Regex") encodes a regex that still
allows unbounded numeric ranges like `[0-9]+-[0-9]+`; update the underlying
regex to enforce field-specific bounded ranges (minutes 0-59, hours 0-23,
day-of-month 1-31, month 1-12, weekday 0-6 or 1-7) for single numbers, ranges,
steps, lists, and wildcards, then re-encode that tightened regex to base64 and
replace the current "base64Regex" string; locate and edit the "base64Regex"
entry in config.json to perform this change.

In `@front/plugins/nslookup_scan/config.json`:
- Line 154: The base64Regex value for the "base64Regex" key currently allows
generic numeric ranges like [0-9]+-[0-9]+; update the validation so ranges are
tightened to cron-field-specific bounds before encoding (e.g., minute 0-59, hour
0-23, day-of-month 1-31, month 1-12, day-of-week 0-6) and replace the current
generic pattern in the base64Regex entry with a pattern that enforces those
per-field limits (or generate per-field regexes and then base64-encode the
combined pattern) so client-side validation rejects out-of-range ranges.

In `@front/settings.php`:
- Around line 396-401: The <h4 class="panel-title"> element currently contains
block-level <div> children (the elements rendering ${getString(prefix+"_icon")},
${prefix}, ${getString(prefix+"_display_name")}, and ${enabledHtml}), which is
invalid; change those inner <div> elements to inline or phrasing elements (e.g.,
<span> or <a>) or move them outside the <h4> while preserving layout and classes
so the heading only contains phrasing content; update the markup around the
panel-title (the element with class "panel-title" and the fragments rendering
getString(prefix+"_icon"), prefix, getString(prefix+"_display_name"), and
enabledHtml) and adjust CSS if needed to retain the same visual layout.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: acb6a6e2-2cfe-44f2-a5a7-8a8519b60306

📥 Commits

Reviewing files that changed from the base of the PR and between 1ede51c and 721cdf0.

📒 Files selected for processing (47)
  • docs/DEVICE_FILTERS.md
  • docs/PLUGINS_DEV.md
  • docs/PLUGINS_DEV_DATA_CONTRACT.md
  • docs/WORKFLOW_EXAMPLES.md
  • front/css/app.css
  • front/devices.php
  • front/php/templates/footer.php
  • front/plugins/__template/config.json
  • front/plugins/_publisher_mqtt/config.json
  • front/plugins/adguard_import/config.json
  • front/plugins/arp_scan/config.json
  • front/plugins/asuswrt_import/config.json
  • front/plugins/avahi_scan/config.json
  • front/plugins/csv_backup/config.json
  • front/plugins/db_cleanup/config.json
  • front/plugins/ddns_update/config.json
  • front/plugins/dhcp_leases/config.json
  • front/plugins/dhcp_servers/config.json
  • front/plugins/dig_scan/config.json
  • front/plugins/freebox/config.json
  • front/plugins/fritzbox/config.json
  • front/plugins/icmp_scan/config.json
  • front/plugins/internet_ip/config.json
  • front/plugins/internet_speedtest/config.json
  • front/plugins/ipneigh/config.json
  • front/plugins/kea_api/config.json
  • front/plugins/maintenance/config.json
  • front/plugins/mikrotik_scan/config.json
  • front/plugins/nbtscan_scan/config.json
  • front/plugins/nmap_dev_scan/config.json
  • front/plugins/nmap_scan/config.json
  • front/plugins/nslookup_scan/config.json
  • front/plugins/omada_sdn_imp/config.json
  • front/plugins/omada_sdn_openapi/config.json
  • front/plugins/pihole_api_scan/config.json
  • front/plugins/pihole_scan/config.json
  • front/plugins/snmp_discovery/config.json
  • front/plugins/sync/config.json
  • front/plugins/sync/sync.py
  • front/plugins/unifi_api_import/config.json
  • front/plugins/vendor_update/config.json
  • front/plugins/wake_on_lan/config.json
  • front/plugins/website_monitor/config.json
  • front/settings.php
  • mkdocs.yml
  • test/db_test_helpers.py
  • test/plugins/test_sync_protocol.py

Comment thread docs/DEVICE_FILTERS.md Outdated
Comment thread front/devices.php
Comment thread front/devices.php Outdated
Comment thread front/devices.php Outdated
Comment thread front/php/templates/footer.php
Comment thread front/plugins/ddns_update/config.json
Comment thread front/plugins/nslookup_scan/config.json
Comment thread front/settings.php
@jokob-sk jokob-sk merged commit 75c266c into main May 28, 2026
6 checks passed
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