feat: show the session age and mark the last opened window #43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/session-activity-and-last-window"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
#{session_activity}on every session.Sessiongained anactivityfield (unix seconds), so the session format has five fields.now,7m,2h,3d) infg.subtle, left of the ellipsis trigger and right-aligned so its right edge lines up with the bell dots in the window cards. It refreshes with the two-second tree poll.Sessionalso carrieslastWindow: the head of#{session_stack}, the window index the session used last. No browser storage is involved, so a window selected by any tmux client is picked up. An empty stack givesnull; a non-numeric head is a parse error.border.emphasized(#5c6370), so the last window is the only bright one. No icon, no extra edge, no layout shift.adr/tmux.mdandadr/ui.md.Test plan
npm run typechecknpm run buildMUX_PORTAL_UI_SKIP_BUILD=1 cargo test --workspace(57 + 9 + 4 + 1 tests pass, including new cases for an empty and a malformed stack)02:roomboxat 4241 s old renders1h, a fresh sessionnow,06:print38m;rgb(171, 178, 191)while the rest computergb(92, 99, 112); every card stays at1px rgb(62, 68, 81)on all four edges and 500px wide;session_stacklive: selecting another window in tmux moved the emphasis within one poll, without a reload;localStoragestays empty —mux-portal:last-windowsis no longer written.feat: show the session age and the last opened windowto feat: show the session age and mark the last opened windowSession carries lastWindow, the head of #{session_stack}, so the marker no longer depends on browser storage and follows a window selected by any client. The arrow doubles to 24px and the localStorage store is dropped.