fix(presence): closing a tab no longer erases your custom status (#339) #350

Merged
jared merged 1 commits from fix/presence-pagehide-status into lotus 2026-10-11 22:57:25 -04:00
Owner

Fixes #339.

The pagehide keepalive write sent {"presence":"offline"} with no status_msg. Synapse treats a missing status_msg as clearing it, so closing or reloading any Lotus tab wiped the user's custom status for everyone. It happened intermittently, because the 10 s presence rate limit sometimes rejected the write. It now sends the current status with the offline state.

Verified on the local Synapse, with the status set from another device:

step before after
reload 1 status gone online / Gone fishing
reload 2 — online / Gone fishing
close tab status gone offline / Gone fishing

The close-time body is now {"presence":"offline","status_msg":"Gone fishing"}.

tsc clean · unit tests 1325 pass · ESLint/Prettier clean on the changed file.

🤖 Generated with Claude Code

https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5

Fixes #339. The `pagehide` keepalive write sent `{"presence":"offline"}` with no `status_msg`. Synapse treats a missing `status_msg` as clearing it, so closing or reloading any Lotus tab wiped the user's custom status for everyone. It happened intermittently, because the 10 s presence rate limit sometimes rejected the write. It now sends the current status with the offline state. **Verified** on the local Synapse, with the status set from another device: | step | before | after | |---|---|---| | reload 1 | status gone | `online` / Gone fishing | | reload 2 | — | `online` / Gone fishing | | close tab | status gone | `offline` / Gone fishing | The close-time body is now `{"presence":"offline","status_msg":"Gone fishing"}`. `tsc` clean · unit tests 1325 pass · ESLint/Prettier clean on the changed file. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared added 1 commit 2026-10-11 22:07:35 -04:00
fix(presence): closing a tab no longer erases your custom status (#339)
CI / Build & Quality Checks (pull_request) Successful in 3m16s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Secret scan (gitleaks) (pull_request) Successful in 15s
CI / Playwright smoke (e2e) (pull_request) Successful in 12m20s
e50bd677d6
The pagehide keepalive write sent { presence: 'offline' } with no
status_msg, which Synapse treats as clearing it, so closing or reloading
any Lotus tab wiped the user's status for everyone (intermittently, as
the 10 s presence rate limit sometimes 429'd the write). It now sends the
current status along with the offline state.

Verified against the local Synapse: with a status set from another
device, two reloads and a tab close keep it (server shows
offline/"Gone fishing" after the close; before, the first reload wiped it).

Fixes #339

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared merged commit fea9484a03 into lotus 2026-10-11 22:57:25 -04:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#350