krz/orgstar

A native macOS editor for org-mode files. editor org-mode swift

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 {
4242///
4343/// The gutter holds the time (`08:00`, `13:50–14:30`) or, untimed, a short status:
4444/// 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
4646/// calendar events `All day`; ranges `Day 2/5`; log mode `Closed`, `Clocked`, `State`; TODO
4747/// and match lists nothing. Ages use `AgendaAge.compact`.
4848public struct AgendaRow: Sendable, Equatable, Identifiable {
@@ -115,7 +115,7 @@ public struct AgendaRow: Sendable, Equatable, Identifiable {
115115 } else {
116116 icon = .scheduled
117117 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"
119119 }
120120 status = late ? .overdue : .normal
121121 case .timestamp, .sexp:
Sources/OrgstarMobile/AgendaScreen.swift +2 −3
@@ -645,10 +645,9 @@ struct AgendaRowView: View {
645645 Text(row.gutter)
646646 .font(.caption.weight(.medium).monospacedDigit())
647647 .foregroundStyle(statusColor)
648 .lineLimit(2)
648 .lineLimit(1)
649649 .allowsTightening(true)
650 .minimumScaleFactor(0.85)
651 .fixedSize(horizontal: false, vertical: true)
650 .minimumScaleFactor(0.8)
652651 }
653652 }
654653 }
Tests/OrgPresentationTests/AgendaRowsTests.swift +2 −2
@@ -68,8 +68,8 @@ struct AgendaRowsTests {
6868 #expect(row?.status == status, "\(title)", sourceLocation: sourceLocation)
6969 #expect(row?.icon == icon, "\(title)", sourceLocation: sourceLocation)
7070 }
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)
7373 check("Send forms", "3d late", .overdue, .deadline)
7474 check("File taxes", "Due today", .dueSoon, .deadline)
7575 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
3232| Deadline, on today, upcoming | `Due in 2d` | due-soon |
3333| Deadline, on another day | `Due` | overdue if before today, else normal |
3434| 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 |
3636| Habit | `Habit` | overdue if scheduled before today |
3737| Timestamp, diary sexp | `All day` | normal |
3838| Range, middle days | `Day 2/5` | normal |