From 7249d1189906289392cd985d23a2dfc2b2d435ab Mon Sep 17 00:00:00 2001 From: DanS Date: Sun, 5 Jul 2026 12:53:46 -0500 Subject: [PATCH] feat(ui): clamp recent-activity lists to the 4 most recent The overview "Recent Transactions" and the send tab "Recent Sends" lists showed every matching transaction in a scroll region. Cap them at the 4 most recent (state.transactions is sorted newest-first, so a simple head-limit). The receive "Recent Received" list gets the same clamp in the Tier-1 robustness commit (same file as the QR fix). Co-Authored-By: Claude Opus 4.8 (1M context) --- src/ui/windows/balance_components.cpp | 2 +- src/ui/windows/send_tab.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ui/windows/balance_components.cpp b/src/ui/windows/balance_components.cpp index 242a595..a5da515 100644 --- a/src/ui/windows/balance_components.cpp +++ b/src/ui/windows/balance_components.cpp @@ -786,7 +786,7 @@ void RenderSharedRecentTx(App* app, float recentH, float availW, float hs, float ImGuiWindowFlags_NoBackground); const auto& txs = state.transactions; - int count = (int)txs.size(); + int count = std::min(4, (int)txs.size()); // show only the 4 most recent (state.transactions is newest-first) if (count == 0) { Type().textColored(TypeStyle::Caption, OnSurfaceDisabled(), TR("no_transactions_yet")); diff --git a/src/ui/windows/send_tab.cpp b/src/ui/windows/send_tab.cpp index 94f02e5..5bd2298 100644 --- a/src/ui/windows/send_tab.cpp +++ b/src/ui/windows/send_tab.cpp @@ -1025,6 +1025,7 @@ static void RenderRecentSends(const WalletState& state, float width, ImFont* cap if (tx.type != "send" && tx.type != "shield") continue; sends.push_back(&tx); } + if (sends.size() > 4) sends.resize(4); // show only the 4 most recent (newest-first) float listH = std::max(rowH, ImGui::GetContentRegionAvail().y);