Remove blank target from internal links.#91
Merged
CodeMeAPixel merged 2 commits intodevelopmentfrom Apr 11, 2026
Merged
Conversation
feat: remove api related stuff for now
Comment on lines
418
to
423
| <DropdownMenuItem key={resource.title} asChild className="p-0 focus:bg-transparent"> | ||
| <a | ||
| href={resource.href} | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="flex items-start gap-3 rounded-lg p-3 hover:bg-accent/50 transition-colors group cursor-pointer w-full" | ||
| > |
There was a problem hiding this comment.
Bug: The code removes target="_blank" from all resource links, including those marked as external: true, causing them to open in the same tab instead of a new one.
Severity: MEDIUM
Suggested Fix
Modify the link rendering logic to conditionally add target="_blank" and rel="noopener noreferrer" when resource.external is true. For example: target={resource.external ? "_blank" : undefined}. This should be applied to both the desktop and mobile navigation components.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: packages/ui/components/Static/navigation.tsx#L418-L423
Potential issue: The change removes the `target="_blank"` attribute from all resource
links in the navigation menu, for both desktop and mobile views. However, the
`resources` data array contains items explicitly marked with `external: true` (e.g.,
"Client Area", "Game Panel"). The rendering logic ignores this `external` flag, causing
these external links to navigate away from the site in the same tab instead of opening a
new one. This contradicts the user expectation set by the accompanying `ExternalLink`
icon, which is still rendered next to these links.
Also affects:
packages/ui/components/Static/navigation.tsx:637~642
Did we get this right? 👍 / 👎 to inform future reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.