Skip to content

add docs link for routing peer clarification in ResourcesTable#605

Open
mlsmaycon wants to merge 1 commit intomainfrom
add-info-for-resources
Open

add docs link for routing peer clarification in ResourcesTable#605
mlsmaycon wants to merge 1 commit intomainfrom
add-info-for-resources

Conversation

@mlsmaycon
Copy link
Copy Markdown
Contributor

@mlsmaycon mlsmaycon commented Apr 8, 2026

Issue ticket number and link

image

Documentation

Select exactly one:

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

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

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

netbirdio/docs#689

Summary by CodeRabbit

  • New Features
    • Added an informational link to NetBird documentation about routing peer access in the resources view. The link appears contextually and opens in a new tab with an external link indicator.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 8, 2026

📝 Walkthrough

Walkthrough

The ResourcesTable.tsx component was enhanced to include a conditional informational link to NetBird documentation about routing peer access. The link renders only on non-group pages and opens in a new tab with an external link icon. The DataTableRowsPerPage control was also wrapped in a fragment.

Changes

Cohort / File(s) Summary
ResourcesTable Enhancement
src/modules/networks/resources/ResourcesTable.tsx
Added imports for InlineLink and ExternalLinkIcon. Wrapped DataTableRowsPerPage in a fragment. Introduced conditional informational link pointing to NetBird docs that renders only when not on a group page, with external link icon and target="_blank" for new tab opening.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A helpful link hops into view,
When group pages aren't on cue,
To NetBird's docs it points the way,
New tabs open, bright as day! 📚✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding a documentation link for routing peer clarification in the ResourcesTable component.
Description check ✅ Passed The description follows the template structure with both required sections (Issue ticket and Documentation) completed, including the checked documentation checkbox and a valid docs PR URL.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-info-for-resources

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.

Copy link
Copy Markdown

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/modules/networks/resources/ResourcesTable.tsx`:
- Around line 220-229: The InlineLink that opens an external URL using
target="_blank" should include rel="noopener noreferrer" to prevent
window.opener access and referrer leakage; update the InlineLink instance in
ResourcesTable (the InlineLink wrapping "Trying to access resources on the
routing peer?" and containing ExternalLinkIcon) to add rel="noopener noreferrer"
whenever target="_blank" is used.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: ea800cc3-9441-4cd8-b9d0-c3f4244f83b8

📥 Commits

Reviewing files that changed from the base of the PR and between 9701e65 and 8174c8e.

📒 Files selected for processing (1)
  • src/modules/networks/resources/ResourcesTable.tsx

Comment on lines +220 to +229
<InlineLink
href={
"https://docs.netbird.io/manage/networks#manage-access-to-routing-peer"
}
target={"_blank"}
className={"text-xs whitespace-nowrap"}
>
Trying to access resources on the routing peer?
<ExternalLinkIcon size={12} />
</InlineLink>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add rel="noopener noreferrer" for external link security hardening.

The InlineLink component does not automatically inject rel attributes. When using target="_blank" with external URLs, explicitly adding rel="noopener noreferrer" is recommended to prevent the opened page from accessing window.opener and to avoid referrer leakage.

🛡️ Proposed fix
           <InlineLink
             href={
               "https://docs.netbird.io/manage/networks#manage-access-to-routing-peer"
             }
             target={"_blank"}
+            rel={"noopener noreferrer"}
             className={"text-xs whitespace-nowrap"}
           >
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<InlineLink
href={
"https://docs.netbird.io/manage/networks#manage-access-to-routing-peer"
}
target={"_blank"}
className={"text-xs whitespace-nowrap"}
>
Trying to access resources on the routing peer?
<ExternalLinkIcon size={12} />
</InlineLink>
<InlineLink
href={
"https://docs.netbird.io/manage/networks#manage-access-to-routing-peer"
}
target={"_blank"}
rel={"noopener noreferrer"}
className={"text-xs whitespace-nowrap"}
>
Trying to access resources on the routing peer?
<ExternalLinkIcon size={12} />
</InlineLink>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/modules/networks/resources/ResourcesTable.tsx` around lines 220 - 229,
The InlineLink that opens an external URL using target="_blank" should include
rel="noopener noreferrer" to prevent window.opener access and referrer leakage;
update the InlineLink instance in ResourcesTable (the InlineLink wrapping
"Trying to access resources on the routing peer?" and containing
ExternalLinkIcon) to add rel="noopener noreferrer" whenever target="_blank" is
used.

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