mirror of
https://github.com/sky-systems/sky_phone.git
synced 2026-08-29 01:08:59 +00:00
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:
@@ -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('/')
|
||||
|
||||
Reference in New Issue
Block a user