Skip to content

Conversation

@AshutoshKhadse23
Copy link

@AshutoshKhadse23 AshutoshKhadse23 commented Jan 15, 2026

Screenshots:

Screenshot 2026-01-15 at 7 37 34 PM Screenshot 2026-01-15 at 7 38 00 PM simulator_screenshot_7D7DF2EA-7E96-474D-9466-027CEBB5ED6C

Demo is not possible as web//server is not merged yet

Closes #1944

@AshutoshKhadse23
Copy link
Author

@gnprice, This is the PR for review. I have corrected and cleaned the commit history as well as added screenshots. Please let me know if any changes are needed after review - I'm open to feedback.

@AshutoshKhadse23 AshutoshKhadse23 marked this pull request as draft January 16, 2026 04:50
@alya
Copy link
Collaborator

alya commented Jan 23, 2026

Hm, why is the label for the dropdown so small compared to other text? Is that expected?

@alya
Copy link
Collaborator

alya commented Jan 23, 2026

Note that marking a PR as a draft indicates to maintainers that it's not ready for review, as our contributor docs explain.

@AshutoshKhadse23
Copy link
Author

Note that marking a PR as a draft indicates to maintainers that it's not ready for review, as our contributor docs explain.

This what was told by maintainers #1269 (comment)

@AshutoshKhadse23
Copy link
Author

Hm, why is the label for the dropdown so small compared to other text? Is that expected?

Surely not let me check what is the cause

Add the scheduledEndTime field to UserStatusChange to support the
scheduled_end_time API parameter. This allows users to set a time
at which their status will be automatically cleared by the server.

The field is an Option<int?> representing a Unix timestamp in seconds:
- OptionNone: no change to the scheduled end time
- OptionSome(value): set the scheduled end time to value
- OptionSome(null): clear any existing scheduled end time

Changes:
- Add scheduledEndTime field to UserStatusChange
- Add _scheduledEndTimeFromJson parsing method
- Update toJson to serialize the field
- Update copyWith to include scheduledEndTime
Update the updateStatus API call to include the scheduled_end_time
parameter when present in UserStatusChange.

This allows the server to store when the user's status should be
automatically cleared.
Add localization strings for the status expiration dropdown:
- statusExpirationLabel: "Automatically clear status"
- statusExpirationNever: "Never"
- statusExpirationIn30Minutes: "In 30 minutes"
- statusExpirationIn1Hour: "In 1 hour"
- statusExpirationTodayAtTime: "Today at {time}"
- statusExpirationTomorrow: "Tomorrow"
- statusExpirationCustom: "Custom"
@AshutoshKhadse23 AshutoshKhadse23 force-pushed the feature/add-status-expiration-time branch from a12aaf4 to 5ac9707 Compare January 24, 2026 05:16
@AshutoshKhadse23
Copy link
Author

AshutoshKhadse23 commented Jan 24, 2026

Before
image
After
Screenshot 2026-01-24 at 11 45 50 AM Screenshot 2026-01-24 at 12 00 18 PM

@alya could you check now whether it is right?

Add a dropdown to the set status page that allows users to set when
their status should automatically expire. The dropdown appears below
the status suggestions.

Options:
- Never (default for custom statuses)
- In 30 minutes
- In 1 hour
- Today at 5:00 PM
- Tomorrow
- Custom (opens date/time picker)

When a preset status is selected, the expiration is automatically
set based on the status type:
- Busy, In a meeting: In 1 hour
- Commuting: In 30 minutes
- Out sick: Tomorrow
- Vacationing: Never
- Working remotely, At the office: Today at 5 PM

The time format respects the user's 24-hour time preference.

The actual clearing of expired statuses happens server-side via
the clear_user_status background job.

Fixes: zulip#1944
@AshutoshKhadse23 AshutoshKhadse23 force-pushed the feature/add-status-expiration-time branch from 5ac9707 to cd5aaac Compare January 24, 2026 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make it possible to set a status end time

2 participants