Skip to content

Add confirmation modal for adaptor changes with credentials #4413

Open
lmac-1 wants to merge 4 commits intomainfrom
4395-change-adaptor-type-credentials
Open

Add confirmation modal for adaptor changes with credentials #4413
lmac-1 wants to merge 4 commits intomainfrom
4395-change-adaptor-type-credentials

Conversation

@lmac-1
Copy link
Collaborator

@lmac-1 lmac-1 commented Feb 10, 2026

Description

When changing adaptors in the collaborative editor, users now see a confirmation modal warning that credentials will be reset. The modal only appears when:

  • Changing to a different adaptor package (not just version)
  • A credential is currently selected

Also optimizes Y.Doc synchronization to eliminate double-sync by ensuring version changes happen in a single operation rather than syncing @latest then the actual version.

Includes comprehensive test coverage for all confirmation scenarios.

Closes #4395

Validation steps

Setup:

  1. Open collaborative editor and select a job with an adaptor
  2. Click Connect and create a credential to add to that step

1. Confirmation appears when changing adaptors WITH credentials:

  1. Click on the adaptor on the step to open adaptor picker
  2. Select a different adaptor (e.g., switch from Salesforce to HTTP)
  3. Expected: "Change Adaptor?" confirmation modal appears with warning
  4. Click "Continue"
  5. Expected: Credential clears, adaptor changes, version auto-selects latest version number

2. No confirmation when changing adaptors WITHOUT credentials:

  1. Clear any selected credential
  2. Click "Change" and select different adaptor
  3. Expected: No confirmation, adaptor changes immediately

3. No confirmation when changing versions:

  1. With credential set, change version in dropdown (don't click "Change")
  2. Expected: No confirmation, version changes immediately

4. Cancel preserves state:

  1. With credential set, click "Change" → select different adaptor
  2. Click "Cancel" on confirmation
  3. Expected: Original adaptor and credential unchanged, modal stays open

Additional notes for the reviewer

  1. NOTE: Pressing Escape when the confirmation modal is open closes everything (confirmation + modal + inspector).
    This is consistent with existing behaviour for delete/reset confirmations throughout Inspector. If we want to
    change this so Escape only closes the confirmation dialog (leaving the parent modal open), that should be
    handled in a separate issue as it would require reworking how AlertDialog integrates with the keyboard
    shortcut priority system across the application.

AI Usage

Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):

  • I have used Claude Code
  • I have used another model
  • I have not used AI

You can read more details in our
Responsible AI Policy

Pre-submission checklist

  • I have performed an AI review of my code (we recommend using /review
    with Claude Code)
  • I have implemented and tested all related authorization policies.
    (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

When changing adaptors in the collaborative editor, users now see a
confirmation modal warning that credentials will be reset. The modal
only appears when:
- Changing to a different adaptor package (not just version)
- A credential is currently selected

Also optimizes Y.Doc synchronization to eliminate double-sync by
ensuring version changes happen in a single operation rather than
syncing @latest then the actual version.

Includes comprehensive test coverage for all confirmation scenarios.
@github-project-automation github-project-automation bot moved this to New Issues in v2 Feb 10, 2026
@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.31%. Comparing base (6f7c1ab) to head (ccf442b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4413      +/-   ##
==========================================
- Coverage   89.38%   89.31%   -0.07%     
==========================================
  Files         425      425              
  Lines       20135    20135              
==========================================
- Hits        17997    17983      -14     
- Misses       2138     2152      +14     

☔ 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.

@lmac-1
Copy link
Collaborator Author

lmac-1 commented Feb 10, 2026

@theroinaochieng this is ready for review. I have assigned you as one of the reviewers but please reassign depending on dev availability, thanks!

Copy link
Contributor

@doc-han doc-han left a comment

Choose a reason for hiding this comment

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

The changes work fine in the JobForm but not for the FullScreenIDE. Hence, when I'm on the canvas and update the job form that's fine but when I'm in the code editor, the previous behaviour persists

@github-project-automation github-project-automation bot moved this from New Issues to In review in v2 Feb 18, 2026
@lmac-1
Copy link
Collaborator Author

lmac-1 commented Feb 18, 2026

Great catch @doc-han - will get this done now.

@lmac-1
Copy link
Collaborator Author

lmac-1 commented Feb 18, 2026

Anyone else looking at this - please hold off from reviewing further until tagged - I am uniting the adaptor configuration component today.

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

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

Changing adaptor type doesn't reset credentials

2 participants

Comments