From 440f43d1b582d6205b4a120e158b1826d1fd9c2b Mon Sep 17 00:00:00 2001 From: charles-ramos Date: Thu, 22 Oct 2026 14:48:27 -0300 Subject: [PATCH 1/9] 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/9] 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); } }; From 614e65c0c7f266afa348aa2710b9a2561983e403 Mon Sep 17 00:00:00 2001 From: charles-ramos Date: Wed, 28 Oct 2026 12:32:50 -0300 Subject: [PATCH 9/9] Offer the support form when the MongoDB 8 migration is not possible Shows a button to the Typeform when the migration fails or times out, when saving is refused before the migration starts, and for versions the API marks as migrationBlocked (storage limit or plan), which can be selected to see the reason but not saved. Co-Authored-By: Claude Opus 5.5 --- .../Modals/editParseVersionModal.react.js | 40 +++++++++++++++---- .../Modals/editParseVersionModal.scss | 16 ++++++++ 2 files changed, 49 insertions(+), 7 deletions(-) diff --git a/src/dashboard/Settings/Modals/editParseVersionModal.react.js b/src/dashboard/Settings/Modals/editParseVersionModal.react.js index 413c4b7964..025c7a3dad 100644 --- a/src/dashboard/Settings/Modals/editParseVersionModal.react.js +++ b/src/dashboard/Settings/Modals/editParseVersionModal.react.js @@ -10,6 +10,7 @@ const origin = new Position(0, 0); const MIGRATION_POLL_INTERVAL = 5000; const MIGRATION_MAX_WAIT = 30 * 60 * 1000; const MIGRATION_REQUEST_TIMEOUT = 15000; +const migrationFormUrl = appId => `https://back4app.typeform.com/to/LjfLd9yI#appid=${appId}`; const NOTICE_TYPES = { warning: { className: styles.noticeWarning, icon: 'b4a-warn-fill-icon', fill: '#F78400' }, @@ -17,6 +18,17 @@ const NOTICE_TYPES = { red: { className: styles.noticeError, icon: 'b4a-error-cross', fill: '#E85C3E' }, }; +const MigrationFormButton = ({ appId }) => ( + + Fill out the form + +); + const Notice = ({ type, children }) => { const { className, icon, fill } = NOTICE_TYPES[type] || NOTICE_TYPES.red; return ( @@ -35,6 +47,7 @@ export const EditParseVersionModal = ({ context, setParentState, currentParseVer const [note, setNote] = useState(''); const [noteColor, setNoteColor] = useState('red'); const [migrationLinks, setMigrationLinks] = useState([]); + const [migrationFailed, setMigrationFailed] = useState(false); const isGDPR = !!(context && context.custom && context.custom.isGDPR); @@ -116,6 +129,8 @@ export const EditParseVersionModal = ({ context, setParentState, currentParseVer const npmModules = parseDependencies(selectedVersion?.dependencies ?? selectedVersion?.npmModules); const hasSelectedVersion = !!selectedVersion?.version; const requiresDatabaseMigration = !!selectedVersion?.requiresDatabaseMigration && selectedVersion.version !== currentParseVersion; + // The database is too large to migrate automatically, so the user is sent to the support form instead + const migrationBlocked = !!selectedVersion?.migrationBlocked && selectedVersion.version !== currentParseVersion; const visibleMigrations = isGDPR ? [] @@ -143,20 +158,21 @@ export const EditParseVersionModal = ({ context, setParentState, currentParseVer return; } if (migration?.status === 'Failed') { - throw { error: migration.error || 'Failed to migrate the database' }; + throw { error: migration.error || 'Failed to migrate the database', migrationFailed: true }; } } - throw { error: 'The database migration is taking longer than expected. Please, reach us on chat.' }; + throw { error: 'The database migration is taking longer than expected. Please, fill out the form below so we can help you.', migrationFailed: true }; }; const save = async () => { - if (!selectedVersion?.version) { + if (!selectedVersion?.version || migrationBlocked) { return; } try { setProcessing(true); setNote(''); + setMigrationFailed(false); const result = await context.changeParseServerVersion(selectedVersion.version); if (result?.migrationId) { setNote('Upgrading your Parse Server and MongoDB versions. Please keep this window open, it can take a while.'); @@ -169,6 +185,8 @@ export const EditParseVersionModal = ({ context, setParentState, currentParseVer } catch (e) { setNote(e?.error || e?.message || 'Failed to save version'); setNoteColor('red'); + // A 400 before the migration starts means the database can not be migrated (e.g. storage limit) + setMigrationFailed(!!e?.migrationFailed || (requiresDatabaseMigration && e?.status === 400)); setProcessing(false); } }; @@ -254,14 +272,14 @@ export const EditParseVersionModal = ({ context, setParentState, currentParseVer