chore(deployments): Add link to failed jobs#1107
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR refactors the failed deployment popover to render clickable links to the release-targets page instead of plain text, and renames the URL search parameter from "resource" to "query" for consistency across both the link constructor and the parameter consumer. ChangesDeployment Status Link Navigation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
|
||
| function useResource() { | ||
| const [searchParams, setSearchParams] = useSearchParams(); | ||
| const query = searchParams.get("resource") ?? ""; |
There was a problem hiding this comment.
This is fixing an existing bug. The code was reading from resource but writing to the query param
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/web/app/routes/ws/deployments/_components/versioncard/VersionCard.tsx (1)
244-263: 💤 Low valueConsider adding
rel="noopener noreferrer"to the newLink.React Router v7 does not automatically add
rel="noopener noreferrer"fortarget="_blank"links. While browsers since 2021 implicitly setrel=noopenerfor anytarget="_blank"link making this low-risk in practice (especially for same-origin navigation), it's a zero-cost best practice worth following — and it avoids any potential lint warnings fromreact/jsx-no-target-blank.🛡️ Suggested fix
<Link key={rt.releaseTarget.resourceId} to={`/${workspace.slug}/deployments/${deployment.id}/release-targets?query=${encodeURIComponent(rt.resource.name)}`} target="_blank" + rel="noopener noreferrer" className="block text-xs hover:underline" onClick={(e) => e.stopPropagation()} >🤖 Prompt for 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. In `@apps/web/app/routes/ws/deployments/_components/versioncard/VersionCard.tsx` around lines 244 - 263, The Link rendering the release target list (the Link element in VersionCard / the JSX using rt.releaseTarget.resourceId) opens in a new tab via target="_blank" but doesn't include rel="noopener noreferrer"; update that Link to add rel="noopener noreferrer" alongside target="_blank" to prevent window.opener issues and satisfy react/jsx-no-target-blank linting while keeping onClick={(e) => e.stopPropagation()} and other props intact.
🤖 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.
Nitpick comments:
In `@apps/web/app/routes/ws/deployments/_components/versioncard/VersionCard.tsx`:
- Around line 244-263: The Link rendering the release target list (the Link
element in VersionCard / the JSX using rt.releaseTarget.resourceId) opens in a
new tab via target="_blank" but doesn't include rel="noopener noreferrer";
update that Link to add rel="noopener noreferrer" alongside target="_blank" to
prevent window.opener issues and satisfy react/jsx-no-target-blank linting while
keeping onClick={(e) => e.stopPropagation()} and other props intact.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5daabf8a-a971-4020-a744-7a3cf4b2df25
📒 Files selected for processing (2)
apps/web/app/routes/ws/deployments/_components/versioncard/VersionCard.tsxapps/web/app/routes/ws/deployments/page.$deploymentId.release-targets.tsx
|
Amazing! ty |
When checking the failed jobs on the UI, it's currently a bit cumbersome to go from the list of failures to find the job agent run with the link to the run you want to see. This PR makes the failed job name a link to the failed deployment target so it's a bit easier to know where to look and faster to get there
Screen.Recording.2026-05-05.at.5.28.48.PM.mov
Summary by CodeRabbit