Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user_sidebar: Set personal presence dot to be accurate to server info. #20565

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

YashRE42
Copy link
Collaborator

commit message:

Previously, we'd handle our own presence circle as a special case by
always marking ourselves as online. In commit
345616ad02636939e51bf4cffde65d0dca3499df we changed this to be more
accurate to what the current client sends to the server (and thus what
other clients see) in terms of whether the current client shares
presence info or not. However, that change still left us in a state
where we wouldn't be accurate with other users in terms of being
"unavailable".

Hence, this commit removes the code which treated the current user as
a special case in presence and makes it such that the current user
also sees themselves as unavailable if that's what the current user is
broadcasting to other users (an example of this is if you've left a
Zulip tab open on a different monitor but that window does not have
focus).

Fixes: #18846.

Follow up which fixes: #18846 based on feedback at #20376 (comment).

Testing plan:
Existing node tests pass.

Manual testing via adjusting

// ./static/js/activity.js

/* Broadcast "idle" to server after 5 minutes of local inactivity */
const DEFAULT_IDLE_TIMEOUT_MS = 5 * 60 * 1000;
/* Time between keep-alive pings */
const ACTIVE_PING_INTERVAL_MS = 50 * 1000;

It feels as though this is unlikely to trigger with the default values.

GIFs or screenshots:

screenshot

@zulipbot
Copy link
Member

Hello @zulip/server-sidebars members, this pull request was labeled with the "area: right-sidebar" label, so you may want to check it out!

Previously, we'd handle our own presence circle as a special case by
always marking ourselves as online. In commit
345616a we changed this to be more
accurate to what the current client sends to the server (and thus what
other clients see) in terms of whether the current client shares
presence info or not. However, that change still left us in a state
where we wouldn't be accurate with other users in terms of being
"unavailable".

Hence, this commit removes the code which treated the current user as
a special case in presence and makes it such that the current user
also sees themselves as unavailable if that's what the current user is
broadcasting to other users (an example of this is if you've left a
Zulip tab open on a different monitor but that window does not have
focus).

Fixes: zulip#18846.
@zulipbot
Copy link
Member

zulipbot commented Sep 9, 2022

Heads up @YashRE42, we just merged some commits that conflict with the changes you made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the upstream/main branch and resolve your pull request's merge conflicts accordingly.

@timabbott timabbott added the completion candidate PRs with reviews that may unblock merging label Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Personal presence dot should match presence status shown to other users
3 participants