From 1dbbd44759e6eb65413397bef3c9486fbd1ba77c Mon Sep 17 00:00:00 2001 From: DanS Date: Sun, 5 Jul 2026 14:27:59 -0500 Subject: [PATCH] =?UTF-8?q?fix:=20Tier-3=20feature=20gaps=20=E2=80=94=20tr?= =?UTF-8?q?ansfer=20result=20screen=20+=20accurate=20RPC=20display?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Address-transfer dialog closed itself on submit (s_open=false the same frame), so its in-dialog result screen was dead code. Keep the dialog open on submit: s_sending drives the button to a disabled "Sending…" state, and the async callback's result (success txid / error) now shows in the result screen with its own Close button. - Settings RPC connection editor was inert AND showed compile-time defaults. Populate Host/Port/Username/Password from the auto-detected daemon config (rpc::Connection::autoDetectConfig) and make the fields read-only — the RPC credentials come from the daemon's DRAGONX.conf, so these now accurately DISPLAY the live connection instead of pretending to be an editor (which did nothing). The existing "auto-detected" note now matches the behaviour. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/ui/pages/settings_page.cpp | 15 +++++++++++++-- src/ui/windows/address_transfer_dialog.h | 4 +++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/ui/pages/settings_page.cpp b/src/ui/pages/settings_page.cpp index 4f2fe71..c17ff8c 100644 --- a/src/ui/pages/settings_page.cpp +++ b/src/ui/pages/settings_page.cpp @@ -398,7 +398,15 @@ static void loadSettingsPageState(config::Settings* settings) { s_settingsState.verbose_logging = settings->getVerboseLogging(); s_settingsState.debug_categories = settings->getDebugCategories(); s_settingsState.debug_cats_dirty = false; - s_settingsState.rpc_plaintext_remote = rpc::Connection::usesPlaintextRemote(rpc::Connection::autoDetectConfig()); + // Populate the RPC fields from the auto-detected daemon config so they show the REAL connection + // (host/port/user/pass) instead of compile-time defaults. These are read-only in the UI: the RPC + // credentials come from the daemon's DRAGONX.conf, so this is an accurate display, not an editor. + const auto rpcCfg = rpc::Connection::autoDetectConfig(); + snprintf(s_settingsState.rpc_host, sizeof(s_settingsState.rpc_host), "%s", rpcCfg.host.c_str()); + snprintf(s_settingsState.rpc_port, sizeof(s_settingsState.rpc_port), "%s", rpcCfg.port.c_str()); + snprintf(s_settingsState.rpc_user, sizeof(s_settingsState.rpc_user), "%s", rpcCfg.rpcuser.c_str()); + snprintf(s_settingsState.rpc_password, sizeof(s_settingsState.rpc_password), "%s", rpcCfg.rpcpassword.c_str()); + s_settingsState.rpc_plaintext_remote = rpc::Connection::usesPlaintextRemote(rpcCfg); // Apply loaded visual effects settings effects::ImGuiAcrylic::ApplyBlurAmount(s_settingsState.blur_amount); @@ -2011,8 +2019,11 @@ void RenderSettingsPage(App* app) { ImGui::TextUnformatted(label); ImGui::SameLine(0, Layout::spacingXs()); ImGui::SetNextItemWidth(inputW); + // Read-only: the RPC credentials are auto-detected from the daemon's DRAGONX.conf, + // so these fields DISPLAY the live connection (editing them here did nothing). ImGui::InputText(id, buf, bufSz, - password ? ImGuiInputTextFlags_Password : 0); + ImGuiInputTextFlags_ReadOnly | + (password ? ImGuiInputTextFlags_Password : 0)); }; if (fourAcross) { diff --git a/src/ui/windows/address_transfer_dialog.h b/src/ui/windows/address_transfer_dialog.h index 8cb9617..eb00245 100644 --- a/src/ui/windows/address_transfer_dialog.h +++ b/src/ui/windows/address_transfer_dialog.h @@ -226,7 +226,9 @@ public: Notifications::instance().error(result.empty() ? TR("transfer_failed") : result); } }); - s_open = false; + // Keep the dialog OPEN on submit: s_sending drives the button to a disabled "Sending…" + // state, and when the async callback sets s_resultMsg the in-dialog result screen shows + // (with its own Close button). Previously closing here made that result screen dead code. } ImGui::EndDisabled();