Skip to content

Conversation

elibosley
Copy link
Member

@elibosley elibosley commented Oct 16, 2025

Summary by CodeRabbit

Release Notes

  • Chores
    • Streamlined the remote access update workflow by removing an unnecessary step previously executed during remote access configuration changes, resulting in a more efficient update process.

Copy link
Contributor

coderabbitai bot commented Oct 16, 2025

Walkthrough

A blank line and a networkService.reloadNetworkStack() function call were removed from the updateRemoteAccess flow in the connect settings service. This simplifies the remote access update process by eliminating an explicit network stack reload step.

Changes

Cohort / File(s) Change Summary
Network stack reload simplification
packages/unraid-api-plugin-connect/src/unraid-connect/connect-settings.service.ts
Removed extraneous blank line and deleted networkService.reloadNetworkStack() call from updateRemoteAccess flow

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

🐰 A hop through the code, so lean and so clean,
One call was removed from the remote access scene,
The network stack flows without that reload,
Simpler the path down this well-traveled road! 🌟

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly and accurately describes the primary change by noting the removal of an unnecessary network stack reload in ConnectSettingsService as part of a refactor, directly reflecting the modifications in the diff without introducing extraneous information. It is clear, specific, and concise, enabling teammates to understand the main intent at a glance.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/duplicate-nginx-reload-calls-with-remote-access

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines 244 to 247
},
});

await this.networkService.reloadNetworkStack();
return true;

Choose a reason for hiding this comment

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

P1 Badge Regresses network reload when remote access update fails

After updateRemoteAccess updates the config it now immediately returns, relying on DynamicRemoteAccessService.enableDynamicRemoteAccess to emit events that reload nginx/DNS. That service swallows exceptions and may return early without emitting the ENABLE_WAN_ACCESS/DISABLE_WAN_ACCESS events (e.g. UpnpRemoteAccessService.stop() throws before the event is emitted). Prior to this change the method unconditionally awaited networkService.reloadNetworkStack(), ensuring the new connect.config.wanaccess value was applied even when the dynamic service failed. With the fallback removed, disabling WAN access can silently leave the previous nginx configuration active until another component triggers a reload, keeping WAN access exposed longer than intended.

Useful? React with 👍 / 👎.

Copy link

codecov bot commented Oct 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.64%. Comparing base (8cd2a4c) to head (aa163b2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1751   +/-   ##
=======================================
  Coverage   52.64%   52.64%           
=======================================
  Files         866      866           
  Lines       49335    49335           
  Branches     4940     4940           
=======================================
  Hits        25972    25972           
  Misses      23290    23290           
  Partials       73       73           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

This plugin has been deployed to Cloudflare R2 and is available for testing.
Download it at this URL:

https://preview.dl.unraid.net/unraid-api/tag/PR1751/dynamix.unraid.net.plg

Copy link
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: 0

Caution

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

⚠️ Outside diff range comments (1)
packages/unraid-api-plugin-connect/src/unraid-connect/connect-settings.service.ts (1)

209-248: Restore network stack reload call
enableDynamicRemoteAccess and its services don’t trigger any network reload, so removing networkService.reloadNetworkStack() breaks the update flow. Re-add the reload in updateRemoteAccess or implement it within DynamicRemoteAccessService to restore the previous behavior.

🧹 Nitpick comments (1)
packages/unraid-api-plugin-connect/src/unraid-connect/connect-settings.service.ts (1)

44-44: Remove unused NetworkService injection
The NetworkService import and constructor parameter in ConnectSettingsService are unused. Remove both to clean up dead code.

-import { NetworkService } from '../network/network.service.js';-        private readonly networkService: NetworkService
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8cd2a4c and aa163b2.

📒 Files selected for processing (1)
  • packages/unraid-api-plugin-connect/src/unraid-connect/connect-settings.service.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Use TypeScript import specifiers with .js extensions for ESM compatibility
Never use the any type; prefer precise typing
Avoid type casting; model proper types from the start

Files:

  • packages/unraid-api-plugin-connect/src/unraid-connect/connect-settings.service.ts

@elibosley elibosley requested a review from pujitm October 16, 2025 17:33
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