fix: Tier-3 feature gaps — transfer result screen + accurate RPC display

- 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) <noreply@anthropic.com>
This commit is contained in:
2026-07-05 14:27:59 -05:00
parent b0cc6bcef4
commit 1dbbd44759
2 changed files with 16 additions and 3 deletions

View File

@@ -398,7 +398,15 @@ static void loadSettingsPageState(config::Settings* settings) {
s_settingsState.verbose_logging = settings->getVerboseLogging(); s_settingsState.verbose_logging = settings->getVerboseLogging();
s_settingsState.debug_categories = settings->getDebugCategories(); s_settingsState.debug_categories = settings->getDebugCategories();
s_settingsState.debug_cats_dirty = false; 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 // Apply loaded visual effects settings
effects::ImGuiAcrylic::ApplyBlurAmount(s_settingsState.blur_amount); effects::ImGuiAcrylic::ApplyBlurAmount(s_settingsState.blur_amount);
@@ -2011,8 +2019,11 @@ void RenderSettingsPage(App* app) {
ImGui::TextUnformatted(label); ImGui::TextUnformatted(label);
ImGui::SameLine(0, Layout::spacingXs()); ImGui::SameLine(0, Layout::spacingXs());
ImGui::SetNextItemWidth(inputW); 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, ImGui::InputText(id, buf, bufSz,
password ? ImGuiInputTextFlags_Password : 0); ImGuiInputTextFlags_ReadOnly |
(password ? ImGuiInputTextFlags_Password : 0));
}; };
if (fourAcross) { if (fourAcross) {

View File

@@ -226,7 +226,9 @@ public:
Notifications::instance().error(result.empty() ? TR("transfer_failed") : result); 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(); ImGui::EndDisabled();