From 440f43d1b582d6205b4a120e158b1826d1fd9c2b Mon Sep 17 00:00:00 2001 From: charles-ramos Date: Thu, 22 Oct 2026 14:48:27 -0300 Subject: [PATCH 1/8] Warn about automatic MongoDB 8 migration when changing Parse version Shows a warning and a "Migrate & Save" button when the selected Parse Server version requires the database to be migrated to MongoDB 8, and the reason as a tooltip when a version is disabled. Co-Authored-By: Claude Opus 5.5 --- .../Settings/Modals/editParseVersionModal.react.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/dashboard/Settings/Modals/editParseVersionModal.react.js b/src/dashboard/Settings/Modals/editParseVersionModal.react.js index 23a776f45b..dbd082ee4b 100644 --- a/src/dashboard/Settings/Modals/editParseVersionModal.react.js +++ b/src/dashboard/Settings/Modals/editParseVersionModal.react.js @@ -97,6 +97,7 @@ export const EditParseVersionModal = ({ context, setParentState, currentParseVer const npmModules = parseDependencies(selectedVersion?.dependencies ?? selectedVersion?.npmModules); const hasSelectedVersion = !!selectedVersion?.version; + const requiresDatabaseMigration = !!selectedVersion?.requiresDatabaseMigration && selectedVersion.version !== currentParseVersion; const visibleMigrations = isGDPR ? [] @@ -212,6 +213,7 @@ export const EditParseVersionModal = ({ context, setParentState, currentParseVer } }} disabled={v.disabled} + title={v.disabled ? v.disabledReason : undefined} > {v.version === currentParseVersion ? `${v.version} - ${v.description || ''} (current)` @@ -242,6 +244,14 @@ export const EditParseVersionModal = ({ context, setParentState, currentParseVer + {requiresDatabaseMigration && ( +
+ + This version requires MongoDB 8. Your database will be migrated automatically when you save, which can take a few minutes. Data written to the app during the migration may not be copied, so avoid writes until it finishes. + +
+ )} + {note !== '' && (
@@ -262,7 +272,7 @@ export const EditParseVersionModal = ({ context, setParentState, currentParseVer />
- {requiresDatabaseMigration && ( -
- - This version requires MongoDB 8. Your database will be migrated automatically when you save, which can take a while. A short downtime may happen during the process. - -
+ {requiresDatabaseMigration && !processing && ( + + This version requires MongoDB 8. Your database will be migrated automatically when you save, which can take a while. A short downtime may happen during the process. + )} {note !== '' && ( -
- - {note} - -
+ + {note} + )} diff --git a/src/dashboard/Settings/Modals/editParseVersionModal.scss b/src/dashboard/Settings/Modals/editParseVersionModal.scss index a5b2d7a63f..c20226e979 100644 --- a/src/dashboard/Settings/Modals/editParseVersionModal.scss +++ b/src/dashboard/Settings/Modals/editParseVersionModal.scss @@ -283,3 +283,38 @@ line-height: 1.45; } +/* Notices (migration warning, progress and errors) */ +.notice { + @include InterFont; + display: flex; + align-items: flex-start; + gap: 10px; + margin: 10px 0; + padding: 12px 16px; + border: 1px solid rgba($dark, 0.15); + border-radius: 8px; + color: $dark; + font-size: 13px; + line-height: 1.45; + text-align: left; + + svg { + flex-shrink: 0; + margin-top: 2px; + } +} + +.noticeWarning { + background: rgba($darkYellow, 0.06); + border-color: rgba($darkYellow, 0.4); +} + +.noticeInfo { + background: rgba($old-blue, 0.06); + border-color: rgba($old-blue, 0.4); +} + +.noticeError { + background: rgba($error-red, 0.06); + border-color: rgba($error-red, 0.4); +} From de38dbc5c790f13c457d365dab3bc0762145c8c0 Mon Sep 17 00:00:00 2001 From: charles-ramos Date: Thu, 22 Oct 2026 16:42:08 -0300 Subject: [PATCH 8/8] Keep the Parse version modal processing until the page reloads Co-Authored-By: Claude Opus 5.5 --- src/dashboard/Settings/Modals/editParseVersionModal.react.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dashboard/Settings/Modals/editParseVersionModal.react.js b/src/dashboard/Settings/Modals/editParseVersionModal.react.js index b97cad266b..413c4b7964 100644 --- a/src/dashboard/Settings/Modals/editParseVersionModal.react.js +++ b/src/dashboard/Settings/Modals/editParseVersionModal.react.js @@ -164,11 +164,11 @@ export const EditParseVersionModal = ({ context, setParentState, currentParseVer await waitForMigration(result.migrationId); } // Force UI refresh so the new parseVersion shows everywhere. + // Keeps processing until the page reloads, so the modal does not go back to its initial state. window.location.reload(); } catch (e) { setNote(e?.error || e?.message || 'Failed to save version'); setNoteColor('red'); - } finally { setProcessing(false); } };