Say where persistence stops: sessions do not survive logout #21

Closed
opened 2026-08-19 23:58:49 +00:00 by dusan · 0 comments
Owner

Context

Sessions outlive their windows because the agent owns the pty. They do not
outlive a logout: the agent is started on demand, without a systemd unit and
without lingering, so the user's session scope is torn down and every session goes
with it. This is documented in docs/spec/session-agent.md:

Known limit: with no systemd unit there is no lingering, so sessions do not
survive logout — the user's session scope is torn down. This is the cost of
on-demand startup and is documented rather than hidden;
loginctl enable-linger is the opt-in.

It is in the README too. It is not anywhere the user can see while using the
program.

The problem

"Persistent" is a per-session setting with a switch in the session editor. A
reasonable reading of that switch is "this session keeps running", and it does —
until logout, when it does not. The place to say so is next to the switch, not in
a file on a git server.

Work

Small, and mostly wording:

  • the Keep Running Without A Window row in
    crates/terminalko/src/editor.rs / ui/session_editor.blp gains a subtitle
    saying what it does and does not survive: window closed yes, logout no;
  • the Session Agent group in preferences (ui/preferences.blp) already explains
    that sessions keep running when a window closes. One more sentence about logout
    belongs there, with the loginctl enable-linger hint;
  • decide whether to offer more than a sentence. Running loginctl enable-linger
    needs polkit and is a system change, so a button that does it silently is wrong;
    a copyable command is honest and enough. If issue #18 (socket activation) lands,
    revisit — with a unit installed, lingering actually makes sessions survive
    logout, and then the wording changes from "does not" to "unless you enable
    lingering".

Acceptance criteria

  • Both places where persistence is configured say what it survives, in a sentence
    a user can act on.
  • The wording matches reality; if #18 changes reality, this text changes with it.
  • No new setting, no automatic system changes.
  • docs/spec/preferences.md and docs/spec/session-agent.md stay consistent with
    the new wording.

Notes

  • This is the smallest issue in the list and the one most likely to save somebody
    losing work they thought was safe.
## Context Sessions outlive their windows because the agent owns the pty. They do **not** outlive a logout: the agent is started on demand, without a systemd unit and without lingering, so the user's session scope is torn down and every session goes with it. This is documented in `docs/spec/session-agent.md`: > **Known limit:** with no systemd unit there is no lingering, so sessions do not > survive logout — the user's session scope is torn down. This is the cost of > on-demand startup and is documented rather than hidden; > `loginctl enable-linger` is the opt-in. It is in the README too. It is **not** anywhere the user can see while using the program. ## The problem "Persistent" is a per-session setting with a switch in the session editor. A reasonable reading of that switch is "this session keeps running", and it does — until logout, when it does not. The place to say so is next to the switch, not in a file on a git server. ## Work Small, and mostly wording: * the *Keep Running Without A Window* row in `crates/terminalko/src/editor.rs` / `ui/session_editor.blp` gains a subtitle saying what it does and does not survive: window closed yes, logout no; * the *Session Agent* group in preferences (`ui/preferences.blp`) already explains that sessions keep running when a window closes. One more sentence about logout belongs there, with the `loginctl enable-linger` hint; * decide whether to offer more than a sentence. Running `loginctl enable-linger` needs polkit and is a system change, so a button that does it silently is wrong; a copyable command is honest and enough. If issue #18 (socket activation) lands, revisit — with a unit installed, lingering actually makes sessions survive logout, and then the wording changes from "does not" to "unless you enable lingering". ## Acceptance criteria - Both places where persistence is configured say what it survives, in a sentence a user can act on. - The wording matches reality; if #18 changes reality, this text changes with it. - No new setting, no automatic system changes. - `docs/spec/preferences.md` and `docs/spec/session-agent.md` stay consistent with the new wording. ## Notes - This is the smallest issue in the list and the one most likely to save somebody losing work they thought was safe.
dusan closed this issue 2026-08-20 03:49:01 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dusan/terminalko#21
No description provided.