Skip to content

Make Agent Network menu available via dashboard_features#709

Merged
mlsmaycon merged 7 commits into
mainfrom
feature/dashboard-features-support
Jul 13, 2026
Merged

Make Agent Network menu available via dashboard_features#709
mlsmaycon merged 7 commits into
mainfrom
feature/dashboard-features-support

Conversation

@mlsmaycon

@mlsmaycon mlsmaycon commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Issue ticket number and link

Adds dashboard support for the dashboard_features account setting
(backend: netbirdio/netbird#6742, merged) and extends the netbird.ai signup
flow to existing accounts. No settings-menu UI.

Signup source now branches on account existence
The merged flow only handled new accounts (set agent_network_only) and
discarded the source for existing ones. It now checks signup_form_pending:

  • New account → agent_network_only=true (focused view) and
    dashboard_features.agent_network=true.
  • Existing account → dashboard_features.agent_network=true (Agent Network
    menu made available, full dashboard kept).

Both paths set dashboard_features.agent_network. Setting it on new accounts
too means that if a focused account later turns the focused view off, it keeps
access to the Agent Network menu rather than losing it entirely (since the menu
would otherwise depend on agent_network_only).

There is no dashboard UI to write dashboard_features — it is set only by this
onboarding flow (the Client Settings toggle only controls agent_network_only).

Mode resolution

  • Account.settings.dashboard_features added to the interface (settings updates
    round-trip it).
  • useAgentNetworkMode() treats dashboard_features.agent_network === true as
    enabling the Agent Network menu — it feeds enabled, not only, so
    unlike agent_network_only it does not focus/hide the rest of the dashboard.

No onboarding change: the onboarding decision keys off only (+ signup
source), so a menu-available (existing) account gets the menu and reachable
Agent Network routes but no onboarding takeover. Onboarding for existing
accounts is a deliberate follow-up (they have no pending onboarding flags).

Tests (e2e)

  • dashboard_features.agent_network makes the Agent Network menu available
    while leaving the regular dashboard (Reverse Proxy) intact — enabled, not
    focused.
  • An existing netbird.ai account is marked with dashboard_features
    (agent_network=true), not agent_network_only.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

API-level plumbing of an account setting with no new user-facing UI; the
focused-view behavior and toggle are already documented (netbirdio/docs#848).

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

E2E tests

Optional: override the image tags used by the Playwright e2e workflow.
Defaults to main when omitted.

management-cloud-tag: main
reverse-proxy-tag: main

Summary by CodeRabbit

  • New Features
    • Added an account-level dashboard feature override to control whether the Agent Network section is available.
    • Agent Network can now be enabled independently of the Agent Network-only focused dashboard mode.
  • Bug Fixes
    • Improved Agent Network availability logic to combine deployment and per-account settings correctly.
    • Updated onboarding behavior so existing accounts can enable Agent Network without losing other sidebar sections (e.g., Reverse Proxy).
  • Tests
    • Added/expanded serial end-to-end coverage for menu visibility and for persisting the correct Agent Network settings during signup-source onboarding.

Wire the new dashboard_features account setting into the dashboard at the API
level: add it to the Account settings interface (so settings updates round-trip
it) and have useAgentNetworkMode treat dashboard_features.agent_network === true
as enabling the Agent Network menu alongside the full dashboard. Unlike
agent_network_only it does not focus the dashboard, and it does not trigger the
onboarding flow. No settings-menu UI yet; the field is set via the API.
@coderabbitai

coderabbitai Bot commented Jul 12, 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
📝 Walkthrough

Walkthrough

The account model now supports an Agent Network dashboard feature flag. Agent Network mode uses it for availability, while onboarding updates new and existing accounts differently. End-to-end tests cover navigation visibility and persisted settings.

Changes

Agent Network feature visibility

Layer / File(s) Summary
Account dashboard feature contract
src/interfaces/Account.ts
Adds the optional dashboard_features.agent_network account setting.
Agent Network visibility and onboarding
src/modules/agent-network/useAgentNetworkMode.ts, src/cloud/contexts/NetBirdCloudProvider.tsx
Enables Agent Network from the account flag and applies focused-view settings to new accounts or dashboard feature settings to existing accounts, with conditional notifications and signup-source cleanup.
Feature flag integration coverage
e2e/tests/agent-network-focused-view.spec.ts
Extends account mocks and verifies Agent Network visibility without focused view mode, plus persisted settings for new and existing accounts.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant NetBirdCloudProvider
  participant AccountAPI
  participant useAgentNetworkMode
  participant Sidebar
  NetBirdCloudProvider->>AccountAPI: Update dashboard_features.agent_network or agent_network_only
  AccountAPI-->>NetBirdCloudProvider: Return account settings
  AccountAPI->>useAgentNetworkMode: Provide dashboard feature state
  useAgentNetworkMode->>Sidebar: Enable Agent Network navigation
  Sidebar->>Sidebar: Keep regular sections visible
Loading

Possibly related PRs

Poem

I’m a bunny with a dashboard flag,
Agent Network hops onto the nav.
New accounts focus, old ones stay wide,
Their settings choose the proper side—
And Reverse Proxy keeps its ride!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: exposing Agent Network via dashboard_features.
Description check ✅ Passed It follows the template and covers the required sections, but the issue ticket/link field is still blank.
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 feature/dashboard-features-support

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.

The signup-source flow only handled new accounts (agent_network_only) and
discarded the source for existing accounts, so nothing set dashboard_features.
Branch on account existence: new accounts get the focused view, existing
accounts get the Agent Network menu made available via
dashboard_features.agent_network. Adds e2e coverage for the existing-account
write.
New accounts got agent_network_only (focused) but not
dashboard_features.agent_network, so turning the focused view off later would
remove the Agent Network menu entirely. Set both on new accounts so disabling
focus degrades to menu-available rather than losing access.
@braginini braginini self-requested a review July 13, 2026 14:41
@mlsmaycon mlsmaycon merged commit 377d239 into main Jul 13, 2026
6 checks passed
@mlsmaycon mlsmaycon deleted the feature/dashboard-features-support branch July 13, 2026 15:17
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.

2 participants