Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions packages/ui/components/Static/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,6 @@ export function Navigation() {
<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"
>
Comment on lines 418 to 423
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Expand Down Expand Up @@ -638,7 +637,6 @@ export function Navigation() {
<a
key={resource.title}
href={resource.href}
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-3 p-3 rounded-xl hover:bg-accent/50 transition-colors group"
onClick={() => setIsMobileMenuOpen(false)}
Expand Down
Loading