Skip to content

Add profile id migration#781

Open
theodorsm wants to merge 3 commits into
mainfrom
profile-id
Open

Add profile id migration#781
theodorsm wants to merge 3 commits into
mainfrom
profile-id

Conversation

@theodorsm

@theodorsm theodorsm commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

This PR updates the docs with the new profile ids and names.

Summary by CodeRabbit

  • Documentation
    • Clarified profile identity: display names may repeat; profiles are tracked by generated unique IDs and a special reserved default ID.
    • GUI quickstart updated and ACTIVE marker examples added.
    • CLI docs expanded: profile add shows short ID and warns on duplicate names; list supports --show-id; select/remove/rename accept name, ID, or unique-ID prefix with clear not‑found/ambiguous errors.
    • Removal now prevents deleting active/default profiles and removes associated config/state; --profile follows the same handle rules and may prompt for authentication.

@coderabbitai

coderabbitai Bot commented Jun 8, 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 805439a5-7253-48de-b3f2-cf13cf55ca26

📥 Commits

Reviewing files that changed from the base of the PR and between 0eb0bd1 and 00ce719.

📒 Files selected for processing (2)
  • src/pages/client/profiles.mdx
  • src/pages/get-started/cli.mdx
✅ Files skipped from review due to trivial changes (1)
  • src/pages/client/profiles.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/pages/get-started/cli.mdx

📝 Walkthrough

Walkthrough

Documentation clarifies NetBird's multi-profile model (non-unique display names with generated IDs stored as <id>.json) and expands CLI netbird profile docs to define handle resolution (ID, ID prefix, or name), ACTIVE markers, --show-id, auth prompts, and remove/rename behaviors.

Changes

Profile Documentation

Layer / File(s) Summary
Profile naming and storage fundamentals
src/pages/client/profiles.mdx
Display names need not be unique; each profile has a generated unique ID (mapped to <id>.json); default uses reserved default ID; --profile flag resolves handles using the same rules.
CLI profile command syntax and handle rules
src/pages/client/profiles.mdx
`netbird profile <add
Add and rename behavior details
src/pages/client/profiles.mdx
profile add shows short generated ID on success, creates <id>.json in background, leaves client disconnected until netbird up/netbird login, and warns on duplicate names with list --show-id for disambiguation. profile rename only updates display name; ID, config, and login state remain unchanged; rename follows same handle/ambiguity rules.
List, select, and remove semantics
src/pages/client/profiles.mdx
profile list shows ACTIVE marker; --show-id adds an ID column. select/remove document "not found" vs "ambiguous" errors, require auth for unused profiles, and remove rejects active/default removal and deletes both <id>.json and <id>.state.json for resolved inactive profiles.
CLI quick reference updates
src/pages/get-started/cli.mdx, src/pages/client/profiles.mdx
Quickref bullets reworded: list notes --show-id; selectors for add/rename/remove/select clarified to accept name, ID, or unique-ID prefix.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • mlsmaycon

Poem

🐰 A rabbit writes in hop and rhyme,
Each profile holds its secret sign,
Names may match but IDs know,
Short handles help the CLI flow,
Hooray—profiles tidy, neat, and fine! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title 'Add profile id migration' does not accurately reflect the actual changes, which are documentation updates about profile identity and CLI handle semantics, not a profile ID migration feature. Revise the title to accurately describe the changes, such as 'Document profile identity and CLI handle semantics' or 'Update profile documentation with ID and name clarifications'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.

✏️ 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 profile-id

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.

ESLint install timed out. The project may have too many dependencies for the sandbox.


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 `@src/pages/client/profiles.mdx`:
- Around line 132-134: Update the top-level CLI usage placeholder string
"netbird profile <add|list|select|remove> [name|id]" to reflect that
select/remove also accept ID-prefix handles: change the bracketed operand to
include handle (e.g., "[name|id|handle]" or similar) so the documented usage for
the command symbol netbird profile and actions select/remove explicitly permits
handles while preserving name/id semantics for add/list.
🪄 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: cd7ac6d9-1092-440a-9057-609d22c26a78

📥 Commits

Reviewing files that changed from the base of the PR and between a8c86c4 and f503847.

📒 Files selected for processing (2)
  • src/pages/client/profiles.mdx
  • src/pages/get-started/cli.mdx

Comment thread src/pages/client/profiles.mdx
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