Skip to content

Conversation

@tanushree-akamai
Copy link
Contributor

Description 📝

This PR implements the Add Lock modal accessible from the Linode action menu.

Changes 🔄

List any change(s) relevant to the reviewer.

  • Implemented Add Lock Dialog
  • Integrated Add Lock dialog with the Lock option in Linode action menu
  • Implemented unit tests for the dialog

Scope 🚢

Upon production release, changes in this PR will be visible to:

  • All customers
  • Some customers (e.g. in Beta or Limited Availability)
  • No customers / Not applicable

Preview 📷

Screen.Recording.2026-01-28.at.11.15.07.PM.mov

How to test 🧪

Reproduction steps

  • Open DevTools Panel
  • Enable the Resource Lock feature: Find resourceLock -> linodes ->Toggle to true
  • In DevTools Panel, navigate to "MSW" section
  • Enable CRUD mocks: Toggle "Enable MSW" to ON -> Select "CRUD" preset
  • In DevTools Panel, navigate to "Seeds" section -> Set seed counts: Linodes: 10, Resource Locks: 5
  • Navigate to "User Permissions" section
  • Select "Custom User Account Permissions"
  • Click "Edit" to modify permissions
  • Update the permissions array to include lock permissions:
    [ "create_lock", "delete_lock" ]
  • Click on Apply

Verification steps

  • Navigate to /linodes
  • Click on Linode action menu and select Lock
  • Verify Add Lock Dialog launches
  • Verify notification toast on success
  • Verify notification on error
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 tests and CI checks are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

Comment on lines 38 to 44
/**
* Validation error with optional field name for API error responses
*/
interface ValidationError {
field?: string;
reason: string;
}
Copy link
Member

Choose a reason for hiding this comment

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

Could we just reuse the existing APIError type from @linode/api-v4?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in a4f19d8


expect(getByText('Prevent deletion')).toBeVisible();
expect(
getByText('Protects this Linode from being deleted or rebuilt.')
Copy link
Contributor

Choose a reason for hiding this comment

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

This text needs to be updated to fix this failing test case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in 422b6b3

@tanushree-akamai tanushree-akamai force-pushed the feature/UIE-9741-resprot2-add-lock-modal branch from df1420d to 422b6b3 Compare January 29, 2026 15:58
<FormControlLabel
control={<Radio />}
label={
<LockOptionLabel
Copy link
Contributor

Choose a reason for hiding this comment

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

As per figma(not sure whether this is the latest one), text for options should be right aligned with radio button.

Image

Copy link
Contributor

Choose a reason for hiding this comment

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

When Add lock dialog is opened from linode details page, onClose is not working. Both Cancel and submit actions are not closing the dialog

@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 1 failing test on test run #5 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
1 Failing864 Passing11 Skipped37m 6s

Details

Failing Tests
SpecTest
clone-linode.spec.tsCloud Manager Cypress Tests→clone linode » can clone a Linode from Linode details page

Troubleshooting

Use this command to re-run the failing tests:

pnpm cy:run -s "cypress/e2e/core/linodes/clone-linode.spec.ts"

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

Labels

Projects

Status: Review

Development

Successfully merging this pull request may close these issues.

4 participants