Clean up console logging and fix platform detection issues

- Reduce migration/platform logging verbosity in development mode (~80-90% less noise)
- Fix AbsurdSQL platform check to support 'development' alongside 'web'
- Add missing WebPlatformService methods (isWorker, initSharedArrayBuffer)
- Fix Electron API endpoint resolution to prevent JSON parsing errors
- Prevent circular database logging that caused [DB-PREVENTED-INFO] spam

Console now shows only essential information while preserving all errors/warnings
This commit is contained in:
Matthew Raymer
2025-07-03 06:31:43 +00:00
parent 7d5e81263c
commit a5eb5cacaf
8 changed files with 162 additions and 46 deletions

View File

@@ -460,15 +460,17 @@ export const PlatformServiceMixin = {
}
const settings = await this.$getSettings(MASTER_SETTINGS_KEY, defaults);
// **ELECTRON-SPECIFIC FIX**: Apply platform-specific API server override
// This ensures Electron always uses production endpoints regardless of cached settings
if (process.env.VITE_PLATFORM === "electron") {
// Import constants dynamically to get platform-specific values
const { DEFAULT_ENDORSER_API_SERVER } = await import("../constants/app");
const { DEFAULT_ENDORSER_API_SERVER } = await import(
"../constants/app"
);
settings.apiServer = DEFAULT_ENDORSER_API_SERVER;
}
return (this as any)._setCached(
cacheKey,
settings,