From 4e4dfb0db9d641837ee6ad2153c892153e2d23de Mon Sep 17 00:00:00 2001 From: Georg Bauer Date: Fri, 31 Jul 2026 10:56:44 +0200 Subject: [PATCH] Expand activity strip to nine months --- AGENTS.md | 9 ++++----- TESTING.md | 2 +- crates/app/src/presentation.rs | 12 ++++++------ ios/Sources/ListScreens.swift | 4 ++-- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index aa959a5..fbbda0a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,11 +6,10 @@ Use the `tea` command-line tool as the preferred way to list, inspect, create, and update Gitea issues. Run it from the repository root so it can use the configured remote, for example `tea issues` or `tea issues 1`. -Run issue-detail commands directly, for example `tea issues 7`. When invoking -`tea` through an automated shell runner, allocate a pseudo-terminal (PTY); -interactive terminal use needs no extra flag. The detail command's terminal -rendering is unreliable without a PTY and may panic inside Gitea SDK version -handling. +Run issue-detail commands directly, for example `tea issues 7`. In a sandboxed +runner, grant network access before invoking `tea`. Without DNS/network access, +the current `tea` detail path may panic inside Gitea SDK version handling +instead of returning the underlying connection error. ## Required pre-commit gates diff --git a/TESTING.md b/TESTING.md index c50eb42..4534198 100644 --- a/TESTING.md +++ b/TESTING.md @@ -108,7 +108,7 @@ xcrun simctl launch booted de.rfc1437.gotcha ## Home -- [ ] Home shows the selected server name, contribution total, six labeled +- [ ] Home shows the selected server name, contribution total, nine labeled months with gaps between them, and recent activity. - [ ] Activity rows have the correct icon, repository, summary, and date. - [ ] Tap repository, issue, pull-request, and commit activity. Each opens the diff --git a/crates/app/src/presentation.rs b/crates/app/src/presentation.rs index 5530109..529cbe7 100644 --- a/crates/app/src/presentation.rs +++ b/crates/app/src/presentation.rs @@ -587,7 +587,7 @@ fn activity_detail(activity: &models::Activity) -> String { } fn heat_cells(data: &[models::UserHeatmapData]) -> (Vec, i64) { - const DAYS: i64 = 6 * 31; + const DAYS: i64 = 9 * 31; let latest = data .iter() .filter_map(|entry| entry.timestamp) @@ -771,13 +771,13 @@ mod tests { }, ]; let (cells, total) = heat_cells(&heatmap); - assert_eq!((cells.len(), total), (186, 5)); + assert_eq!((cells.len(), total), (279, 5)); assert_eq!( ( - cells[184].level, - cells[184].timestamp, - cells[184].contributions, - cells[185].level, + cells[277].level, + cells[277].timestamp, + cells[277].contributions, + cells[278].level, ), (1, 100 * 86_400, 1, 4) ); diff --git a/ios/Sources/ListScreens.swift b/ios/Sources/ListScreens.swift index beb915c..c5b848b 100644 --- a/ios/Sources/ListScreens.swift +++ b/ios/Sources/ListScreens.swift @@ -414,7 +414,7 @@ final class HeatmapView: UIView { ) ?? latest let firstMonth = Calendar(identifier: .gregorian).date( byAdding: .month, - value: -5, + value: -8, to: latestMonth ) ?? latestMonth cells = page.heatCells.filter { @@ -423,7 +423,7 @@ final class HeatmapView: UIView { super.init(frame: CGRect(x: 0, y: 0, width: 0, height: 132)) backgroundColor = .systemBackground let title = UILabel(frame: CGRect(x: 16, y: 12, width: 300, height: 22)) - title.text = "Activity · last 6 months" + title.text = "Activity · last 9 months" title.font = .preferredFont(forTextStyle: .subheadline) title.textColor = .secondaryLabel addSubview(title)