fix(dashboard): use Link for navigation buttons to support Ctrl+Click#494
Merged
fix(dashboard): use Link for navigation buttons to support Ctrl+Click#494
Conversation
Navigation action buttons in list pages used router.push via onClick,
preventing native browser behaviors like Ctrl+Click / Cmd+Click to open
in a new tab. Replaced with <Button asChild><Link href={...}> pattern
across both Dashboard and Dashboard OSS.
When the card wrapper is a Link, the inner "View Files" button doesn't need to be a Link too — clicking the card already navigates.
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.
Why we need this PR?
Navigation action buttons (Messages, Tasks, Details, View Session, etc.) in dashboard list pages use
router.pushviaonClickhandlers. This prevents native browser link behaviors — users cannot Ctrl+Click / Cmd+Click / middle-click to open in a new tab, or right-click to copy link.Describe your solution
Replace
<Button onClick={() => router.push(url)}>with<Button asChild><Link href={url}>for all navigation-only buttons. This renders proper<a>tags with button styling, enabling native browser link interactions while keeping the same visual appearance.Key decisions:
disabledstate (user page counts, task button) render as<Link>when enabled, plain disabled<Button>when not — since<a>tags don't supportdisabled.getSkillHrefprop. When provided, skill cards render as<Link>instead of<div onClick>, and "View Files" becomes a Link button.returnTofrom query params at click time stay asrouter.pushsince URLs depend on runtime state.onClickhandlers.Implementation Tasks
getSkillHrefprop to SkillList component — DashboarduseRouterimportsImpact Areas
Checklist
devbranch.