Skip to content

Next release#1685

Merged
jokob-sk merged 4 commits into
mainfrom
next_release
Jun 21, 2026
Merged

Next release#1685
jokob-sk merged 4 commits into
mainfrom
next_release

Conversation

@jokob-sk

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

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

Release Notes

  • New Features
    • Added a “Wait for settings reload” option to control whether the UI blocks while backend changes apply.
  • Changes / Enhancements
    • Updated settings save behavior to support both legacy and JSON responses.
    • When reload isn’t required, settings save now shows a background success message; when it is required, it performs the appropriate reload-related handling.
  • Bug Fixes
    • Improved detection of when plugin changes require waiting/reload.

@coderabbitai

coderabbitai Bot commented Jun 21, 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: 99509d5e-babe-4f75-bb04-dbf868982827

📥 Commits

Reviewing files that changed from the base of the PR and between f52e303 and 39024d3.

📒 Files selected for processing (4)
  • front/plugins/avahi_scan/config.json
  • front/plugins/nbtscan_scan/config.json
  • front/plugins/nslookup_scan/config.json
  • front/plugins/ui_settings/config.json
✅ Files skipped from review due to trivial changes (3)
  • front/plugins/nbtscan_scan/config.json
  • front/plugins/nslookup_scan/config.json
  • front/plugins/avahi_scan/config.json

📝 Walkthrough

Walkthrough

The PR adds a WAIT_FOR_SETTINGS boolean option to the ui_settings plugin config and implements backend logic in util.php to determine whether the frontend must block after saving settings. The PHP saveSettings() endpoint now returns a JSON response instead of "OK", the frontend AJAX handler parses this to conditionally clear cache or show a background-save message, and three plugin display names are updated alongside a minor localization structure fix.

Changes

Conditional reload-wait after settings save

Layer / File(s) Summary
Backend reload-wait detection and response
front/php/server/util.php, front/plugins/ui_settings/config.json
Registers WAIT_FOR_SETTINGS as a boolean checkbox in the ui_settings plugin. saveSettings() now returns { success: true, requiresReloadWait } instead of "OK". getReloadWaitRequired() forces a wait when UI_WAIT_FOR_SETTINGS is enabled or when the normalized LOADED_PLUGINS list has changed. normalizePluginList() canonicalizes plugin list values (PHP arrays, JSON arrays, Python-style single-quoted lists) into a sorted JSON string for stable equality comparison.
Frontend response parsing and UI messaging
front/settings.php, front/php/templates/language/en_us.json
The saveSettings() AJAX success handler detects legacy "OK" or parses { success: true, requiresReloadWait }, calling clearCache() only when reload wait is required and displaying the new settings_saved_background message otherwise. Adds the settings_saved_background translation key to en_us.json.
Plugin config and localization updates
front/plugins/avahi_scan/config.json, front/plugins/nbtscan_scan/config.json, front/plugins/nslookup_scan/config.json, front/plugins/ui_settings/config.json
Updates the English display names for three plugin scanners from "(Name discovery)" to "(Naming)". Adds missing language_code fields to the DEFAULT_PAGE_SIZE setting's localization structure in the ui_settings plugin config.

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant settings.php as settings.php (JS)
  participant util.php as saveSettings() (PHP)
  participant getReloadWaitRequired as getReloadWaitRequired()
  participant normalizePluginList as normalizePluginList()

  Browser->>settings.php: User clicks Save
  settings.php->>util.php: AJAX POST new settings
  util.php->>getReloadWaitRequired: $decodedSettings
  getReloadWaitRequired->>normalizePluginList: normalize old LOADED_PLUGINS
  getReloadWaitRequired->>normalizePluginList: normalize new LOADED_PLUGINS
  normalizePluginList-->>getReloadWaitRequired: sorted JSON strings
  getReloadWaitRequired-->>util.php: requiresReloadWait (bool)
  util.php-->>settings.php: { success: true, requiresReloadWait }
  alt requiresReloadWait == true
    settings.php->>Browser: clearCache() — blocking reload
  else requiresReloadWait == false
    settings.php->>Browser: show settings_saved_background message
  end
Loading

Poem

🐇 Hop hop, the settings save with grace,
No more waiting, just background pace!
Plugin lists compared with care,
A JSON flag floats through the air.
Only when plugins truly change,
Does the reload lock the range. ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.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 title "Next release" is vague and generic, providing no meaningful information about the actual changes in the changeset. Use a more descriptive title that summarizes the primary changes, such as "Add reload-wait detection for settings changes and update plugin display names" or "Implement backend reload detection and improve UI settings configuration".
✅ 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 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

🤖 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 `@server/initialise.py`:
- Line 460: The metadata definition for the boolean dataType in initialise.py
has an elementType set to "checkbox" which does not match the expected parser
contract in helper.py that requires elementType to be "input" for dataType
"boolean". Change the elementType value from "checkbox" to "input" in the JSON
string that defines the boolean metadata structure to align with the backend
boolean conversion path and ensure consistent normalization for
UI_WAIT_FOR_SETTINGS.
🪄 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: b6bd4726-7371-4f88-b4c5-6954cf212c6d

📥 Commits

Reviewing files that changed from the base of the PR and between 4abfbf6 and e879892.

📒 Files selected for processing (5)
  • front/php/server/util.php
  • front/php/templates/language/en_us.json
  • front/settings.php
  • server/conf.py
  • server/initialise.py

Comment thread server/initialise.py Outdated
@jokob-sk jokob-sk merged commit f1a081d into main Jun 21, 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