Skip to content

Next release - #1690

Merged
jokob-sk merged 6 commits into
mainfrom
next_release
Jun 29, 2026
Merged

Next release#1690
jokob-sk merged 6 commits into
mainfrom
next_release

Conversation

@jokob-sk

@jokob-sk jokob-sk commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Added dedicated loading skeleton support for device details tools and improved spinner targeting for tab/screen content.
  • Bug Fixes

    • Loading placeholders now dismiss immediately and are reused (reducing flicker) across device detail tabs, devices, events, reports, workflows, plugins, notifications, and other pages.
    • Record switching now shows the loading spinner promptly when appropriate.
    • Device and network first/last-seen timestamps are now localized consistently in links and hover cards.
  • UI/Styling

    • Improved skeleton spacing and unified “light gray” text styling in light/dark themes.
  • Documentation

    • Updated Home Assistant, Pi-hole, notifications, REST import guides, and refreshed documentation navigation structure.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: c99b6e92-d59f-4ef8-a026-e11238247138

📥 Commits

Reviewing files that changed from the base of the PR and between 20ac840 and d1e8847.

📒 Files selected for processing (2)
  • front/systeminfoInitCheck.php
  • mkdocs.yml
✅ Files skipped from review due to trivial changes (2)
  • front/systeminfoInitCheck.php
  • mkdocs.yml

📝 Walkthrough

Walkthrough

Adds a shared light-gray theme token, updates loading skeleton markup and spinner targeting, changes several skeleton hide/show paths to reuse DOM nodes, localizes rendered device timestamps, and reorganizes multiple documentation guides and navigation entries.

Changes

Frontend theme, loading, and timestamps

Layer / File(s) Summary
Theme color variables and text colors
front/css/app.css, front/css/dark-patch.css, front/css/system-dark-patch.css
Adds --color-lightgray and replaces hardcoded light-gray text colors across dark-theme selectors, plus the #txtRecord:hover rule and a small hover-style fix.
Spinner-target skeleton templates and layout
front/css/app.css, front/systeminfoInitCheck.php, front/php/templates/skel_*.php, front/php/templates/skel_device_details*.php
Adds spinnerTarget to skeleton containers, expands the device-details skeleton markup, adds the device-details tools skeleton, and adjusts init-check and skeleton spacing/layout styles.
Spinner target resolution and hide behavior
front/js/common.js
Adds resolveSpinnerTarget(), updates showSpinner() to accept an explicit target, and simplifies hideSpinner() to a minimal fade-out.
Skeleton show/hide wiring
front/deviceDetails*.php, front/pluginsCore.php, front/*.php
Wires skeleton display into load/save/init flows, switches several helpers to hide instead of remove, and changes multiple page-level skeleton dismissals to immediate fade-out.
Localized timestamp attributes
front/devices.php, front/js/network-tree.js, front/js/ui_components.js
Stores localized values in data-firstseen and data-lastseen attributes for device links and network tree nodes.

Documentation and navigation

Layer / File(s) Summary
Guide content updates
docs/HOME_ASSISTANT.md, docs/PIHOLE_GUIDE.md, docs/REST_IMPORT.md, docs/NOTIFICATIONS.md
Reworks the Home Assistant and Pi-hole guides, adds a REST import note, and updates the notifications setting description.
MkDocs navigation updates
mkdocs.yml
Expands and renames navigation entries across Docker, setup, device, troubleshooting, development, and integration sections.

Possibly related PRs

Poem

🐇 I hopped through gray shadows and found a bright key,
Spinner targets now bloom where the loading should be.
Skeletons linger, then fade with a sigh,
And timestamps now sparkle as links wander by.
Docs got a map and the pages got spry —
Thump! goes my paw as I race through the sky.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% 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 title is too generic and does not describe the actual changes in this pull request. Rename it to a concise summary of the main change, such as updating skeleton loading behavior and related UI/docs for the next release.
✅ 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.
✨ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
front/deviceDetailsEdit.php (1)

487-523: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Hide the details skeleton on all save completion paths.

showDetailsTabSkeleton() is called at save start (Line 426), but hideDetailsTabSkeleton() only runs on the success branch (Line 491). On resp.success === false and AJAX error (Line 515), the skeleton stays visible and can block editing.

Suggested fix
 success: function(resp) {

   if (resp && resp.success) {
     showMessage(getString("Device_Saved_Success"));
-    hideDetailsTabSkeleton();
   } else {
     console.log(resp);
     errorMessage = resp?.error;
     showMessage(`${getString("Device_Saved_Unexpected")}: ${errorMessage}`, 5000, "modal_red");
   }

   // Remove navigation prompt
   window.onbeforeunload = null;
   somethingChanged = false;

   // Refresh API
   updateApi("devices,appevents");

   // Callback
   if (typeof refreshCallback === "function") {
     refreshCallback(direction);
   }

+  hideDetailsTabSkeleton();
   hideSpinner();
 },
 error: function(xhr) {
   if (xhr.status === 403) {
     showMessage(getString("Device_Save_Unauthorized"));
   } else {
     showMessage(getString("Device_Save_Failed") + " (" + xhr.status + ")");
   }
+  hideDetailsTabSkeleton();
   hideSpinner();
 }
🤖 Prompt for 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.

In `@front/deviceDetailsEdit.php` around lines 487 - 523, The save flow in
deviceDetailsEdit.php leaves the details skeleton visible on failure paths
because hideDetailsTabSkeleton() is only called in the resp.success branch.
Update the success and error handlers in the save callback so
hideDetailsTabSkeleton() is invoked after any save completion, including
resp.success === false and xhr error cases, alongside the existing cleanup like
hideSpinner(), window.onbeforeunload, and refreshCallback.
🤖 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 `@front/css/dark-patch.css`:
- Around line 17-24: Remove the duplicate --color-white declaration in the :root
block of dark-patch.css so each CSS variable is defined only once. Update the
color token list to keep a single --color-white entry alongside the other
--color-* variables, and ensure no other duplicate custom properties remain in
that block.

In `@front/devices.php`:
- Around line 924-925: Guard empty devFirstConnection and devLastConnection
values before calling localizeTimestamp in the hover-card markup builder so
blank timestamps stay empty instead of becoming the "Failed conversion" string.
Update the data-firstseen and data-lastseen attribute expressions to check the
row values from mapIndx(COL.devFirstConnection) and
mapIndx(COL.devLastConnection) first, and only format non-empty timestamps;
otherwise fall back to the existing "Unknown" behavior used by the UI.

In `@front/php/templates/skel_tab_maint_logging.php`:
- Line 1: The global .spinnerTarget usage makes spinner anchoring depend on DOM
order, so showSpinner()/hideSpinner() in common.js may target the wrong pane.
Update the spinner selection logic to scope to the active tab/container or
accept an explicit target instead of using $(".spinnerTarget").first(). Adjust
the templates around skel-tab-maint-logging and any other spinnerTarget markup
so the intended container is identifiable by active context, and keep the
spinner APIs consistent with that target resolution.

In `@front/php/templates/skel_tab_tools.php`:
- Line 1: The spinner overlay is being anchored to the first .spinnerTarget
instead of the active visible skeleton, which can target the wrong container
when multiple exist. Update showSpinner() and hideSpinner() to resolve the
currently active/visible spinner target explicitly, using the relevant
spinnerTarget element for the current view rather than .first(), and keep the
logic aligned with the existing spinner handling in those functions.

---

Outside diff comments:
In `@front/deviceDetailsEdit.php`:
- Around line 487-523: The save flow in deviceDetailsEdit.php leaves the details
skeleton visible on failure paths because hideDetailsTabSkeleton() is only
called in the resp.success branch. Update the success and error handlers in the
save callback so hideDetailsTabSkeleton() is invoked after any save completion,
including resp.success === false and xhr error cases, alongside the existing
cleanup like hideSpinner(), window.onbeforeunload, and refreshCallback.
🪄 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: c14f703f-2fec-4f4a-85a7-ef9607730ba3

📥 Commits

Reviewing files that changed from the base of the PR and between cd69087 and 3f4d684.

📒 Files selected for processing (35)
  • front/css/app.css
  • front/css/dark-patch.css
  • front/css/system-dark-patch.css
  • front/deviceDetails.php
  • front/deviceDetailsEdit.php
  • front/deviceDetailsEvents.php
  • front/deviceDetailsPresence.php
  • front/deviceDetailsSessions.php
  • front/deviceDetailsTools.php
  • front/devices.php
  • front/js/network-tree.js
  • front/js/ui_components.js
  • front/php/templates/skel_devices.php
  • front/php/templates/skel_events.php
  • front/php/templates/skel_notifications.php
  • front/php/templates/skel_plugins.php
  • front/php/templates/skel_presence.php
  • front/php/templates/skel_report.php
  • front/php/templates/skel_settings.php
  • front/php/templates/skel_tab_details.php
  • front/php/templates/skel_tab_events.php
  • front/php/templates/skel_tab_maint_backup.php
  • front/php/templates/skel_tab_maint_dbtools.php
  • front/php/templates/skel_tab_maint_logging.php
  • front/php/templates/skel_tab_maint_multiedit.php
  • front/php/templates/skel_tab_plugins_table.php
  • front/php/templates/skel_tab_presence.php
  • front/php/templates/skel_tab_sessions.php
  • front/php/templates/skel_tab_sysinfo_initcheck.php
  • front/php/templates/skel_tab_sysinfo_network.php
  • front/php/templates/skel_tab_sysinfo_server.php
  • front/php/templates/skel_tab_sysinfo_storage.php
  • front/php/templates/skel_tab_tools.php
  • front/php/templates/skel_workflows.php
  • front/pluginsCore.php

Comment thread front/css/dark-patch.css Outdated
Comment thread front/devices.php
Comment on lines +924 to +925
` data-firstseen="${localizeTimestamp(row[mapIndx(COL.devFirstConnection)])}"` +
` data-lastseen="${localizeTimestamp(row[mapIndx(COL.devLastConnection)])}"` +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Guard empty timestamps before formatting.

At Line 924 and Line 925, empty values now become "Failed conversion" (truthy), so hover cards show that literal string instead of "Unknown".

💡 Proposed fix
+            const firstSeenRaw = row[mapIndx(COL.devFirstConnection)];
+            const lastSeenRaw  = row[mapIndx(COL.devLastConnection)];
             return (
               `<b class="anonymizeDev ">` +
                 `<a href="deviceDetails.php?mac=${row[mapIndx(COL.devMac)]}" class="hover-node-info"` +
@@
-                  ` data-firstseen="${localizeTimestamp(row[mapIndx(COL.devFirstConnection)])}"` +
-                  ` data-lastseen="${localizeTimestamp(row[mapIndx(COL.devLastConnection)])}"` +
+                  ` data-firstseen="${firstSeenRaw ? localizeTimestamp(firstSeenRaw) : ''}"` +
+                  ` data-lastseen="${lastSeenRaw ? localizeTimestamp(lastSeenRaw) : ''}"` +
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
` data-firstseen="${localizeTimestamp(row[mapIndx(COL.devFirstConnection)])}"` +
` data-lastseen="${localizeTimestamp(row[mapIndx(COL.devLastConnection)])}"` +
const firstSeenRaw = row[mapIndx(COL.devFirstConnection)];
const lastSeenRaw = row[mapIndx(COL.devLastConnection)];
return (
`<b class="anonymizeDev ">` +
`<a href="deviceDetails.php?mac=${row[mapIndx(COL.devMac)]}" class="hover-node-info"` +
@@
` data-firstseen="${firstSeenRaw ? localizeTimestamp(firstSeenRaw) : ''}"` +
` data-lastseen="${lastSeenRaw ? localizeTimestamp(lastSeenRaw) : ''}"` +
🤖 Prompt for 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.

In `@front/devices.php` around lines 924 - 925, Guard empty devFirstConnection and
devLastConnection values before calling localizeTimestamp in the hover-card
markup builder so blank timestamps stay empty instead of becoming the "Failed
conversion" string. Update the data-firstseen and data-lastseen attribute
expressions to check the row values from mapIndx(COL.devFirstConnection) and
mapIndx(COL.devLastConnection) first, and only format non-empty timestamps;
otherwise fall back to the existing "Unknown" behavior used by the UI.

Comment thread front/php/templates/skel_tab_maint_logging.php
Comment thread front/php/templates/skel_device_details_tab_tools.php

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@front/js/common.js`:
- Around line 972-975: The resolveSpinnerTarget function currently returns the
explicitTarget result immediately, so when it matches nothing it skips the
fallback lookup and can place the spinner full-screen. Update
resolveSpinnerTarget to validate the explicitTarget selection before returning,
and if the jQuery result is empty continue on to the existing active/visible
.spinnerTarget fallback logic instead of exiting early.
🪄 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: 54f51c01-8b47-457b-8b33-732454109eda

📥 Commits

Reviewing files that changed from the base of the PR and between 3f4d684 and 86cc8a3.

📒 Files selected for processing (2)
  • front/css/dark-patch.css
  • front/js/common.js
💤 Files with no reviewable changes (1)
  • front/css/dark-patch.css

Comment thread front/js/common.js

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
front/deviceDetailsEvents.php (1)

183-186: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

The reusable skeleton still only runs once.

Because the loading state is gated behind eventsPageInitialized, later loadEventsData() calls (for example from #chkHideConnectionEvents) refresh the table without ever showing the skeleton/spinner again. That defeats the new hide/show reuse path after the first render.

Proposed fix
 function loadEventsData() {
   const mac = getMac();
   if (!mac) {
     console.warn("loadEventsData: mac not set, skipping");
     return;
   }
+
+  showEventsTabSkeleton();
+  showSpinner();

   const hideConnections = $('`#chkHideConnectionEvents`')[0].checked;
   ...
 }

 ...
-  showEventsTabSkeleton();
-  showSpinner();
-
   var eventsRows          = 10;
🤖 Prompt for 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.

In `@front/deviceDetailsEvents.php` around lines 183 - 186, The loading UI in
loadEventsData() is still bypassed on subsequent refreshes because it is guarded
by eventsPageInitialized, so later calls such as from `#chkHideConnectionEvents`
never show the skeleton/spinner. Update the load flow around
showEventsTabSkeleton() and showSpinner() so the reusable loading state runs on
every data fetch, while keeping the one-time initialization in the existing
eventsPageInitialized path separate from the refresh UI.
front/deviceDetailsEdit.php (1)

487-522: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Hide the details skeleton on failed saves too.

showDetailsTabSkeleton() now runs before the request, but hideDetailsTabSkeleton() only runs in the success branch. Any API error or resp.success === false leaves the skeleton over the form and blocks the retry path.

Suggested fix
     success: function(resp) {
 
       if (resp && resp.success) {
         showMessage(getString("Device_Saved_Success"));
-        hideDetailsTabSkeleton();
       } else {
 
         console.log(resp);
 
         errorMessage = resp?.error;
 
         showMessage(`${getString("Device_Saved_Unexpected")}: ${errorMessage}`, 5000, "modal_red");
       }
@@
 
       hideSpinner();
+      hideDetailsTabSkeleton();
     },
     error: function(xhr) {
       if (xhr.status === 403) {
         showMessage(getString("Device_Save_Unauthorized"));
       } else {
         showMessage(getString("Device_Save_Failed") + " (" + xhr.status + ")");
       }
       hideSpinner();
+      hideDetailsTabSkeleton();
     }
🤖 Prompt for 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.

In `@front/deviceDetailsEdit.php` around lines 487 - 522, The save flow in
deviceDetailsEdit.php only clears the details skeleton inside the success branch
of the AJAX callback, so failed saves leave the form blocked. Update the save
handling around the success and error callbacks to always call
hideDetailsTabSkeleton() on any completed request path, including when
resp.success is false and in the xhr error handler, while keeping the existing
success behavior in the save callback.
front/deviceDetailsTools.php (1)

214-219: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Don’t show the tools spinner before the tab is visible.

These calls run as soon as the script is parsed, but the matching hide path is behind #panTools:visible. On any initial load that opens another tab, the spinner can stay active until Tools is visited.

Suggested fix
-        showSpinner();
-        showToolsTabSkeleton();
-
         // ----------------------------------------------------------------
         function manualnmapscan(targetip, mode) {
@@
         function initDeviceToolsPage()
         {
             // Only proceed if .panTools is visible
             if (!$('`#panTools`:visible').length) {
                 return; // exit early if nothing is visible
@@
             if (toolsPageInitialized) return;
             toolsPageInitialized = true;
+
+            showSpinner();
+            showToolsTabSkeleton();
 
             initNmapButtons();
             initCopyFromDevice();            
             
             hideSpinner();

Also applies to: 695-710

🤖 Prompt for 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.

In `@front/deviceDetailsTools.php` around lines 214 - 219, The Tools
spinner/skeleton is being shown too early because the initialization block runs
on script parse, while the hide logic is gated behind `#panTools`:visible. Move
the showSpinner and showToolsTabSkeleton behavior in deviceDetailsTools.php
behind a visibility check for the Tools tab, and keep it paired with the
existing hide path so it only activates when the Tools tab is actually
displayed; apply the same adjustment in the duplicated initialization path
around the matching symbols used later in the file.
🤖 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 `@front/php/templates/skel_device_details.php`:
- Around line 63-218: The device details skeleton markup now uses floated
Bootstrap columns inside skel_device_details.php, but the spinner target
showSpinner() measures can collapse without a clearing wrapper. Wrap the main
skel-detail-form column groups in a .row or clearfix container so the floated
col-lg-* / col-sm-* sections expand correctly and `#device-details-skeleton` keeps
the full form height. Use skel-detail-form and showSpinner() as the key
references when updating the structure.

---

Outside diff comments:
In `@front/deviceDetailsEdit.php`:
- Around line 487-522: The save flow in deviceDetailsEdit.php only clears the
details skeleton inside the success branch of the AJAX callback, so failed saves
leave the form blocked. Update the save handling around the success and error
callbacks to always call hideDetailsTabSkeleton() on any completed request path,
including when resp.success is false and in the xhr error handler, while keeping
the existing success behavior in the save callback.

In `@front/deviceDetailsEvents.php`:
- Around line 183-186: The loading UI in loadEventsData() is still bypassed on
subsequent refreshes because it is guarded by eventsPageInitialized, so later
calls such as from `#chkHideConnectionEvents` never show the skeleton/spinner.
Update the load flow around showEventsTabSkeleton() and showSpinner() so the
reusable loading state runs on every data fetch, while keeping the one-time
initialization in the existing eventsPageInitialized path separate from the
refresh UI.

In `@front/deviceDetailsTools.php`:
- Around line 214-219: The Tools spinner/skeleton is being shown too early
because the initialization block runs on script parse, while the hide logic is
gated behind `#panTools`:visible. Move the showSpinner and showToolsTabSkeleton
behavior in deviceDetailsTools.php behind a visibility check for the Tools tab,
and keep it paired with the existing hide path so it only activates when the
Tools tab is actually displayed; apply the same adjustment in the duplicated
initialization path around the matching symbols used later in the file.
🪄 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: f8c69c6b-3449-4f24-8ac2-356b98789537

📥 Commits

Reviewing files that changed from the base of the PR and between 86cc8a3 and 214959f.

📒 Files selected for processing (12)
  • front/deviceDetailsEdit.php
  • front/deviceDetailsEvents.php
  • front/deviceDetailsPresence.php
  • front/deviceDetailsSessions.php
  • front/deviceDetailsTools.php
  • front/js/common.js
  • front/php/templates/skel_device_details.php
  • front/php/templates/skel_device_details_tab_details.php
  • front/php/templates/skel_device_details_tab_events.php
  • front/php/templates/skel_device_details_tab_presence.php
  • front/php/templates/skel_device_details_tab_sessions.php
  • front/php/templates/skel_device_details_tab_tools.php
💤 Files with no reviewable changes (5)
  • front/php/templates/skel_device_details_tab_presence.php
  • front/php/templates/skel_device_details_tab_details.php
  • front/php/templates/skel_device_details_tab_events.php
  • front/php/templates/skel_device_details_tab_sessions.php
  • front/php/templates/skel_device_details_tab_tools.php
🚧 Files skipped from review as they are similar to previous changes (1)
  • front/js/common.js

Comment thread front/php/templates/skel_device_details.php

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
front/deviceDetails.php (1)

266-273: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Show the spinner on the confirm-discard path too.

The new spinner call only runs when somethingChanged is false. If the user confirms the discard modal, performSwitch still runs without the spinner, so this navigation path keeps the old blank-state behavior.

Suggested fix
+function switchRecord(direction) {
+  showSpinner();
+  performSwitch(direction);
+}
+
 function recordSwitch(direction) {
 
   if(somethingChanged)
   {
     showModalDefaultStrParam ('Unsaved changes', 'Do you want to discard your changes?',
-      '<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Okay');?>', performSwitch, direction);
+      '<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Okay');?>', switchRecord, direction);
   } else
   {
-    showSpinner();
-    performSwitch(direction)
+    switchRecord(direction);
   }
 }
🤖 Prompt for 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.

In `@front/deviceDetails.php` around lines 266 - 273, The spinner is only shown in
the direct switch path, so the confirm-discard flow from
showModalDefaultStrParam to performSwitch skips it. Update the switch logic in
deviceDetails.php so the same showSpinner behavior runs when the user confirms
discarding changes, not just when somethingChanged is false. Use the existing
performSwitch callback/direction flow to place the spinner call in the shared
path so both navigation branches behave consistently.
🧹 Nitpick comments (1)
docs/PIHOLE_GUIDE.md (1)

78-78: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Absolute /docs/PLUGINS.md and ./REMOTE_NETWORKS.md mixed link styles.

Line 78 uses an absolute path for PLUGINS.md and a relative path for REMOTE_NETWORKS.md. Standardize to relative links for portability.

📝 Suggested fix
-Explore other [plugins](/docs/PLUGINS.md) to discover additional information about your network, or learn how to scan [remote networks](./REMOTE_NETWORKS.md).
+Explore other [plugins](PLUGINS.md) to discover additional information about your network, or learn how to scan [remote networks](REMOTE_NETWORKS.md).
🤖 Prompt for 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.

In `@docs/PIHOLE_GUIDE.md` at line 78, The markdown link styles in the
PIHOLE_GUIDE content are inconsistent, with an absolute link to PLUGINS.md and a
relative link to REMOTE_NETWORKS.md. Update the sentence in the guide to use the
same relative-link style for both targets so navigation remains portable; adjust
the links in the affected markdown text rather than changing the document
structure.
🤖 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/HOME_ASSISTANT.md`:
- Around line 50-58: The “Missing devices” guidance is unclear about where the
first arp-scan command should be run. Update the HOME_ASSISTANT.md flow so
container access instructions come before any command that must run inside
NetAlertX, or explicitly state which scan runs on the host versus inside the
container. Keep the wording around arp-scan and the NetAlertX container
consistent so readers know the correct execution context before trying the
command.
- Line 87: Remove the redundant sudo from the container shell example in
HOME_ASSISTANT.md: the prompt already shows root access, so the arp-scan command
should be documented without sudo. Update the example to keep only the direct
arp-scan invocation so it matches how commands are run inside the container.

In `@docs/PIHOLE_GUIDE.md`:
- Around line 72-75: The Pi-hole database mount example is missing the host-side
path in the mount mapping. Update the table entry for the pihole-FTL.db database
so it shows a complete host-to-container path, matching the style used in the
other mount examples in PIHOLE_GUIDE.md and clearly identifying the source path
and the container path.
- Around line 48-51: The Docker volume examples in PIHOLE_GUIDE.md are missing
the host-side source path, so the mount syntax is invalid and confusing. Update
the examples for the `dhcp.leases` and `pihole-FTL.db` rows to include a
representative host path before the colon, keeping the existing container paths
intact. Use the table entries in the Pi-hole guide that describe the
`dhcp.leases` and `pihole-FTL.db` mounts so readers can copy a working
`host:container` compose example.
- Line 3: The link in PIHOLE_GUIDE.md currently uses an absolute
/docs/PLUGINS.md path that breaks in common renderers; update the markdown
reference in the guide to use a relative link instead. Adjust the existing
PLUGINS.md link in the PIHOLE_GUIDE.md content so it resolves correctly from the
docs folder and remains portable across GitHub and MkDocs.
- Around line 15-20: The Pi-hole guide currently recommends an insecure default
for PIHOLEAPI_SSL_VERIFY. Update the documentation entry in the PIHOLEAPI_*
settings table to recommend True as the default, and mention that False should
only be used for self-signed certificates with an explicit security warning.
Keep the wording aligned with the existing PIHOLEAPI_SSL_VERIFY description so
readers understand the safe default and the limited exception.

In `@front/systeminfoInitCheck.php`:
- Around line 10-32: The layout in systeminfoInitCheck.php uses Bootstrap 4/5
utility classes that are not available in the shipped Bootstrap 3.3.7/AdminLTE
setup, so the section won’t render as intended. Update the markup around the
check status, file list, and init-check button blocks by replacing classes like
col-12, d-flex, gap-2, and w-100 with Bootstrap 3-compatible grid/utility
patterns or equivalent custom CSS, keeping the existing structure in place and
adjusting the affected containers and button styling consistently.

In `@mkdocs.yml`:
- Line 69: The navigation entry for “Incorrect offline detection” is in the
wrong section of mkdocs.yml and should be moved out of Setup › Advanced guides
into the Troubleshooting list. Update the mkdocs navigation structure by
removing the FIX_OFFLINE_DETECTION.md item from the current Advanced guides
group and adding it under the Troubleshooting section so the entry is grouped
with related troubleshooting content.

---

Outside diff comments:
In `@front/deviceDetails.php`:
- Around line 266-273: The spinner is only shown in the direct switch path, so
the confirm-discard flow from showModalDefaultStrParam to performSwitch skips
it. Update the switch logic in deviceDetails.php so the same showSpinner
behavior runs when the user confirms discarding changes, not just when
somethingChanged is false. Use the existing performSwitch callback/direction
flow to place the spinner call in the shared path so both navigation branches
behave consistently.

---

Nitpick comments:
In `@docs/PIHOLE_GUIDE.md`:
- Line 78: The markdown link styles in the PIHOLE_GUIDE content are
inconsistent, with an absolute link to PLUGINS.md and a relative link to
REMOTE_NETWORKS.md. Update the sentence in the guide to use the same
relative-link style for both targets so navigation remains portable; adjust the
links in the affected markdown text rather than changing the document structure.
🪄 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: 268f7088-f7df-484d-b8be-cea2b00e9d75

📥 Commits

Reviewing files that changed from the base of the PR and between 214959f and 20ac840.

⛔ Files ignored due to path filters (1)
  • docs/img/NOTIFICATIONS/Device-notification-settings.png is excluded by !**/*.png
📒 Files selected for processing (26)
  • docs/HOME_ASSISTANT.md
  • docs/NOTIFICATIONS.md
  • docs/PIHOLE_GUIDE.md
  • docs/REST_IMPORT.md
  • front/appEventsCore.php
  • front/css/app.css
  • front/deviceDetails.php
  • front/deviceDetailsEdit.php
  • front/deviceDetailsEvents.php
  • front/deviceDetailsPresence.php
  • front/deviceDetailsSessions.php
  • front/deviceDetailsTools.php
  • front/devices.php
  • front/events.php
  • front/maintenance.php
  • front/php/templates/skel_device_details_tab_details.php
  • front/php/templates/skel_plugins.php
  • front/plugins.php
  • front/pluginsCore.php
  • front/presence.php
  • front/report.php
  • front/systeminfo.php
  • front/systeminfoInitCheck.php
  • front/userNotifications.php
  • front/workflowsCore.php
  • mkdocs.yml
💤 Files with no reviewable changes (1)
  • front/plugins.php
✅ Files skipped from review due to trivial changes (7)
  • front/report.php
  • front/presence.php
  • front/events.php
  • front/systeminfo.php
  • docs/NOTIFICATIONS.md
  • front/php/templates/skel_device_details_tab_details.php
  • docs/REST_IMPORT.md
🚧 Files skipped from review as they are similar to previous changes (5)
  • front/deviceDetailsSessions.php
  • front/deviceDetailsEvents.php
  • front/deviceDetailsPresence.php
  • front/deviceDetailsEdit.php
  • front/deviceDetailsTools.php

Comment thread docs/HOME_ASSISTANT.md
Comment on lines +50 to +58
If some devices do not appear in Home Assistant, first verify that NetAlertX can detect them by running:

[configuration]: ./img/HOME_ASISSTANT/HomeAssistant-Configuration.png "configuration"
[sensors]: ./img/HOME_ASISSTANT/HomeAssistant-Device-as-Sensors.png "sensors"
[history]: ./img/HOME_ASISSTANT/HomeAssistant-Device-Presence-History.png "history"
[list]: ./img/HOME_ASISSTANT/HomeAssistant-Devices-List.png "list"
[overview]: ./img/HOME_ASISSTANT/HomeAssistant-Overview-Card.png "overview"
```bash
sudo arp-scan --interface=eth0 192.168.1.0/24
```

## Troubleshooting
Replace the interface and subnet with values appropriate for your environment (see the [Subnets](./SUBNETS.md) documentation).

If you can't see all devices detected, run `sudo arp-scan --interface=eth0 192.168.1.0/24` (change these based on your setup, read [Subnets](./SUBNETS.md) docs for details). This command has to be executed the NetAlertX container, not in the Home Assistant container.
Run this command **inside the NetAlertX container**, not inside the Home Assistant container.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Clarify where the arp-scan command should run.

The "Missing devices" subsection shows an arp-scan command (lines 52–53) before explaining how to access the NetAlertX container (lines 60–84). However, line 58 instructs to run it "inside the NetAlertX container." This creates confusion—readers may try to run the first command before they know how to enter the container. Reorder so container access precedes the command, or clarify that the first command can run on the host while the test scan (line 87) runs inside the container.

🤖 Prompt for 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.

In `@docs/HOME_ASSISTANT.md` around lines 50 - 58, The “Missing devices” guidance
is unclear about where the first arp-scan command should be run. Update the
HOME_ASSISTANT.md flow so container access instructions come before any command
that must run inside NetAlertX, or explicitly state which scan runs on the host
versus inside the container. Keep the wording around arp-scan and the NetAlertX
container consistent so readers know the correct execution context before trying
the command.

Comment thread docs/HOME_ASSISTANT.md
4. Run a test `arp-scan`.

```bash
/ # sudo arp-scan --ignoredups --retry=6 192.168.1.0/24 --interface=eth0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Remove unnecessary sudo inside container shell.

Line 87 shows sudo arp-scan run at a / # prompt inside the container. Since the shell is already root (/ # prompt), sudo is redundant and may fail if not installed. Remove sudo from the container-internal example.

📝 Suggested fix
- / # sudo arp-scan --ignoredups --retry=6 192.168.1.0/24 --interface=eth0
+ / # arp-scan --ignoredups --retry=6 192.168.1.0/24 --interface=eth0
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/ # sudo arp-scan --ignoredups --retry=6 192.168.1.0/24 --interface=eth0
/ # arp-scan --ignoredups --retry=6 192.168.1.0/24 --interface=eth0
🤖 Prompt for 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.

In `@docs/HOME_ASSISTANT.md` at line 87, Remove the redundant sudo from the
container shell example in HOME_ASSISTANT.md: the prompt already shows root
access, so the arp-scan command should be documented without sudo. Update the
example to keep only the direct arp-scan invocation so it matches how commands
are run inside the container.

Comment thread docs/PIHOLE_GUIDE.md
# Integration with Pi-hole

NetAlertX comes with 3 plugins suitable for integrating with your existing PiHole instance. The first plugin uses the v6 API, the second plugin is using a direct SQLite DB connection, the other leverages the `DHCP.leases` file generated by PiHole. You can combine multiple approaches and also supplement scans with other [plugins](/docs/PLUGINS.md).
NetAlertX includes three plugins for integrating with an existing Pi-hole installation. The first plugin imports devices through the Pi-hole v6 API, the second parses the `dhcp.leases` file generated by Pi-hole, and the third reads the Pi-hole SQLite database directly. You can use any of these approaches individually or combine them with each other and other [plugins](/docs/PLUGINS.md).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Absolute /docs/PLUGINS.md link will break in most renderers.

From docs/PIHOLE_GUIDE.md, the absolute path /docs/PLUGINS.md resolves incorrectly on GitHub (to github.com/docs/PLUGINS.md) and in MkDocs. Use a relative link: PLUGINS.md or ./PLUGINS.md.

📝 Suggested fix
-You can use any of these approaches individually or combine them with each other and other [plugins](/docs/PLUGINS.md).
+You can use any of these approaches individually or combine them with each other and other [plugins](PLUGINS.md).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
NetAlertX includes three plugins for integrating with an existing Pi-hole installation. The first plugin imports devices through the Pi-hole v6 API, the second parses the `dhcp.leases` file generated by Pi-hole, and the third reads the Pi-hole SQLite database directly. You can use any of these approaches individually or combine them with each other and other [plugins](/docs/PLUGINS.md).
NetAlertX includes three plugins for integrating with an existing Pi-hole installation. The first plugin imports devices through the Pi-hole v6 API, the second parses the `dhcp.leases` file generated by Pi-hole, and the third reads the Pi-hole SQLite database directly. You can use any of these approaches individually or combine them with each other and other [plugins](PLUGINS.md).
🤖 Prompt for 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.

In `@docs/PIHOLE_GUIDE.md` at line 3, The link in PIHOLE_GUIDE.md currently uses
an absolute /docs/PLUGINS.md path that breaks in common renderers; update the
markdown reference in the guide to use a relative link instead. Adjust the
existing PLUGINS.md link in the PIHOLE_GUIDE.md content so it resolves correctly
from the docs folder and remains portable across GitHub and MkDocs.

Comment thread docs/PIHOLE_GUIDE.md
Comment thread docs/PIHOLE_GUIDE.md
Comment thread docs/PIHOLE_GUIDE.md
Comment thread front/systeminfoInitCheck.php Outdated
Comment thread mkdocs.yml Outdated
@jokob-sk
jokob-sk merged commit 6821a5d into main Jun 29, 2026
6 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Jul 10, 2026
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