From 92b84f0e3d6a720050b77165b9e4d1ba2cd78799 Mon Sep 17 00:00:00 2001 From: Ivan Date: Mon, 13 Apr 2026 18:28:52 -0500 Subject: [PATCH] feat(rncp): implement receive completed notification handling and error reporting for file transfers --- meshchatx/src/frontend/components/App.vue | 21 ++ .../src/frontend/components/rncp/RNCPPage.vue | 339 ++++++++++++++++-- 2 files changed, 338 insertions(+), 22 deletions(-) diff --git a/meshchatx/src/frontend/components/App.vue b/meshchatx/src/frontend/components/App.vue index 44ba8e0..bb680eb 100644 --- a/meshchatx/src/frontend/components/App.vue +++ b/meshchatx/src/frontend/components/App.vue @@ -990,6 +990,27 @@ export default { GlobalEmitter.emit("identity-switched", json); break; } + case "rncp.receive.completed": { + if (this.$route?.name !== "rncp") { + const detail = + json.status === "completed" && json.saved_path + ? json.saved_path + : json.error || json.status || ""; + if (json.status === "completed") { + ToastUtils.success( + `${this.$t("rncp.received_file")}${detail ? ": " + detail : ""}`, + ); + if (ElectronUtils.isElectron()) { + ElectronUtils.showNotification(this.$t("rncp.received_file"), detail || ""); + } + } else { + ToastUtils.error( + `${this.$t("rncp.receive_failed")}${detail ? ": " + detail : ""}`, + ); + } + } + break; + } } }, async getAppInfo() { diff --git a/meshchatx/src/frontend/components/rncp/RNCPPage.vue b/meshchatx/src/frontend/components/rncp/RNCPPage.vue index 22466a0..c6e153a 100644 --- a/meshchatx/src/frontend/components/rncp/RNCPPage.vue +++ b/meshchatx/src/frontend/components/rncp/RNCPPage.vue @@ -95,12 +95,29 @@
- +
+ + + +
@@ -153,14 +170,22 @@
- {{ sendResult.message }} +
{{ sendResult.message }}
+
+ {{ sendResult.filePath }} +
+
+ +
@@ -188,12 +213,23 @@
- +
+ + +
@@ -244,14 +280,22 @@
- {{ fetchResult.message }} +
{{ fetchResult.message }}
+
+ {{ fetchResult.savedPath }} +
+
+ +
@@ -290,6 +334,59 @@ +

+ {{ $t("rncp.listening_active_background") }} +

+
+
+ {{ $t("rncp.receive_folder") }} +
+
+ {{ receiveDirectory }} +
+ +
+
+
+ {{ + lastReceiveEvent.status === "completed" + ? $t("rncp.received_file") + : $t("rncp.receive_failed") + }} +
+
+ {{ lastReceiveEvent.saved_path }} +
+
+ {{ lastReceiveEvent.error }} +
+ +