diff --git a/desktop/flipper-common/src/server-types.tsx b/desktop/flipper-common/src/server-types.tsx index 68179c0de..56c18982b 100644 --- a/desktop/flipper-common/src/server-types.tsx +++ b/desktop/flipper-common/src/server-types.tsx @@ -161,6 +161,11 @@ export type FlipperServerEvents = { }; 'connectivity-troubleshoot-cmd': CommandRecordEntry; 'connectivity-troubleshoot-log': ConnectionRecordEntry; + 'connectivity-troubleshoot-notification': { + type: 'error' | 'warning'; + title: string; + description: string; + }; 'plugins-server-add-on-message': ExecuteMessage; 'download-file-update': DownloadFileUpdate; 'server-log': LoggerInfo; diff --git a/desktop/flipper-ui-core/src/dispatcher/flipperServer.tsx b/desktop/flipper-ui-core/src/dispatcher/flipperServer.tsx index e6a095f17..c6ba785e3 100644 --- a/desktop/flipper-ui-core/src/dispatcher/flipperServer.tsx +++ b/desktop/flipper-ui-core/src/dispatcher/flipperServer.tsx @@ -47,6 +47,20 @@ export function connectFlipperServerToStore( }); }); + server.on( + 'connectivity-troubleshoot-notification', + ({type, title, description}) => { + const text = `[${type}] ${title}: ${description}`; + notification.open({ + message: title, + description: , + type: type, + duration: 0, + key: text, + }); + }, + ); + server.on('server-state', handleServerStateChange); server.on('server-error', (err) => {