feat(ux): clearer chat delivery, explorer empty/range states, honest settings label
Three next-batch UX-audit fixes:
- Chat delivery: the sending/sent glyph has higher contrast and a tooltip
("Sent to the network — arrives after it confirms", so a check isn't mistaken
for "delivered"); a failed send now carries the real reason (ChatMessage::
fail_reason, set from onChatBroadcastResult via friendlyRpcError, in-memory
only) in the "not sent" hover tooltip.
- Explorer: a block height beyond the tip says so ("Block N is beyond the chain
tip (M)") instead of silently snapping to the top; the empty block list shows
Not connected / Syncing (N behind) / Loading instead of an endless "Loading".
- Settings: the misleading "Reset to Defaults" button (which only reloads the
last-saved values) is relabeled "Discard unsaved changes" with accurate copy.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1679,8 +1679,15 @@ void RenderChatTab(App* app)
|
||||
const char* glyph = sending ? ICON_MD_SCHEDULE : ICON_MD_DONE;
|
||||
const float gs = icfSz * 0.82f;
|
||||
const ImVec2 gsz = icf->CalcTextSizeA(gs, FLT_MAX, 0.0f, glyph);
|
||||
dl->AddText(icf, gs, ImVec2(bmax.x - gsz.x, bmax.y + 1.0f * dp),
|
||||
material::WithAlpha(material::OnSurface(), sending ? 95 : 135), glyph);
|
||||
const ImVec2 gpos(bmax.x - gsz.x, bmax.y + 1.0f * dp);
|
||||
dl->AddText(icf, gs, gpos,
|
||||
material::WithAlpha(material::OnSurface(), sending ? 170 : 200), glyph);
|
||||
// Explain the glyph on hover — a check means "broadcast to the network", not "delivered".
|
||||
const float hpad = 4.0f * dp;
|
||||
if (ImGui::IsWindowHovered() &&
|
||||
ImGui::IsMouseHoveringRect(ImVec2(gpos.x - hpad, gpos.y - hpad),
|
||||
ImVec2(gpos.x + gsz.x + hpad, gpos.y + gsz.y + hpad)))
|
||||
material::Tooltip("%s", TR(sending ? "chat_status_sending" : "chat_status_sent"));
|
||||
ImGui::Dummy(ImVec2(0.0f, gs + 2.0f * dp)); // reserve the status glyph (no ItemSpacing now)
|
||||
}
|
||||
// Failed send → right-aligned "not sent" + Retry (kept — it's actionable).
|
||||
@@ -1692,6 +1699,12 @@ void RenderChatTab(App* app)
|
||||
ImGui::PushFont(metaFont); ImGui::PushStyleColor(ImGuiCol_Text, material::Error());
|
||||
ImGui::TextUnformatted(TR("chat_send_failed"));
|
||||
ImGui::PopStyleColor(); ImGui::PopFont();
|
||||
if (ImGui::IsItemHovered()) {
|
||||
std::string tip = m.fail_reason.empty()
|
||||
? std::string(TR("chat_failed_generic"))
|
||||
: std::string(TR("chat_failed_generic")) + "\n" + m.fail_reason;
|
||||
material::Tooltip("%s", tip.c_str());
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::SmallButton(TR("chat_retry"))) {
|
||||
// A failed contact request must be re-sent as a request (it has no peer key
|
||||
|
||||
Reference in New Issue
Block a user