fix: incorrect URL on "Create a Cluster" button#2700
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## staging #2700 +/- ##
===========================================
+ Coverage 45.47% 46.38% +0.91%
===========================================
Files 1158 712 -446
Lines 24219 17340 -6879
Branches 7067 5129 -1938
===========================================
- Hits 11013 8044 -2969
+ Misses 11282 7849 -3433
+ Partials 1924 1447 -477
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
39b294a to
e8fbe4a
Compare
There was a problem hiding this comment.
Pull request overview
This PR fixes incorrect navigation when prompting users to create a cluster (notably from the Deployment Rules empty state) by switching to the typed TanStack Router route. It also adjusts global Not Found behavior and introduces persistence of the last visited organization ID.
Changes:
- Fix “Create a Cluster” button navigation to use
/organization/$organizationId/cluster/newwith route params. - Add TanStack Router type registration (
router-types.d.ts) to the projects domain lib tsconfig for typed navigation. - Simplify the global
NotFoundPagedefault CTA and persistcurrentOrganizationIdfrom the organization route.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| libs/domains/projects/feature/tsconfig.lib.json | Includes router type registration for typed router to strings within the library. |
| libs/domains/projects/feature/src/lib/deployment-rules/deployement-rules.tsx | Fixes the “Create a Cluster” button URL to the correct typed route + params. |
| apps/console/src/routes/_authenticated/organization/$organizationId/route.tsx | Persists the current org ID into localStorage from the org route. |
| apps/console/src/app/components/not-found-page/not-found-page.tsx | Simplifies default Not Found CTA to always link to /. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e8fbe4a to
6e69fae
Compare
|
🎉 This PR is included in version 1.308.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
Issue: Slack thread
📺 Screen recoding of the issues
This PR fixes both of these bugs.
Screenshots / Recordings
Testing
yarn testoryarn test -u(if you need to regenerate snapshots)yarn formatyarn lintPR Checklist
.cursor/rules)feat(service): add new Terraform service) - required for semantic-release