FIX - Add detailed custom-app debug logging

Enable verbose tracing for custom apps and wire diagnostics through the stack. Sets Config.CustomApps.Debug = true, adds a debug_custom_app logger exposed as SkyPhoneApps.Debug, and instruments client and shared compatibility code (registration, normalization, provider exports, catalog sync, lifecycle hooks, resource stop, and app add/update/remove) with structured debug messages. Frontend sends a debug flag with the catalog and will call back to NUI (custom-app:catalog-debug) when debug is enabled. Tests updated to enable debug and assert fixBlur preservation and NUI catalog ACK handling. This provides detailed traces for exports, registration, catalog sync and lifecycle events.
This commit is contained in:
Leon.Schmidt
2026-08-19 01:27:38 +02:00
parent 8843b2763f
commit dcf7b47113
7 changed files with 410 additions and 17 deletions
+12
View File
@@ -650,6 +650,18 @@ function onMessage(event: MessageEvent<AppMessage>): void {
if (event.data?.type === 'custom-apps:catalog') {
appCatalog.replaceCatalog(event.data.data)
const catalogPayload = event.data.data as
| { apps?: unknown; debug?: unknown }
| undefined
if (catalogPayload?.debug === true) {
void nuiCall('custom-app:catalog-debug', {
acceptedCount: appCatalog.externalApps.length,
acceptedIds: appCatalog.externalApps.map((app) => app.id),
receivedCount: Array.isArray(catalogPayload.apps)
? catalogPayload.apps.length
: -1,
})
}
const activeAppId = route.params.appId
if (typeof activeAppId === 'string' && !isPhoneAppId(activeAppId)) {
void router.push('/')