Repository navigation
AgentMenu 1.4.1
One fix: a session's displayed duration was the wall clock, not the session.
Session time was counting the days since a session ended
The row rendered now - startedAt — the session's age, not its length. Since transcripts are retained for seven days, a finished session's figure kept climbing the whole time it sat on disk.
Measured on real sessions, before against after:
| displayed before | actual |
|---|---|
| 187h04m | 27m36s |
| 161h02m | 2m44s |
| 160h56m | 1s |
| 160h54m | 6m58s |
| 147h38m | 7m29s |
A session that genuinely ran six minutes was reporting 167.9h. The entire difference was time after it had finished.
Duration is now AgentSession.span — first recorded activity to last. It takes no now parameter, and that is the fix rather than an omission: a finished session's length is a fact about the past with no clock left to drift against, and a live session needs no special case either, since its own lastEventAt advances as it works.
What it still counts, and why
Idle stretches within a session are included — a session left open over lunch counts the lunch. That is the honest answer to "how long was this session", and separating real working time from waiting-on-you time would mean inferring which gaps were which.
So sessions resumed across days still show long spans, and those figures are correct: first activity to last really was that far apart.
The two other elapsed-time readouts — "how long has this prompt been waiting" and "how long since the last activity" — remain deliberately now-relative, because those genuinely are questions about the present. All three now share one formatter, so the row and its tests cannot disagree.
Why this survived four releases
The calculation lived inside SessionRowView, and the test target depends only on AgentMenuCore — so no test could reach it. span and the formatter now live in Core specifically so they are testable.
9 tests added, 268 pass.
Install: download AgentMenu-1.4.1.dmg, open it, drag to Applications. Ad-hoc signed and not notarised, so macOS blocks the first launch — the README covers three ways past that.