fix(editor): Fix UI being blocked from loading while data table limits are being fetched (#19871)

This commit is contained in:
Jaakko Husso 2025-09-22 19:42:46 +03:00 committed by GitHub
parent ded6db694a
commit 436c5abd83
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -191,12 +191,18 @@ export async function initializeAuthenticatedFeatures(
}
if (settingsStore.isDataTableFeatureEnabled) {
const { quotaStatus } = await dataStoreStore.fetchDataStoreSize();
if (quotaStatus === 'error') {
uiStore.pushBannerToStack('DATA_STORE_STORAGE_LIMIT_ERROR');
} else if (quotaStatus === 'warn') {
uiStore.pushBannerToStack('DATA_STORE_STORAGE_LIMIT_WARNING');
}
void dataStoreStore
.fetchDataStoreSize()
.then(({ quotaStatus }) => {
if (quotaStatus === 'error') {
uiStore.pushBannerToStack('DATA_STORE_STORAGE_LIMIT_ERROR');
} else if (quotaStatus === 'warn') {
uiStore.pushBannerToStack('DATA_STORE_STORAGE_LIMIT_WARNING');
}
})
.catch((error) => {
console.error('Failed to fetch data table limits:', error);
});
}
if (insightsStore.isSummaryEnabled) {