Skip to content

Update lazy connection docs for NB_LAZY_CONN#821

Open
lixmal wants to merge 1 commit into
mainfrom
docs-lazy-conn-env
Open

Update lazy connection docs for NB_LAZY_CONN#821
lixmal wants to merge 1 commit into
mainfrom
docs-lazy-conn-env

Conversation

@lixmal

@lixmal lixmal commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Updates the lazy connection docs for the client-side rework in netbirdio/netbird#6617: the experimental opt-in is replaced by a tri-state local override, and the desktop tray toggle is removed.

  • Replace NB_ENABLE_EXPERIMENTAL_LAZY_CONN with NB_LAZY_CONN (on/off/unset) in the client environment-variables reference
  • Rework the lazy-connection feature page: drop the removed system-tray toggle and the deprecated --enable-lazy-connection flag, document NB_LAZY_CONN and the lazyConnection MDM key as local overrides over the management setting

Depends on netbirdio/netbird#6617.

Note: the docs dev server could not render locally in this environment (pre-existing module-resolution error in src/components/Code.jsx, unrelated to these content-only edits), so no screenshots are attached.

Summary by CodeRabbit

  • Documentation
    • Updated environment variable guidance for lazy connections to use NB_LAZY_CONN with on/off values.
    • Clarified how local settings interact with management-configured behavior and how to override it.
    • Added updated instructions for applying the same override through MDM policy.
    • Noted that the override is temporary and must be re-applied after restarts.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Two documentation pages are updated to replace the removed NB_ENABLE_EXPERIMENTAL_LAZY_CONN variable with the stable NB_LAZY_CONN variable, adding on/off/unset semantics and MDM lazyConnection key instructions in the lazy connection guide.

Changes

Lazy Connection Variable Rename

Layer / File(s) Summary
NB_LAZY_CONN reference and override guide
src/pages/client/environment-variables.mdx, src/pages/manage/peers/lazy-connection.mdx
Environment variable table entry renamed from NB_ENABLE_EXPERIMENTAL_LAZY_CONN to NB_LAZY_CONN; lazy connection guide replaces experimental enable instructions with an override section documenting on/off/unset behavior, MDM lazyConnection key, and a note that the variable is not persistent across restarts.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 Hop hop, the flag has changed its name,
No more "experimental" in the game!
NB_LAZY_CONN stands proud and clear,
With on and off for all to hear.
The rabbit updates docs with glee~ 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: updating lazy connection documentation for NB_LAZY_CONN.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs-lazy-conn-env

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/pages/client/environment-variables.mdx

Oops! Something went wrong! :(

ESLint: 9.39.4

TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
| property 'configs' -> object with constructor 'Object'
| property 'flat' -> object with constructor 'Object'
| ...
| property 'plugins' -> object with constructor 'Object'
--- property 'react' closes the circle
Referenced from:
at JSON.stringify ()
at file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:308:45
at Array.map ()
at ConfigValidator.formatErrors (file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:299:23)
at ConfigValidator.validateConfigSchema (file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:330:84)
at ConfigArrayFactory._normalizeConfigData (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:676:19)
at ConfigArrayFactory._loadConfigData (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:641:21)
at ConfigArrayFactory._loadExtendedShareableConfig (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:946:21)
at ConfigArrayFactory._loadExtends (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:814:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:752:25)

src/pages/manage/peers/lazy-connection.mdx

Oops! Something went wrong! :(

ESLint: 9.39.4

TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
| property 'configs' -> object with constructor 'Object'
| property 'flat' -> object with constructor 'Object'
| ...
| property 'plugins' -> object with constructor 'Object'
--- property 'react' closes the circle
Referenced from:
at JSON.stringify ()
at file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:308:45
at Array.map ()
at ConfigValidator.formatErrors (file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:299:23)
at ConfigValidator.validateConfigSchema (file:///node_modules/@eslint/eslintrc/lib/shared/config-validator.js:330:84)
at ConfigArrayFactory._normalizeConfigData (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:676:19)
at ConfigArrayFactory._loadConfigData (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:641:21)
at ConfigArrayFactory._loadExtendedShareableConfig (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:946:21)
at ConfigArrayFactory._loadExtends (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:814:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody (file:///node_modules/@eslint/eslintrc/lib/config-array-factory.js:752:25)


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: 1

🧹 Nitpick comments (1)
src/pages/manage/peers/lazy-connection.mdx (1)

45-45: 📐 Maintainability & Code Quality | 🔵 Trivial

Consider title case consistency for the heading.

"on the agent" uses lowercase "agent" while other headings use title case (e.g., "How Automatic Disconnection Works"). Consider "Overriding Lazy Connections on the Agent" for consistency.

🤖 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 `@src/pages/manage/peers/lazy-connection.mdx` at line 45, The heading text in
the lazy connections docs is inconsistent with title case used elsewhere. Update
the Markdown heading in the relevant section to match the existing style by
capitalizing the noun in the phrase, and keep the change limited to the heading
string itself so the surrounding content and structure remain unchanged.
🤖 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 `@src/pages/manage/peers/lazy-connection.mdx`:
- Around line 42-43: The lazy connection inactivity threshold documentation is
inconsistent with the environment variable reference, so update the copy in the
lazy-connection page to match the actual default used for
NB_LAZY_CONN_INACTIVITY_THRESHOLD. Adjust the note around the inactivity
threshold text in that MDX file so it aligns with the value documented in the
environment variables page, keeping the same symbols and wording style already
used there.

---

Nitpick comments:
In `@src/pages/manage/peers/lazy-connection.mdx`:
- Line 45: The heading text in the lazy connections docs is inconsistent with
title case used elsewhere. Update the Markdown heading in the relevant section
to match the existing style by capitalizing the noun in the phrase, and keep the
change limited to the heading string itself so the surrounding content and
structure remain unchanged.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e4c49c06-bc7a-4534-87ac-dd8414d12a7f

📥 Commits

Reviewing files that changed from the base of the PR and between 1bfa2d1 and e35fce2.

📒 Files selected for processing (2)
  • src/pages/client/environment-variables.mdx
  • src/pages/manage/peers/lazy-connection.mdx

Comment on lines 42 to 43
The default inactivity threshold is <strong>60 minutes</strong>, and can be configured via the <code>NB_LAZY_CONN_INACTIVITY_THRESHOLD</code> environment variable (`60`).
</Note>

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 | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify the correct default for lazy connection inactivity threshold.

# Search for the default value in source code or other docs
rg -n 'LAZY_CONN_INACTIVITY_THRESHOLD' --type=go --type=md --type=mdx -C 2

Repository: netbirdio/docs

Length of output: 180


Align the inactivity threshold with the rest of the docs.
This note says the default is 60 minutes / 60, but src/pages/client/environment-variables.mdx uses 15m for NB_LAZY_CONN_INACTIVITY_THRESHOLD. Update this to match the actual default.

🤖 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 `@src/pages/manage/peers/lazy-connection.mdx` around lines 42 - 43, The lazy
connection inactivity threshold documentation is inconsistent with the
environment variable reference, so update the copy in the lazy-connection page
to match the actual default used for NB_LAZY_CONN_INACTIVITY_THRESHOLD. Adjust
the note around the inactivity threshold text in that MDX file so it aligns with
the value documented in the environment variables page, keeping the same symbols
and wording style already used there.

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