feat(presence): add sticky manual "away" status distinct from auto-idle #122

Merged
nrupard merged 1 commit from feat/sticky-away into main 2026-05-15 22:45:41 +02:00
Owner

The picker now writes a new "away" status value rather than reusing "idle". The behavioural split:

  • "idle" (auto) is set by the background scan when last_active_at goes stale and is cleared by the next HTTP request via touch_user_activity.
  • "away" (manual) is sticky: touch_user_activity skips it (its predicate is status='idle' only) and the background idle scan skips it (its predicate is status='active' only). The user must change the status themselves to leave away.

@here resolution (resolve_here_targets) now drops away users in addition to DND - manual away is the user explicitly signalling "I'm not around right now," which is stronger than transient idle.

UI changes are minimal because "idle" and "away" render identically: yellow dot, "Away" aria-label, "Away" sidebar label. The picker preselects "Online" for both active and idle so an auto-idled user opening the picker is not nudged into sticking themselves to away.

Added db_status tests covering: set_user_status accepts away, touch_user_activity leaves away alone, mark_idle_users leaves away alone.

Depends on #N (feat/presence-polish) for the renamed labels.

The picker now writes a new "away" status value rather than reusing "idle". The behavioural split: - "idle" (auto) is set by the background scan when last_active_at goes stale and is cleared by the next HTTP request via touch_user_activity. - "away" (manual) is sticky: touch_user_activity skips it (its predicate is status='idle' only) and the background idle scan skips it (its predicate is status='active' only). The user must change the status themselves to leave away. @here resolution (`resolve_here_targets`) now drops away users in addition to DND - manual away is the user explicitly signalling "I'm not around right now," which is stronger than transient idle. UI changes are minimal because "idle" and "away" render identically: yellow dot, "Away" aria-label, "Away" sidebar label. The picker preselects "Online" for both `active` and `idle` so an auto-idled user opening the picker is not nudged into sticking themselves to away. Added db_status tests covering: set_user_status accepts away, touch_user_activity leaves away alone, mark_idle_users leaves away alone. Depends on #N (feat/presence-polish) for the renamed labels.
feat(presence): add sticky manual "away" status distinct from auto-idle
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 1m15s
bbb75aa889
The picker now writes a new "away" status value rather than reusing "idle". The behavioural split:

- "idle" (auto) is set by the background scan when last_active_at goes stale and is cleared by the next HTTP request via touch_user_activity.
- "away" (manual) is sticky: touch_user_activity skips it (its predicate is status='idle' only) and the background idle scan skips it (its predicate is status='active' only). The user must change the status themselves to leave away.

@here resolution (`resolve_here_targets`) now drops away users in addition to DND - manual away is the user explicitly signalling "I'm not around right now," which is stronger than transient idle.

UI changes are minimal because "idle" and "away" render identically: yellow dot, "Away" aria-label, "Away" sidebar label. The picker preselects "Online" for both `active` and `idle` so an auto-idled user opening the picker is not nudged into sticking themselves to away.

Added db_status tests covering: set_user_status accepts away, touch_user_activity leaves away alone, mark_idle_users leaves away alone.

Depends on #N (feat/presence-polish) for the renamed labels.
nrupard deleted branch feat/sticky-away 2026-05-15 22:45:42 +02:00
Sign in to join this conversation.
No reviewers
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
psa-systems/lets-chat!122
No description provided.