From dba5a1efc1d1bfe678f44383415911ddb2e5f1c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Thu, 29 Oct 2026 21:10:26 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20a=20list=20that=20fits=20?= =?UTF-8?q?on=20one=20page=20no=20longer=20shows=20a=20lone=20"Page=201"?= =?UTF-8?q?=20under=20it:=20issues,=20pulls,=20discussions,=20commits=20an?= =?UTF-8?q?d=20CI=20runs=20show=20their=20pager=20only=20when=20there=20is?= =?UTF-8?q?=20a=20newer=20or=20older=20page,=20and=20the=20audit=20logs=20?= =?UTF-8?q?drop=20their=20empty=20pager=20box?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/forge-web/src/pages/audit_log.rs | 16 ++++++++-------- crates/forge-web/src/pages/ci_runs.rs | 20 +++++++++++--------- crates/forge-web/src/pages/commits.rs | 20 +++++++++++--------- crates/forge-web/src/pages/discussions.rs | 20 +++++++++++--------- crates/forge-web/src/pages/issues_list.rs | 23 +++++++++++++---------- crates/forge-web/src/pages/pulls_list.rs | 20 +++++++++++--------- 6 files changed, 65 insertions(+), 54 deletions(-) diff --git a/crates/forge-web/src/pages/audit_log.rs b/crates/forge-web/src/pages/audit_log.rs index bfacae9..60197dc 100644 --- a/crates/forge-web/src/pages/audit_log.rs +++ b/crates/forge-web/src/pages/audit_log.rs @@ -170,11 +170,11 @@ async fn admin_audit_view( }
audit_table(lang: lang, rows: rows, show_actor: true) - + }
}) @@ -193,11 +193,11 @@ async fn own_log_view(
audit_table(lang: lang, rows: rows, show_actor: false) - + }
}) } diff --git a/crates/forge-web/src/pages/ci_runs.rs b/crates/forge-web/src/pages/ci_runs.rs index 94ddff4..f0348f3 100644 --- a/crates/forge-web/src/pages/ci_runs.rs +++ b/crates/forge-web/src/pages/ci_runs.rs @@ -1700,15 +1700,17 @@ async fn runs_body( } } - + if newer_href.is_some() || older_href.is_some() { + + }
if let Some(run) = detail { diff --git a/crates/forge-web/src/pages/commits.rs b/crates/forge-web/src/pages/commits.rs index 94519ac..c78b3e1 100644 --- a/crates/forge-web/src/pages/commits.rs +++ b/crates/forge-web/src/pages/commits.rs @@ -320,15 +320,17 @@ async fn commits_page(cx: &Cx) -> Result { } } - + if has_newer || has_older { + + } ) }) } diff --git a/crates/forge-web/src/pages/discussions.rs b/crates/forge-web/src/pages/discussions.rs index 14367c2..8538409 100644 --- a/crates/forge-web/src/pages/discussions.rs +++ b/crates/forge-web/src/pages/discussions.rs @@ -348,15 +348,17 @@ async fn discussions_list_page(cx: &Cx) -> Result { } } - + if has_newer || has_older { + + } ) }) } diff --git a/crates/forge-web/src/pages/issues_list.rs b/crates/forge-web/src/pages/issues_list.rs index ddf5ca0..2998407 100644 --- a/crates/forge-web/src/pages/issues_list.rs +++ b/crates/forge-web/src/pages/issues_list.rs @@ -603,15 +603,17 @@ async fn issues_list_page(cx: &Cx) -> Result { } } - + if has_newer || has_older { + + } ) }) } @@ -1380,7 +1382,8 @@ mod tests { ) .await; assert_eq!(reply.status, 200, "{query}"); - assert!(reply.text().contains("Page 1"), "{query}"); + // Page 1 of one page: no pager at all. + assert!(!reply.text().contains("class=\"pager\""), "{query}"); } } } diff --git a/crates/forge-web/src/pages/pulls_list.rs b/crates/forge-web/src/pages/pulls_list.rs index 08acbce..368d3a3 100644 --- a/crates/forge-web/src/pages/pulls_list.rs +++ b/crates/forge-web/src/pages/pulls_list.rs @@ -367,15 +367,17 @@ async fn pulls_list_page(cx: &Cx) -> Result { } } - + if has_newer || has_older { + + } ) }) }