Skip to content

upcoming: [UIE-9741] - Implement Add Lock Modal.#13339

Merged
tanushree-akamai merged 8 commits intolinode:developfrom
tanushree-akamai:feature/UIE-9741-resprot2-add-lock-modal
Feb 2, 2026
Merged

upcoming: [UIE-9741] - Implement Add Lock Modal.#13339
tanushree-akamai merged 8 commits intolinode:developfrom
tanushree-akamai:feature/UIE-9741-resprot2-add-lock-modal

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

@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
Copy link
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 implements the Add Lock modal feature, allowing users to apply locks to Linodes directly from the action menu. The implementation includes support for two lock types: preventing deletion only, or preventing deletion including attached resources.

Changes:

  • Added AddLockDialog component with lock type selection UI and integration with the locks API
  • Connected the dialog to Linode action menus in both list and card views, as well as detail pages
  • Implemented comprehensive unit tests for the dialog component
  • Updated MSW mock handlers to properly validate and create locks with improved error handling

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/manager/src/features/Linodes/LinodesDetail/LinodeLock/AddLockDialog.tsx New dialog component implementing the Add Lock UI with radio options for lock types
packages/manager/src/features/Linodes/LinodesDetail/LinodeLock/AddLockDialog.test.tsx Comprehensive test suite covering dialog behavior, lock type selection, and API interactions
packages/manager/src/features/Linodes/LinodesLanding/LinodesLanding.tsx Integrated Add Lock dialog with state management and handlers in the Linodes landing page
packages/manager/src/features/Linodes/LinodesDetail/LinodesDetailHeader/LinodeDetailHeader.tsx Added Add Lock dialog to Linode detail header with corresponding state and handlers
packages/manager/src/features/Linodes/LinodesLanding/LinodeActionMenu/LinodeActionMenu.tsx Enabled the Lock action to trigger the Add Lock dialog
packages/manager/src/features/Linodes/types.ts Added 'add_lock' to DialogType union
packages/manager/src/mocks/presets/crud/handlers/locks.ts Enhanced mock validation to return properly structured API errors
packages/manager/src/features/Linodes/LinodesLanding/ListView.tsx Connected Add Lock handler to list view row actions
packages/manager/src/features/Linodes/LinodesLanding/CardView.tsx Connected Add Lock handler to card view actions
packages/manager/.changeset/pr-13339-upcoming-features-1769622645991.md Added changeset entry for the feature

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…645991.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-project-automation github-project-automation bot moved this from Review to Approved in Cloud Manager Feb 2, 2026
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 865 passing tests on test run #8 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing865 Passing11 Skipped42m 2s

@tanushree-akamai tanushree-akamai merged commit 0b2a2da into linode:develop Feb 2, 2026
35 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Merged in Cloud Manager Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RESPROT-2 Resource Locking

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants