app

Local-first trade for farms and co-ops
git clone https://radroots.dev/git/app.git
Log | Files | Refs | README | LICENSE

commit 82f50e70d55f538b32f08e70e8bb381a9273538d
parent 32baa849e6a0aab29b29719c3eb942ad288bc7c0
Author: triesap <tyson@radroots.org>
Date:   Tue, 21 Apr 2026 18:45:00 +0000

pack_day: harden export guards and checks

Diffstat:
Mcrates/launchers/desktop/src/source_guards.rs | 27+++++++++++++++++++++++++++
Mcrates/launchers/desktop/src/window.rs | 22----------------------
Mscripts/check.sh | 3+++
3 files changed, 30 insertions(+), 22 deletions(-)

diff --git a/crates/launchers/desktop/src/source_guards.rs b/crates/launchers/desktop/src/source_guards.rs @@ -18,8 +18,10 @@ const ALLOWED_WINDOW_LITERALS: &[&str] = &[ "1111111111111111111111111111111111111111111111111111111111111111", "14", "14.5", + "2 bags", "2222222222222222222222222222222222222222222222222222222222222222", "3333333333333333333333333333333333333333333333333333333333333333", + "2026-04-23T15:00:00Z", "6", "6.", "6.5", @@ -61,7 +63,9 @@ const ALLOWED_WINDOW_LITERALS: &[&str] = &[ "bunker://466d7fcae563e5cb09a0d1870bb580344804617879a14949cf22285f1bae3f27?relay=wss%3A%2F%2Frelay.radroots.example", "buyer.fulfillment_filter_update_failed", "buyer.search_query_update_failed", + "customer_labels.txt", "desktop runtime roots require HOME for macos", + "disk unavailable", "failed to add buyer product to cart", "failed to open buyer order detail", "failed to place buyer order", @@ -78,6 +82,7 @@ const ALLOWED_WINDOW_LITERALS: &[&str] = &[ "failed to open existing product editor", "failed to open new product editor", "failed to acknowledge reminder", + "failed to export pack day", "failed to open order detail", "failed to route into pack day view", "failed to route into orders view", @@ -141,8 +146,10 @@ const ALLOWED_WINDOW_LITERALS: &[&str] = &[ "guest", "orders", "orders-reminders", + "pack-day-export", "pack_day", "pack-day-reminders", + "pack_day.export_failed", "pack_day.route_failed", "orders-detail-mark-completed", "orders-detail-mark-packed", @@ -170,6 +177,9 @@ const ALLOWED_WINDOW_LITERALS: &[&str] = &[ "orders.recovery_start_failed", "orders.route_failed", "preview", + "pack_sheet.txt", + "pack_sheet.txt, pickup_roster.txt, customer_labels.txt", + "pickup_roster.txt", "products", "reminder-banner-action", "reminder-banner-dismiss", @@ -209,6 +219,7 @@ const ALLOWED_WINDOW_LITERALS: &[&str] = &[ "discovery url does not contain a remote signer uri", "enter a bunker or discovery url to continue", "enter a bunker or discovery url from the signer; raw nostrconnect client uris are signer-side only", + "exports/pack_day/window-1/20260423T150000Z", "invalid discovery url:", "invalid discovery url: relative URL without a base", "invalid remote signer uri:", @@ -443,6 +454,22 @@ const REQUIRED_WINDOW_COPY_KEYS: &[&str] = &[ "AppTextKey::PackDayPickupRosterTitle", "AppTextKey::PackDayEmptyTitle", "AppTextKey::PackDayEmptyBody", + "AppTextKey::PackDayExportTitle", + "AppTextKey::PackDayExportReadyTitle", + "AppTextKey::PackDayExportReadyBody", + "AppTextKey::PackDayExportUnavailableTitle", + "AppTextKey::PackDayExportUnavailableBody", + "AppTextKey::PackDayExportRunningTitle", + "AppTextKey::PackDayExportRunningBody", + "AppTextKey::PackDayExportSucceededTitle", + "AppTextKey::PackDayExportSucceededBody", + "AppTextKey::PackDayExportFailedTitle", + "AppTextKey::PackDayExportFailedBody", + "AppTextKey::PackDayExportAction", + "AppTextKey::PackDayExportActionRunning", + "AppTextKey::PackDayExportFolderLabel", + "AppTextKey::PackDayExportFilesLabel", + "AppTextKey::PackDayExportErrorLabel", "AppTextKey::HomeTodayRemindersTitle", "AppTextKey::ReminderDeadlineLabel", "AppTextKey::ReminderUrgencyUpcoming", diff --git a/crates/launchers/desktop/src/window.rs b/crates/launchers/desktop/src/window.rs @@ -11341,28 +11341,6 @@ fn settings_timing_conflict_key(kind: FarmTimingConflictKind) -> AppTextKey { } } -#[cfg(test)] -fn settings_inventory_card(spec: SettingsInventorySectionSpec) -> impl IntoElement { - home_card( - app_shared_text(spec.title_key), - app_stack_v(8.0).w_full().children( - spec.field_keys - .iter() - .copied() - .map(|key| { - app_surface_panel( - div() - .px(px(12.0)) - .py(px(10.0)) - .child(home_farm_setup_field_label(app_shared_text(key))), - ) - .into_any_element() - }) - .collect::<Vec<_>>(), - ), - ) -} - fn home_saved_farm_summary_card(runtime: &DesktopAppRuntimeSummary) -> Option<AnyElement> { let saved_farm = home_saved_farm(runtime)?; let location_or_service_area = if runtime diff --git a/scripts/check.sh b/scripts/check.sh @@ -6,6 +6,9 @@ repo_root="$(git -C "${script_dir}" rev-parse --show-toplevel)" cd "${repo_root}" cargo metadata --format-version 1 --no-deps +cargo test -p radroots_app_i18n english_pack_day_copy_matches_the_contextual_execution_contract +cargo test -p radroots_app source_guards +cargo test -p radroots_app runtime_export_pack_day cargo check -p radroots_app if [[ "$(uname -s)" == "Darwin" ]]; then