From d9d87ef84985a065debcb80f4103f96b74da2c9d Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Thu, 5 Feb 2026 21:59:06 +0000 Subject: [PATCH] fix(ui): remove redundant signal resets and default tables to newest-first Remove inline signal reset chains before extraction (server already returns all signals) and before reload (reload destroys signal store). Change gear and bags default sort from Make/RoastDate to CreatedAt so data tables show newest entries first. --- src/domain/bags.rs | 2 +- src/domain/gear.rs | 2 +- templates/pages/add.html | 2 +- templates/pages/home.html | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/domain/bags.rs b/src/domain/bags.rs index 8b035c4..0de5bca 100644 --- a/src/domain/bags.rs +++ b/src/domain/bags.rs @@ -91,7 +91,7 @@ pub enum BagSortKey { impl SortKey for BagSortKey { fn default() -> Self { - BagSortKey::RoastDate + BagSortKey::CreatedAt } fn from_query(value: &str) -> Option { diff --git a/src/domain/gear.rs b/src/domain/gear.rs index 0eccb68..3fefe53 100644 --- a/src/domain/gear.rs +++ b/src/domain/gear.rs @@ -96,7 +96,7 @@ pub enum GearSortKey { impl SortKey for GearSortKey { fn default() -> Self { - GearSortKey::Make + GearSortKey::CreatedAt } fn from_query(value: &str) -> Option { diff --git a/templates/pages/add.html b/templates/pages/add.html index 87c1c5a..12a7534 100644 --- a/templates/pages/add.html +++ b/templates/pages/add.html @@ -30,7 +30,7 @@
{% call scan::scan_input("scan-extract-form", "scan-image", "$_extracting", "$_extractError", "Describe the coffee bag…", "Waiting for response…") %} diff --git a/templates/pages/home.html b/templates/pages/home.html index 10ba103..2e42a46 100644 --- a/templates/pages/home.html +++ b/templates/pages/home.html @@ -52,7 +52,7 @@
{% call scan::scan_input("scan-extract-form", "scan-image", "$_extracting", "$_extractError", "Describe the coffee bag…", "Waiting for response…") %} @@ -64,7 +64,7 @@ {% include "partials/forms/scan_result_form.html" %}