Skip to content

Next release#1679

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

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

Conversation

@jokob-sk

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

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features
    • Added loading skeleton screens across major pages (Settings, Devices, Events, Plugins, Workflows, Report, Presence, System info, Notifications, Maintenance, and Device details tabs).
  • Improvements
    • Enhanced loading behavior: clearer default spinner text, higher overlay priority, and automatic skeleton dismissal with time-based fallbacks.
    • Refined page structure for Settings, Devices, Events, Plugins, Reports, and Device details to better support loading states.
    • Updated Settings dark-theme hover styling and improved Settings value display truncation.
  • Bug Fixes
    • Skeletons now reliably hide on AJAX errors for multiple pages/tabs.

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

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: 1efb5f0b-5702-4c42-a782-e7a1139b506d

📥 Commits

Reviewing files that changed from the base of the PR and between 36a10fb and 6194134.

📒 Files selected for processing (5)
  • front/events.php
  • front/pluginsCore.php
  • front/presence.php
  • front/userNotifications.php
  • front/workflowsCore.php
🚧 Files skipped from review as they are similar to previous changes (5)
  • front/userNotifications.php
  • front/workflowsCore.php
  • front/presence.php
  • front/events.php
  • front/pluginsCore.php

📝 Walkthrough

Walkthrough

Adds shimmer skeleton loading UIs across all major NetAlertX pages (Settings, Devices, Events, Device Details tabs, Plugins, Workflows, Presence, Report, Notifications, Maintenance, SystemInfo). Introduces 20+ PHP skeleton templates, a shared CSS system with animation and dark-theme overrides, per-page JS hide helpers with 15-second fallbacks, spinner z-index fixes, and consolidates modals.php into the shared footer.

Changes

Skeleton Loading UI – Full Site

Layer / File(s) Summary
Skeleton CSS foundation, spinner fixes, and dark-theme overrides
front/css/app.css, front/css/dark-patch.css, front/css/system-dark-patch.css, front/js/common.js, front/php/templates/header.php
app.css adds settingsShimmer keyframes, --skel-* CSS variable defaults, absolute-positioned page overlay containers, and all .skel-* primitive classes; also fixes Settings-page padding, truncation, and hover color, and raises #loadingSpinner to z-index: 9999. Dark-patch files override --skel-* variables for dark themes. common.js raises spinner zIndex to 9999 in all four positioning branches and improves the text fallback to "Loading...". header.php sets the spinner default text to "Loading...".
Modal include consolidated into footer
front/php/templates/footer.php, front/appEvents.php, front/network.php, front/maintenance.php, front/report.php, front/systeminfo.php, front/php/templates/migrationCheck.php
footer.php now requires modals.php outside .wrapper for correct fixed-position stacking. Individual pages each remove their previously separate modals.php include. migrationCheck.php receives minor whitespace cleanup.
New PHP skeleton template files
front/php/templates/skel_settings.php, front/php/templates/skel_devices.php, front/php/templates/skel_events.php, front/php/templates/skel_device_details.php, front/php/templates/skel_workflows.php, front/php/templates/skel_plugins.php, front/php/templates/skel_presence.php, front/php/templates/skel_report.php, front/php/templates/skel_notifications.php, front/php/templates/skel_tab_*.php
Adds 20+ new PHP templates rendering shimmer placeholder markup using .skel-* classes and PHP loops. Templates cover page-level overlays (settings, devices, events, device details, workflows, plugins, presence, report, notifications) and tab-level panels (device details/edit, events, presence, sessions, maintenance tabs, sysinfo tabs).
Settings page skeleton wiring
front/settings.php, front/js/settings_utils.js
settings.php includes skel_settings.php inside the page body, defines hideSettingsSkeleton() to remove settings-loading class and fade/remove #settings-skeleton, and calls it on AJAX error, the read-only config branch, and a 15-second fallback. Overview section loop conditionally appends wrappers only when sectionHtml is non-empty. settings_utils.js updates plugin card Bootstrap column classes.
Devices, Events, Notifications, and Report page skeleton wiring
front/devices.php, front/events.php, front/userNotifications.php, front/report.php
Each page wraps content in a named id container, includes its skeleton template, and adds a hide*Skeleton() helper. Devices: called at DataTable initComplete. Events: called on AJAX success/error. Notifications: called at initComplete. Report: called in fetch .finally(). All pages register a 15-second fallback timer.
Device Details page and tab skeleton wiring
front/deviceDetails.php, front/deviceDetailsEdit.php, front/deviceDetailsEvents.php, front/deviceDetailsPresence.php, front/deviceDetailsSessions.php
deviceDetails.php wraps content in #deviceDetailsPage, includes skel_device_details.php, and adds hideDeviceDetailsSkeleton() called at initialization with a 15s fallback. Each detail tab file (Edit, Events, Presence, Sessions) includes its respective skel_tab_*.php and adds a tab-specific hide*Skeleton() called on AJAX success and error paths.
Plugins, Workflows, and Presence page skeleton wiring
front/plugins.php, front/pluginsCore.php, front/workflows.php, front/workflowsCore.php, front/presence.php
plugins.php adds #pluginsPage id and includes skel_plugins.php; pluginsCore.php's generateTabs() replaces hideSpinner() with hidePluginsSkeleton(). workflows.php includes skel_workflows.php; workflowsCore.php's .always() calls hideWorkflowsSkeleton(). presence.php includes skel_presence.php; FullCalendar's loading callback calls hidePresenceSkeleton(). All three add 15-second window.load fallbacks.
Maintenance and SystemInfo page skeleton wiring
front/maintenance.php, front/systeminfo.php
maintenance.php includes four maintenance-tab skeleton templates inside each tab pane, defines four hideMaint*Skeleton() helpers, immediately hides static-tab skeletons, and calls hideMaintLoggingSkeleton() on AJAX success/error with a 15s fallback. systeminfo.php replaces static tab-panel placeholders with includes of the four skel_tab_sysinfo_*.php templates.

Possibly related PRs

  • netalertx/NetAlertX#1610: Both PRs modify front/deviceDetailsEvents.php — the main PR adds the events-tab skeleton markup and hides it in the AJAX handlers, while the retrieved PR modifies loadEventsData() behavior to early-return when mac is missing, affecting the same page's loading lifecycle.

Poem

🐇 Hop hop, the page used to sit bare and white,
Now shimmer-bones dance while the data takes flight!
Each skeleton glows with a soft silver sheen,
The smoothest of loading the browser has seen.
✨ And modals, once scattered, now live in one place —
A tidy warren of code, full of elegant grace!

🚥 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 'Next release' is vague and generic, providing no meaningful information about the actual changes in the pull request. Replace with a descriptive title that summarizes the main change, such as 'Add loading skeleton UI components for improved perceived performance' or 'Implement skeleton screens across multiple pages'.
✅ 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.

@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 (1)
front/settings.php (1)

328-344: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Potential runtime error if sectionHtml is undefined.

Line 330 calls sectionHtml.trim() without checking if sectionHtml is defined. If the overviewSections and overviewSectionsHtml arrays have mismatched lengths or if index goes out of bounds, overviewSectionsHtml[index] will be undefined, causing a TypeError when .trim() is called.

🛡️ Add defensive check for undefined
      const sectionHtml = overviewSectionsHtml[index];
 
-      if (sectionHtml.trim()) {
+      if (sectionHtml && sectionHtml.trim()) {
        overviewSections_html += `<div class="overview-section col-sm-12" id="${section}">
🤖 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/settings.php` around lines 328 - 344, The code at line 330 calls
sectionHtml.trim() without verifying that sectionHtml is defined, which will
cause a TypeError if overviewSectionsHtml[index] returns undefined due to array
length mismatch or index out of bounds. Before calling .trim() on sectionHtml
after retrieving it from overviewSectionsHtml[index], add a null/undefined check
to ensure the variable exists and is not undefined. You can combine this check
with the existing trim() validation by verifying sectionHtml is defined before
attempting to call any methods on it.
🧹 Nitpick comments (1)
front/css/app.css (1)

2605-2608: ⚡ Quick win

Keyframe name should use kebab-case convention.

The keyframe name settingsShimmer uses camelCase, which deviates from the CSS naming convention of kebab-case. Using settings-shimmer would align with standard CSS practices.

♻️ Rename to kebab-case
-@keyframes settingsShimmer {
+@keyframes settings-shimmer {
     0%   { background-position: -600px 0; }
     100% { background-position:  600px 0; }
 }

Also update the animation reference on line 2635:

-    animation: settingsShimmer 1.5s infinite linear;
+    animation: settings-shimmer 1.5s infinite linear;
🤖 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/css/app.css` around lines 2605 - 2608, The keyframe animation name
`settingsShimmer` uses camelCase instead of the CSS convention of kebab-case.
Rename the `@keyframes settingsShimmer` definition to `@keyframes
settings-shimmer` and update any animation references that use this keyframe
(such as the animation-name property on line 2635) to also use the kebab-case
name `settings-shimmer`.

Source: Linters/SAST tools

🤖 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/settings_skeleton.php`:
- Around line 11-13: Update the column classes in all skel-overview-card divs to
match the dynamically generated plugin cards in settings_utils.js. Replace the
current classes col-xs-6 col-sm-4 col-md-3 col-lg-2 col-xxl-1 with col-xs-12
col-sm-6 col-md-4 col-lg-3 for each skel-overview-card element. This change
should be applied to both the skeleton cards in lines 11-13 and the additional
cards in lines 20-22 to prevent layout shift when real content replaces the
skeleton.

---

Outside diff comments:
In `@front/settings.php`:
- Around line 328-344: The code at line 330 calls sectionHtml.trim() without
verifying that sectionHtml is defined, which will cause a TypeError if
overviewSectionsHtml[index] returns undefined due to array length mismatch or
index out of bounds. Before calling .trim() on sectionHtml after retrieving it
from overviewSectionsHtml[index], add a null/undefined check to ensure the
variable exists and is not undefined. You can combine this check with the
existing trim() validation by verifying sectionHtml is defined before attempting
to call any methods on it.

---

Nitpick comments:
In `@front/css/app.css`:
- Around line 2605-2608: The keyframe animation name `settingsShimmer` uses
camelCase instead of the CSS convention of kebab-case. Rename the `@keyframes
settingsShimmer` definition to `@keyframes settings-shimmer` and update any
animation references that use this keyframe (such as the animation-name property
on line 2635) to also use the kebab-case name `settings-shimmer`.
🪄 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: 3cd3659e-b516-4e9f-83f8-6b11b97dcd90

📥 Commits

Reviewing files that changed from the base of the PR and between 7b87814 and f562df9.

📒 Files selected for processing (8)
  • front/css/app.css
  • front/css/dark-patch.css
  • front/css/system-dark-patch.css
  • front/js/common.js
  • front/js/settings_utils.js
  • front/php/templates/header.php
  • front/php/templates/settings_skeleton.php
  • front/settings.php

Comment thread front/php/templates/settings_skeleton.php Outdated
jokob-sk added 3 commits June 20, 2026 10:09
- Created skeleton templates for events, notifications, plugins, presence, report, settings, and workflows to enhance loading states.
- Implemented structured skeletons for tab details, tab events, maintenance backup, database tools, logging, multi-edit, presence, sessions, and system info.
- Each template includes shimmer effects for loading indicators, improving user experience during data fetching.

@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: 6

🧹 Nitpick comments (1)
front/php/templates/skel_devices.php (1)

5-71: ⚡ Quick win

Refactor repeated skeleton blocks into loops to prevent drift.

This template has heavy copy/paste repetition (tiles + many table rows). Converting these blocks to loop-generated markup will keep future tweaks consistent and reduce accidental mismatches.

♻️ Example refactor pattern
-  <div class="row">
-    <div class="col-lg-2 col-sm-4 col-xs-6 padding-5px">
-      <div class="skel-tile">
-        ...
-      </div>
-    </div>
-    ... (repeated 6x)
-  </div>
+  <div class="row">
+    <?php for ($i = 0; $i < 6; $i++): ?>
+    <div class="col-lg-2 col-sm-4 col-xs-6 padding-5px">
+      <div class="skel-tile">
+        <div class="skel-tile-inner">
+          <div class="skel-tile-num skel-shimmer"></div>
+          <div class="skel-tile-label skel-shimmer"></div>
+        </div>
+        <div class="skel-tile-icon-area">
+          <div class="skel-tile-icon-shape skel-shimmer"></div>
+        </div>
+      </div>
+    </div>
+    <?php endfor; ?>
+  </div>
...
-        <div class="skel-tr">...</div>
-        ... (repeated many times)
+        <?php for ($r = 0; $r < 20; $r++): ?>
+        <div class="skel-tr">
+          <span class="skel-td skel-shimmer" style="flex:0.5"></span>
+          <?php for ($c = 0; $c < 5; $c++): ?>
+          <span class="skel-td skel-shimmer"></span>
+          <?php endfor; ?>
+        </div>
+        <?php endfor; ?>

Also applies to: 111-294

🤖 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/php/templates/skel_devices.php` around lines 5 - 71, The
skel_devices.php template contains six identical skeleton tile blocks with
col-lg-2 col-sm-4 col-xs-6 padding-5px divs that are repeated verbatim within
the row. Replace these six hardcoded blocks with a PHP loop (such as a for loop
from 1 to 6) that generates each identical skel-tile block dynamically. This
refactoring should also be applied to the other repetitive sections mentioned in
lines 111-294 (such as table rows with the same pattern) to maintain consistency
across the entire template and prevent future maintenance issues caused by
copy-paste drift.
🤖 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/events.php`:
- Around line 264-266: The anonymous function being assigned to window.onload in
the load handler registration overwrites any existing onload handlers, which can
break other initialization code. Replace the `window.onload = function () {
setTimeout(hideEventsSkeleton, 15000); }` assignment with
`window.addEventListener('load', function () { setTimeout(hideEventsSkeleton,
15000); })` to register the event handler non-destructively without overwriting
other handlers that may have already been registered.

In `@front/php/templates/footer.php`:
- Around line 46-48: The require statement for the modals template is using an
incorrect relative path that includes unnecessary directory nesting. Since
footer.php and modals.php are both located in the same templates directory,
change the require path from 'php/templates/modals.php' to simply 'modals.php'
to correctly reference the sibling file. This matches the correct pattern used
elsewhere in the file where other sibling files like migrationCheck.php are
required without the duplicate directory path.

In `@front/pluginsCore.php`:
- Around line 863-869: The current timeout handler only calls
hidePluginsSkeleton() but does not hide the spinner, which can leave the overlay
stuck if getData() fails. Modify the window load event listener's setTimeout
callback to call both hidePluginsSkeleton() and hideSpinner() to ensure the
spinner is removed in the fallback scenario. Additionally, locate the catch
block in the getData() function and add a hideSpinner() call there to
immediately remove the spinner on error, preventing the overlay from blocking
the page when the data fetch fails.

In `@front/presence.php`:
- Around line 512-518: The hidePresenceSkeleton function currently only removes
the `#presence-skeleton` element via jQuery fadeOut and remove, but does not clean
up the spinner element. To prevent UI lock when presence loading fails to
complete, modify the hidePresenceSkeleton function to also call hideSpinner()
within the completion callback of the fadeOut animation, ensuring both the
skeleton and spinner are cleared when the 15-second timeout fallback triggers.

In `@front/userNotifications.php`:
- Around line 224-226: The code directly assigns to window.onload which
overwrites any previously registered onload handlers. Instead of using direct
assignment in the onload handler that calls setTimeout with
hideNotificationsSkeleton, use window.addEventListener with the 'load' event to
register the callback additively. This ensures that other onload initializers
remain intact and your notification skeleton hiding logic executes without
overriding existing functionality.

In `@front/workflowsCore.php`:
- Around line 1380-1386: The hideWorkflowsSkeleton function currently only
removes the skeleton element but does not clear the spinner overlay. When the
15-second fallback timeout executes (because the workflows request stalled and
`.always()` never runs), both the skeleton and the spinner need to be hidden.
Add a call to hideSpinner() within the hideWorkflowsSkeleton function to ensure
the spinner overlay is cleared along with the skeleton when the timeout
triggers.

---

Nitpick comments:
In `@front/php/templates/skel_devices.php`:
- Around line 5-71: The skel_devices.php template contains six identical
skeleton tile blocks with col-lg-2 col-sm-4 col-xs-6 padding-5px divs that are
repeated verbatim within the row. Replace these six hardcoded blocks with a PHP
loop (such as a for loop from 1 to 6) that generates each identical skel-tile
block dynamically. This refactoring should also be applied to the other
repetitive sections mentioned in lines 111-294 (such as table rows with the same
pattern) to maintain consistency across the entire template and prevent future
maintenance issues caused by copy-paste drift.
🪄 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: 1b5272a8-8815-4e1c-a78b-c44537df7c9b

📥 Commits

Reviewing files that changed from the base of the PR and between cf8f395 and 36a10fb.

📒 Files selected for processing (43)
  • front/appEvents.php
  • front/css/app.css
  • front/deviceDetails.php
  • front/deviceDetailsEdit.php
  • front/deviceDetailsEvents.php
  • front/deviceDetailsPresence.php
  • front/deviceDetailsSessions.php
  • front/devices.php
  • front/events.php
  • front/maintenance.php
  • front/network.php
  • front/php/templates/footer.php
  • front/php/templates/migrationCheck.php
  • front/php/templates/skel_device_details.php
  • 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_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_workflows.php
  • front/plugins.php
  • front/pluginsCore.php
  • front/presence.php
  • front/report.php
  • front/settings.php
  • front/systeminfo.php
  • front/userNotifications.php
  • front/workflows.php
  • front/workflowsCore.php
💤 Files with no reviewable changes (2)
  • front/php/templates/skel_settings.php
  • front/network.php
✅ Files skipped from review due to trivial changes (11)
  • front/php/templates/skel_tab_maint_multiedit.php
  • front/php/templates/skel_tab_maint_dbtools.php
  • front/php/templates/skel_tab_maint_logging.php
  • front/php/templates/skel_device_details.php
  • front/php/templates/skel_workflows.php
  • front/php/templates/skel_tab_maint_backup.php
  • front/php/templates/skel_tab_details.php
  • front/php/templates/skel_tab_sessions.php
  • front/php/templates/migrationCheck.php
  • front/php/templates/skel_events.php
  • front/php/templates/skel_tab_events.php
🚧 Files skipped from review as they are similar to previous changes (2)
  • front/settings.php
  • front/css/app.css

Comment thread front/events.php Outdated
Comment thread front/php/templates/footer.php
Comment thread front/pluginsCore.php
Comment thread front/presence.php
Comment thread front/userNotifications.php Outdated
Comment thread front/workflowsCore.php
…dling and hide spinner in skeleton functions
@jokob-sk jokob-sk merged commit bfbe04e into main Jun 20, 2026
6 checks passed
This was referenced Jun 21, 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