Skip to content

tech-stories: [M3-10023] - The final boss: Linodes Reroute#12363

Merged
abailly-akamai merged 23 commits intolinode:developfrom
abailly-akamai:M3-10023
Jun 26, 2025
Merged

tech-stories: [M3-10023] - The final boss: Linodes Reroute#12363
abailly-akamai merged 23 commits intolinode:developfrom
abailly-akamai:M3-10023

Conversation

@abailly-akamai
Copy link
Contributor

@abailly-akamai abailly-akamai commented Jun 10, 2025

Description 📝

Rerouting the last feature: Linodes

As much as I tried to keep a reasonable scope & diff size for the routing refactor, it's hard to break things down and Linodes is a big feature.

This PR does not remove (yet) react router dom from teh codebase, just reroute this particular chunk. A LOT of the diff is also due to extra mocking on our unit tests.

Changes 🔄

  • Replace routing utils
  • Adjust components code structure accordingly
  • Implement new sorting and pagination utils
  • Fixes a test where cloning a linode would break sorting and linode selection table (we would see all linodes VS the one we're trying to clone)
  • Update unit tests
  • Update e2e tests

Preview 📷

There should be no visual or functional regression as a result of this PR

How to test 🧪

Verification steps

Landing

  • /linodes

Create Route

  • /linodes/create

Detail Routes

  • /linodes/$linodeId
  • /linodes/$linodeId/clone
  • /linodes/$linodeId/clone/configs
  • /linodes/$linodeId/clone/disks
  • /linodes/$linodeId/analytics
  • /linodes/$linodeId/networking
  • /linodes/$linodeId/networking/interfaces
  • /linodes/$linodeId/networking/interfaces/$interfaceId (where $interfaceId is a number)
  • /linodes/$linodeId/storage
  • /linodes/$linodeId/configurations
  • /linodes/$linodeId/configurations/upgrade-interfaces
  • /linodes/$linodeId/backup
  • /linodes/$linodeId/activity
  • /linodes/$linodeId/settings
  • /linodes/$linodeId/alerts
  • /linodes/$linodeId/metrics

👉 Test all paths and confirm

  • behavior & flow
  • table sorting & ordering when applicable
  • submit redirects
  • links to other entities
  • tests
Author Checklists

As an Author, to speed up the review process, I considered 🤔

👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support

  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All unit tests are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@abailly-akamai abailly-akamai self-assigned this Jun 10, 2025
@abailly-akamai abailly-akamai force-pushed the M3-10023 branch 4 times, most recently from ed7044f to 757ec00 Compare June 12, 2025 20:37
@abailly-akamai abailly-akamai changed the title tech-stories: [M3-10023] - Ze Linode Reroute tech-stories: [M3-10023] - The big boss: Linodes Reroute Jun 12, 2025
@abailly-akamai abailly-akamai marked this pull request as ready for review June 12, 2025 21:11
@abailly-akamai abailly-akamai requested review from a team as code owners June 12, 2025 21:11
@abailly-akamai abailly-akamai requested review from bnussman-akamai, jdamore-linode and pmakode-akamai and removed request for a team June 12, 2025 21:11
@abailly-akamai abailly-akamai changed the title tech-stories: [M3-10023] - The big boss: Linodes Reroute tech-stories: [M3-10023] - The final boss: Linodes Reroute Jun 12, 2025
const regionQuery = `&regionID=${linode.region}`;
const typeQuery = linode.type ? `&typeID=${linode.type}` : '';
return `/linodes/create?linodeID=${linode.id}${regionQuery}&type=Clone+Linode${typeQuery}`;
return `/linodes/create?linodeID=${linode.id}${regionQuery}&type=Clone%20Linode${typeQuery}`;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the new router is more strict about params encoding/decoding, which is good!

});

// Confirm can navigate to Linode after success
cy.visitWithLogin(`/linodes/${mockLinode.id}`);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think something was amiss with this last step. Not sure how it passed before

Copy link
Contributor

Choose a reason for hiding this comment

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

Opening up the upgrade interface dialog used to just append /upgrade-interfaces to the end of the route, so if you opened the dialog on /linodes/$linodeID, closing it would take you back there

with the new routing updates, I think correct behavior for this test would be to confirm the url ends with linodes/mockLinode.id/configurations if you don't click the navigate to network settings button

subtype: params.subtype ?? undefined,
type: params.type ?? undefined,
}),
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this could be trimmed and optimized, but this touches so many files using this util i wanted to keep things scoped. I'll make a ticket to make this util more aligned with the new router's API

Copy link
Contributor

@coliu-akamai coliu-akamai left a comment

Choose a reason for hiding this comment

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

so awesome to see this pr up - thanks for all your hard work on this, Alban! 🎉

breaking up my review of this into multiple passes to make sure I look over stuff as carefully as possible. Currently reviewed:

✅ linode landing - order by, pagination and list/grid view (I've been using msw for pagination/order by - could you remind me if there's a shared account with a large # of Linodes we could use?)
✅ Linode create - tabs look good
✅ linode interfaces - upgrade dialog

left a comment regarding linode interfaces - detail drawer

});

// Confirm can navigate to Linode after success
cy.visitWithLogin(`/linodes/${mockLinode.id}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Opening up the upgrade interface dialog used to just append /upgrade-interfaces to the end of the route, so if you opened the dialog on /linodes/$linodeID, closing it would take you back there

with the new routing updates, I think correct behavior for this test would be to confirm the url ends with linodes/mockLinode.id/configurations if you don't click the navigate to network settings button

@@ -0,0 +1,9 @@
import { createLazyRoute } from '@tanstack/react-router';
Copy link
Contributor

Choose a reason for hiding this comment

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

qq, are we no longer putting lazy routes in their own file in the routes package?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good eyes! Correct, @bnussman-akamai found that it created issues with lazy loading. There will be follow up tickets to change this in other features

Comment on lines +61 to +64
navigate({
to: '/linodes/$linodeId/configurations/upgrade-interfaces',
params: { linodeId },
});
Copy link
Contributor

Choose a reason for hiding this comment

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

thank you!! 🚀 🚀

(discovered while testing that this takes care of a bug when trying to open up the upgrade dialog in Linode Landing, summary view)

@coliu-akamai coliu-akamai self-requested a review June 16, 2025 20:14
@coliu-akamai coliu-akamai self-requested a review June 16, 2025 20:27
@coliu-akamai
Copy link
Contributor

coliu-akamai commented Jun 18, 2025

Linode Interfaces - when navigating to an interface from the firewall page, the detail drawer doesn't open:

firewall-interface-details-drawer.mov

^ same issue for navigating to a Linode Interface from the VPC subnet table page

small issue, I also noticed that after closing the details drawer, /interfaces is still at the end of the url
image

Copy link
Contributor

@coliu-akamai coliu-akamai left a comment

Choose a reason for hiding this comment

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

Thanks Alban! went through rest of Linode pages, things are looking good from what I've seen! (one small thing for /linodes/id/storage page below)

✅ /linodes/$linodeId
✅ /linodes/$linodeId/clone
✅ /linodes/$linodeId/clone/configs
✅ /linodes/$linodeId/clone/disks
✅ /linodes/$linodeId/analytics
✅ /linodes/$linodeId/networking
✅ /linodes/$linodeId/networking/interfaces
✅ /linodes/$linodeId/networking/interfaces/$interfaceId
✅ /linodes/$linodeId/storage (see below)
✅ /linodes/$linodeId/configurations
✅ /linodes/$linodeId/configurations/upgrade-interfaces
✅ /linodes/$linodeId/backup
✅ /linodes/$linodeId/activity
✅ /linodes/$linodeId/settings
✅ /linodes/$linodeId/alerts
✅ /linodes/$linodeId/metrics
✅ links to other entities like firewalls/vpcs/lke
✅ submit redirects

When on /linodes/id/storage, I noticed that sorting the Volumes table affects the disk table (and sorting the Disk table affects the arrows for the Volumes table) - see video

prod this branch
prod-order-by-storage.mov
this-branch-order-by-storage.mov

@github-project-automation github-project-automation bot moved this from Review to Approved in Cloud Manager Jun 23, 2025
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 666 passing tests on test run #22 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing666 Passing4 Skipped123m 58s

@abailly-akamai abailly-akamai merged commit 20e6abb into linode:develop Jun 26, 2025
35 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Merged in Cloud Manager Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants