收口桌面壳通知诊断日志
桌面壳本地通知失败只记录固定阶段标签 扩展桌面壳配置门禁禁止通知日志输出插件错误细节 补充宿主壳方案和共享决策中的通知诊断边界
This commit is contained in:
@@ -2992,10 +2992,10 @@ for (const snippet of [
|
||||
'notification_permission_unavailable_response',
|
||||
'notification_delivery_unavailable_response',
|
||||
'log_desktop_notification_failure',
|
||||
'desktop notification failed for {label}: {error}',
|
||||
'log_desktop_notification_failure("permission.state", &error.to_string())',
|
||||
'log_desktop_notification_failure("permission.request", &error.to_string())',
|
||||
'log_desktop_notification_failure("delivery.show", &error.to_string())',
|
||||
'desktop notification failed for {label}',
|
||||
'log_desktop_notification_failure("permission.state")',
|
||||
'log_desktop_notification_failure("permission.request")',
|
||||
'log_desktop_notification_failure("delivery.show")',
|
||||
'PermissionState::Granted',
|
||||
'PermissionState::Denied',
|
||||
'PermissionState::Prompt | PermissionState::PromptWithRationale',
|
||||
@@ -3005,6 +3005,7 @@ for (const snippet of [
|
||||
'notification_permission_unavailable_response_is_stable',
|
||||
'notification_delivery_unavailable_response_is_stable',
|
||||
'notification_failures_are_logged_without_exposing_native_detail',
|
||||
'notification_failures_log_stable_label_only',
|
||||
'"a".repeat(HOST_BRIDGE_LOCAL_NOTIFICATION_TITLE_MAX_LENGTH)',
|
||||
'"b".repeat(HOST_BRIDGE_LOCAL_NOTIFICATION_BODY_MAX_LENGTH)',
|
||||
'"notification permission unavailable"',
|
||||
@@ -3028,6 +3029,14 @@ if (
|
||||
'desktop shell notification module must check and request notification permission',
|
||||
);
|
||||
}
|
||||
if (
|
||||
desktopHostBridgeNotificationsSource.includes('desktop notification failed for {label}: {error}') ||
|
||||
desktopHostBridgeNotificationsSource.includes('log_desktop_notification_failure("permission.state", &error.to_string())') ||
|
||||
desktopHostBridgeNotificationsSource.includes('log_desktop_notification_failure("permission.request", &error.to_string())') ||
|
||||
desktopHostBridgeNotificationsSource.includes('log_desktop_notification_failure("delivery.show", &error.to_string())')
|
||||
) {
|
||||
throw new Error('desktop shell notification module must hide native notification errors');
|
||||
}
|
||||
if (!h5HostBridgeSource.includes('HOST_BRIDGE_RUNTIME_REFRESH_TIMEOUT_MS,')) {
|
||||
throw new Error('H5 HostBridge facade must import shared runtime refresh timeout');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user