Commit f39ba0744e
f39ba0744efe77f5e1e0212d58eba0070114a615
parent: 640a8729ac
Verified · cmc
cmc <hello@cleberg.net> · 2026-10-09 05:35 UTC
Agenda: shorter past-scheduled gutter
Past-scheduled rows show "5w ago" instead of "Sched. 5w ago"; the scheduled icon and "ago" (against "late" for deadlines) carry the kind. The iOS gutter keeps its text on one line, scaling down to 0.8 for long ages.
Layout: unified · split
Sources/OrgPresentation/AgendaRows.swift
+2 −2
| @@ -42,7 +42,7 @@ public struct AgendaEvent: Sendable, Equatable, Identifiable { |
| 42 | 42 | /// |
| 43 | 43 | /// The gutter holds the time (`08:00`, `13:50–14:30`) or, untimed, a short status: |
| 44 | 44 | /// deadlines `Due today`, `Due in 2d`, `3d late`, `Due` (on a day other than today); |
| 45 | | /// scheduled `Scheduled`, `Sched. 4d ago`; habits `Habit`; timestamps, diary sexps and |
| 45 | /// scheduled `Scheduled`, `4d ago`; habits `Habit`; timestamps, diary sexps and |
| 46 | 46 | /// calendar events `All day`; ranges `Day 2/5`; log mode `Closed`, `Clocked`, `State`; TODO |
| 47 | 47 | /// and match lists nothing. Ages use `AgendaAge.compact`. |
| 48 | 48 | public struct AgendaRow: Sendable, Equatable, Identifiable { |
| @@ -115,7 +115,7 @@ public struct AgendaRow: Sendable, Equatable, Identifiable { |
| 115 | 115 | } else { |
| 116 | 116 | icon = .scheduled |
| 117 | 117 | let on = planning ?? day |
| 118 | | untimed = on < day ? "Sched. \(AgendaAge.compact(day - on)) ago" : "Scheduled" |
| 118 | untimed = on < day ? "\(AgendaAge.compact(day - on)) ago" : "Scheduled" |
| 119 | 119 | } |
| 120 | 120 | status = late ? .overdue : .normal |
| 121 | 121 | case .timestamp, .sexp: |
Sources/OrgstarMobile/AgendaScreen.swift
+2 −3
| @@ -645,10 +645,9 @@ struct AgendaRowView: View { |
| 645 | 645 | Text(row.gutter) |
| 646 | 646 | .font(.caption.weight(.medium).monospacedDigit()) |
| 647 | 647 | .foregroundStyle(statusColor) |
| 648 | | .lineLimit(2) |
| 648 | .lineLimit(1) |
| 649 | 649 | .allowsTightening(true) |
| 650 | | .minimumScaleFactor(0.85) |
| 651 | | .fixedSize(horizontal: false, vertical: true) |
| 650 | .minimumScaleFactor(0.8) |
| 652 | 651 | } |
| 653 | 652 | } |
| 654 | 653 | } |
Tests/OrgPresentationTests/AgendaRowsTests.swift
+2 −2
| @@ -68,8 +68,8 @@ struct AgendaRowsTests { |
| 68 | 68 | #expect(row?.status == status, "\(title)", sourceLocation: sourceLocation) |
| 69 | 69 | #expect(row?.icon == icon, "\(title)", sourceLocation: sourceLocation) |
| 70 | 70 | } |
| 71 | | check("Pay rent", "Sched. 4d ago", .overdue, .scheduled) |
| 72 | | check("Ancient chore", "Sched. 1y 4mo ago", .overdue, .scheduled) |
| 71 | check("Pay rent", "4d ago", .overdue, .scheduled) |
| 72 | check("Ancient chore", "1y 4mo ago", .overdue, .scheduled) |
| 73 | 73 | check("Send forms", "3d late", .overdue, .deadline) |
| 74 | 74 | check("File taxes", "Due today", .dueSoon, .deadline) |
| 75 | 75 | check("Renew passport", "Due in 4d", .dueSoon, .deadline) |
docs/plans/2026-10-08-agenda-redesign.md
+1 −1
| @@ -32,7 +32,7 @@ Timed rows show `08:00` or `13:50–14:30` (zero-padded, en dash; past midnight |
| 32 | 32 | | Deadline, on today, upcoming | `Due in 2d` | due-soon | |
| 33 | 33 | | Deadline, on another day | `Due` | overdue if before today, else normal | |
| 34 | 34 | | Scheduled | `Scheduled` | overdue if before today, else normal | |
| 35 | | | Scheduled, carried to today | `Sched. 4d ago` | overdue | |
| 35 | | Scheduled, carried to today | `4d ago` | overdue | |
| 36 | 36 | | Habit | `Habit` | overdue if scheduled before today | |
| 37 | 37 | | Timestamp, diary sexp | `All day` | normal | |
| 38 | 38 | | Range, middle days | `Day 2/5` | normal | |