Skip to content

fix: incorrect URL on "Create a Cluster" button#2700

Merged
rmnbrd merged 5 commits into
stagingfrom
fix/cluster-creation-button-incorrect-path
May 21, 2026
Merged

fix: incorrect URL on "Create a Cluster" button#2700
rmnbrd merged 5 commits into
stagingfrom
fix/cluster-creation-button-incorrect-path

Conversation

@rmnbrd
Copy link
Copy Markdown
Contributor

@rmnbrd rmnbrd commented May 21, 2026

Summary

Issue: Slack thread

📺 Screen recoding of the issues

This PR fixes both of these bugs.

Screenshots / Recordings

Testing

  • Changes tested locally in the relevant Console's pages and Storybooks
  • yarn test or yarn test -u (if you need to regenerate snapshots)
  • yarn format
  • yarn lint

PR Checklist

  • I followed naming, styling, and TypeScript rules (see .cursor/rules)
  • I performed a self-review (diff inspected, dead code removed)
  • I titled the PR using Conventional Commits with a scope when possible (e.g. feat(service): add new Terraform service) - required for semantic-release
  • I only kept necessary comments, written in English (watch for useless AI comments)
  • I involved a designer to validate UI changes if I am not a designer
  • I covered new business logic with tests (unit)
  • I confirmed CI is green (Codecov red can be accepted)
  • I reviewed and executed locally any AI-assisted code

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 46.38%. Comparing base (428700d) to head (5008a2b).
⚠️ Report is 2 commits behind head on staging.

Files with missing lines Patch % Lines
...ure/src/lib/deployment-rules/deployement-rules.tsx 0.00% 1 Missing ⚠️
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     
Flag Coverage Δ
unittests 46.38% <0.00%> (+0.91%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rmnbrd rmnbrd force-pushed the fix/cluster-creation-button-incorrect-path branch from 39b294a to e8fbe4a Compare May 21, 2026 07:35
@rmnbrd rmnbrd marked this pull request as ready for review May 21, 2026 07:38
Copilot AI review requested due to automatic review settings May 21, 2026 07:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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/new with route params.
  • Add TanStack Router type registration (router-types.d.ts) to the projects domain lib tsconfig for typed navigation.
  • Simplify the global NotFoundPage default CTA and persist currentOrganizationId from 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.

Comment thread apps/console/src/app/components/not-found-page/not-found-page.tsx
Comment thread apps/console/src/routes/_authenticated/organization/$organizationId/route.tsx Outdated
@rmnbrd rmnbrd force-pushed the fix/cluster-creation-button-incorrect-path branch from e8fbe4a to 6e69fae Compare May 21, 2026 09:21
Comment thread apps/console/src/routes/_authenticated/organization/$organizationId/route.tsx Outdated
Comment thread apps/console/src/app/components/not-found-page/not-found-page.tsx
@rmnbrd rmnbrd merged commit 1d0f05d into staging May 21, 2026
10 checks passed
@rmnbrd rmnbrd deleted the fix/cluster-creation-button-incorrect-path branch May 21, 2026 15:25
@RemiBonnet
Copy link
Copy Markdown
Member

🎉 This PR is included in version 1.308.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants