Make Agent Network menu available via dashboard_features#709
Conversation
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.
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe 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. ChangesAgent Network feature visibility
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
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
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.
Issue ticket number and link
Adds dashboard support for the
dashboard_featuresaccount 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) anddiscarded the source for existing ones. It now checks
signup_form_pending:agent_network_only=true(focused view) anddashboard_features.agent_network=true.dashboard_features.agent_network=true(Agent Networkmenu made available, full dashboard kept).
Both paths set
dashboard_features.agent_network. Setting it on new accountstoo 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 thisonboarding flow (the Client Settings toggle only controls
agent_network_only).Mode resolution
Account.settings.dashboard_featuresadded to the interface (settings updatesround-trip it).
useAgentNetworkMode()treatsdashboard_features.agent_network === trueasenabling the Agent Network menu — it feeds
enabled, notonly, sounlike
agent_network_onlyit does not focus/hide the rest of the dashboard.No onboarding change: the onboarding decision keys off
only(+ signupsource), 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_networkmakes the Agent Network menu availablewhile leaving the regular dashboard (Reverse Proxy) intact — enabled, not
focused.
dashboard_features(
agent_network=true), notagent_network_only.Documentation
Select exactly one:
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
mainwhen omitted.management-cloud-tag: main
reverse-proxy-tag: main
Summary by CodeRabbit