Add confirmation modal for adaptor changes with credentials #4413
Add confirmation modal for adaptor changes with credentials #4413
Conversation
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.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4413 +/- ##
=======================================
Coverage 89.36% 89.36%
=======================================
Files 425 425
Lines 20187 20187
=======================================
Hits 18041 18041
Misses 2146 2146 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@theroinaochieng this is ready for review. I have assigned you as one of the reviewers but please reassign depending on dev availability, thanks! |
doc-han
left a comment
There was a problem hiding this comment.
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
|
Great catch @doc-han - will get this done now. |
|
Anyone else looking at this - please hold off from reviewing further until tagged - I am uniting the adaptor configuration component today. |
|
I decided to refactor this into a shared component so that in future there won't be more problems like this. But it took a bit longer than expected and DR project took over yesterday. Hoping to finish this off today or tomorrow. |
|
Sorry still not finished. Proving to be quite gnarly because of the modals on top of modals in FullScreenIDE. I have to prioritise some documents for the DR project proposal for the rest of the day so will have to stop now. |
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:
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.
Validation steps
Setup:
1. Confirmation appears when changing adaptors WITH credentials:
2. No confirmation when changing adaptors WITHOUT credentials:
3. No confirmation when changing versions:
4. Cancel preserves state:
Additional notes for the reviewer
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!):
You can read more details in our
Responsible AI Policy
Pre-submission checklist
/reviewwith Claude Code)
(e.g.,
:owner,:admin,:editor,:viewer)