diff --git a/.changeset/admin-storage-panel-window.md b/.changeset/admin-storage-panel-window.md new file mode 100644 index 000000000..b20fc26f9 --- /dev/null +++ b/.changeset/admin-storage-panel-window.md @@ -0,0 +1,4 @@ +--- +--- + +fix(admin): show storage count window and 24h default label (#1322) diff --git a/crates/nostream-admin/tests/console_parity.rs b/crates/nostream-admin/tests/console_parity.rs index 2d4273748..cbb962a52 100644 --- a/crates/nostream-admin/tests/console_parity.rs +++ b/crates/nostream-admin/tests/console_parity.rs @@ -470,3 +470,109 @@ fn a_missing_console_file_is_a_failure() { assert!(!assets_dir().join(missing).exists()); let _ = ADMIN_BASE; } + +/// The storage-count panel renders the reply's `since`/`until` window beside the count and labels +/// defaulted requests (`last 24 h`), rather than presenting a 24 h slice as the store total (#1322). +#[test] +fn the_storage_panel_renders_the_window_it_reports() { + let html = std::fs::read_to_string(dashboard_html()).expect("dashboard.html"); + let start = html + .find(">Storage counts") + .expect("Storage counts section"); + let end = html[start..] + .find("") + .expect("closing ") + + start; + let section = &html[start..end]; + assert!( + !section.contains("optional since/until unix seconds"), + "storage copy must state the 24 h default: {section}" + ); + assert!(section.contains("
${escapeHtml((row.kinds ?? []).join(', '))}Per-kind counts use NIP-45-style filters (comma-separated kinds, optional since/until unix seconds).
+Per-kind counts use NIP-45-style filters (comma-separated kinds; since/until unix seconds default to the last 24 h when omitted).