Commit Graph

63652 Commits

Author SHA1 Message Date
Saubhagya Patel
9d726699e1 zerver: Use Pydantic for MessageEditHistoryVisibilityPolicyEnum.
This commit ensures the `message_edit_history_visibility_raw`
parameter is validated using the policy names defined in the
`MessageEditHistoryVisibilityPolicyEnum`, used in the
`update_realm()` function in the `zerver/views/realm.py` file.

Follow up of #32840.
2025-03-05 10:32:40 -08:00
Aman Agrawal
c0c0ca394d css: Add more space next to privacy icon in dropdowns. 2025-03-05 10:27:45 -08:00
evykassirer
e13f59a13a input_pill: Don't wrap words mid-word unless they're wider than input. 2025-03-05 10:21:52 -08:00
Aman Agrawal
47ba1ed737 user_card_popover: Use airplane eye icon to view dms. 2025-03-05 09:50:44 -08:00
Alex Vandiver
a9337e7641 nagios: Change the cron jobs to exit 0 for all ok/warning/critical.
The cron jobs are potentially wrapped by Sentry, which logs "cron
failures" and sends emails.  We would like those failures to only be
when the cron job itself failed to run successfully -- not when the
underlying metric is outside of its normal range.  We would like to
differentiate a failure of the monitoring infrastructure from a
failure of what it is monitoring.

Swap to return 0 on everything except "unknown" results.
2025-03-05 09:49:36 -08:00
Alex Vandiver
34f0e3b621 cache: Do not fail the request on cache-set failures.
Failure to update the cache should log an exception but continue.
2025-03-05 09:48:58 -08:00
Alex Vandiver
c4701fa8d5 cache: Switch delete_user_profile_caches to using an iterator. 2025-03-05 09:48:19 -08:00
Alex Vandiver
e54dab50f2 cache: Switch cache_delete_many to deleting 10k at a time.
This also switches to making use of the input possibly being an
iterator, to only store 10k of the keys at once.
2025-03-05 09:48:19 -08:00
Alex Vandiver
67bea1f103 cache: validate_cache_key in cache_delete_many may get other prefixes. 2025-03-05 09:48:19 -08:00
Maneesh Shukla
ae6acd9f05 presence_data: Skip fetching presence_data in user_card_popover for spectators. 2025-03-05 09:46:18 -08:00
Aman Agrawal
d430263906 search: Don't wrap query to next line.
Instead of wrapping query to next line, we let it be hidden. User
can still use mouse or arrow keys to see the end of the text they
typed.
2025-03-05 09:45:32 -08:00
Aman Agrawal
ffeb027b4c ui_init: Don't add with operator if topic has no messages.
Left sidebar can contain links empty topics. If user clicks on them,
we add `with` operator to the narrow if the topic is empty.

Reproducer:
* Click on a topic in left sidebar.
* Delete all the messages in the topic.
* Click on the topic again.
2025-03-05 09:44:51 -08:00
evykassirer
674d26a66b message_row: Remove stale CSS for zulip-icon-more-vertical.
This was introduced in 5d293c82cd but shortly after
60aa58dfb9 renamed the use of zulip-icon-more-vertical
to zulip-icon-more-vertical-spread, so the CSS classname is
no longer being used there.

See also, the TODO from 60aa58d.
2025-03-04 23:08:35 -08:00
evykassirer
255b048b34 styles: Remove stale CSS for spectator login divider.
The divider was removed in b53836d.
2025-03-04 23:08:07 -08:00
evykassirer
81ca502274 widget: Center error message and scale with font size. 2025-03-04 17:57:20 -08:00
evykassirer
77354ce9fd subscriptions: Remove stale reference to #subscriptions.
There are no other CSS rules with this id name and also no grep
results for "subscriptions" that have it as an html id, so it seems
pretty safe to say this id is no longer being used.
2025-03-04 17:56:27 -08:00
evykassirer
9b7f37d106 introduce_zulip_view_modal: Scale button with font size. 2025-03-04 17:53:50 -08:00
evykassirer
844febd511 input_pill: Scale user group pill icon with font size. 2025-03-04 17:53:12 -08:00
evykassirer
59a93325f4 search: Scale search icon in header on short screens. 2025-03-04 17:52:36 -08:00
Alya Abbott
c4c91d295f portico: Update features table. 2025-03-04 17:51:12 -08:00
whilstsomebody
b9c037e0ee realm_playground: Use Intl.ListFormat rather than .join(",").
Fixes: #26936

Co-authored by: CIC4DA <dhruv.jain9100@gmail.com>
2025-03-04 16:58:23 -08:00
whilstsomebody
6c6d5fbb6a people: Use Intl.ListFormat rather than .join(",").
Fixes: #26936

Co-authored by: CIC4DA <dhruv.jain9100@gmail.com>
2025-03-04 16:58:23 -08:00
whilstsomebody
cface068cb util: Add function to format array output based on "and" preference.
This is a pre-commit to add the function
"format_array_output_based_on_and_preference()" which will take
two parameters- string array and a boolean whether we want and
based output or not. This function return a string formatted
using Intl.ListFormat.
2025-03-04 16:58:23 -08:00
Aman Agrawal
a271df68db recent_view: Update rendered time when user becomes active.
Fixes #23005

Update rendered time in recent view when user comes back after being idle.
2025-03-04 16:33:19 -08:00
ImDooMLorD
6dea58623c errors: Standardize "already in use" error messages.
Updates these error messages to have "X is already in use." format,
e.g., "Channel name is already in use." and "Name is already in use."

Fixes #33629.
2025-03-04 16:10:25 -08:00
ImDooMLorD
b6f09b6dab errors: Use shared class for message when email is already in use.
Replaces "Email '{email}' already in use" with "Email is already in use."
2025-03-04 16:10:25 -08:00
Alex Vandiver
a5beb608bb test-backend: Remove now non-existant file.
This should have been removed in 9dfaa83aa8.
2025-03-04 16:09:25 -08:00
Alex Vandiver
66bad1da39 send_email: Skip the ScheduledEmail table for 0-delay emails. 2025-03-04 16:09:25 -08:00
Alex Vandiver
c5200e8b05 deliver_scheduled_emails: Use a queue, instead of infinite retries.
`deliver_scheduled_emails` tries to deliver the email synchronously,
and if it fails, it retries after 10 seconds.  Since it does not track
retries, and always tries the earliest-scheduled-but-due message
first, the worker will not make forward progress if there is a
persistent failure with that message, and will retry indefinitely.
This can result in excessive network or email delivery charges from
the remote SMTP server.

Switch to delivering emails via a new queue worker.  The
`deliver_scheduled_emails` job now serves only to pull deferred jobs
out of the table once they are due, insert them into RabbitMQ, and
then delete them.  This limits the potential for head-of-queue
failures to failures inserting into RabbitMQ, which is more reasonable
than failures speaking to a complex external system we do not control.
Retries and any connections to the SMTP server are left to the
RabbitMQ consumer.

We build a new RabbitMQ queue, rather than use the existing
`email_senders` queue, because that queue is expected to be reasonably
low-latency, for things like missed message notifications.  The
`send_future_email` codepath which inserts into ScheduledEmails is
also (ab)used to digest emails, which are extremely bursty in their
frequency -- and a large burst could significantly delay emails behind
it in the queue.

The new queue is explicitly only for messages which were not initiated
by user actions (e.g., invitation reminders, digests, new account
follow-ups) which are thus not latency-sensitive.

Fixes: #32463.
2025-03-04 16:09:25 -08:00
Karl Stolley
7fde5fd0a4 message_area: Hide action icons based on container query. 2025-03-04 16:00:03 -08:00
Karl Stolley
45f2e239b9 message_area: Establish message-lists container. 2025-03-04 16:00:03 -08:00
Karl Stolley
c4a7ef8f63 left_sidebar: Allow condensed nav items to shrink. 2025-03-04 16:00:03 -08:00
Aman Agrawal
6801c6de7b message_edit: Fix moved msg not updated when user not sub of new stream.
Fixes #33719

If the user is not subscribed to the new stream but is a subsriber
of the old stream, we were not sending any update events to the user.
This results in unexpected behaviour related to the message.
2025-03-04 15:55:54 -08:00
Aman Agrawal
d9eedee017 message_edit: Extract function to remove duplicate users.
This functions helps exclude users for which we don't need to
send `update` event.
2025-03-04 15:55:54 -08:00
Harsh
411fd9c4fe navbar: Show "Muted user" instead of muted user's name.
This commit shows the string "Muted user" instead of
muted user's name in DM's navbar.

fixes: #33673
2025-03-04 15:43:25 -08:00
Pratik Chanda
92dd31ee00 css: Change right sidebar outline for user list.
Earlier, outline for stream cursor in user list and tab navigation
were inconsistent.

This commit makes the outline consistent for both of them.

Fixes: zulip#32880.
2025-03-04 15:41:25 -08:00
Pratik Chanda
df9baf3202 css: Change left sidebar outline for stream list.
Earlier, outline for stream cursor arrow navigation and tab navigation
in stream list were inconsistent.

This commit makes the outline consistent for both stream cursor and
tab navigation.

Fixes part of zulip#32880.
2025-03-04 15:41:25 -08:00
Alya Abbott
2f01eadf79 groups: Don't list group permissions in deactivation error banner. 2025-03-04 15:36:46 -08:00
Alya Abbott
562e7b97c2 help: Move group deactivation instructions to dedicated page.
Also add instructions to view deactivated groups.
2025-03-04 15:36:46 -08:00
Lauryn Menard
cb8e67a0e6 narrow-banner: Pass filter for showing/picking an empty narrow banner.
We expect to have a message list and therefore a filter when we show
or pick an empty narrow banner.
2025-03-04 15:35:18 -08:00
Lauryn Menard
a98c86922a narrow-banner: Simplify logic for empty channel feed banner. 2025-03-04 15:35:18 -08:00
evykassirer
aae0bdfa94 stream_narrow: Scale icon in sub/unsub message with font size. 2025-03-04 15:31:26 -08:00
evykassirer
7ac35542a4 recent_view: Scale unread icon with font size on small screens. 2025-03-04 15:30:36 -08:00
Anders Kaseorg
e381dfd448 styles: Remove obsolete ‘transition: none …’ workaround.
https://github.com/kristerkari/stylelint-high-performance-animation/issues/216
was fixed upstream.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-03-04 15:30:11 -08:00
Kislay Verma
d6685f4780 clipboard_handler: Fix bug when copying in Safari.
When copying a message from message actions
popover in Safari, the text wouldn't be copied
and neither would the popover close, because
document.execCommand("copy") would fail
and the copy callback wouldn't trigger.

Safari requires some DOM element to be selected
before it can successfully execute the copy
command. This commit fixes the bug by doing
just that.

Note: The mime type `text/x-gfm` is still not
copied in Safari.
2025-03-04 15:28:16 -08:00
apoorvapendse
ce66d2a4e6 user_groups: Update empty messages and dropdown display.
Also fixes: https://chat.zulip.org/#narrow/channel/9-issues/topic/.F0.9F.8E.AF.20don't.20offer.20to.20create.20user.20groups.20when.20you.20can't/with/2111141
2025-03-04 13:36:30 -08:00
apoorvapendse
b5e123a613 user_groups: Disable actions for deactivated groups.
Joining/leaving the group as well as
adding or removing others is disabled.
2025-03-04 13:36:30 -08:00
apoorvapendse
d12feb1872 group_settings: Show all, active and deactivated groups.
Fixes #32877.
Co-authored-by: Sanchit Sharma <ssharmas10662@gmail.com>

Thanks to @sanchi-t, I've yanked a lot of code and approach
from his concurrent PR in 32475, especially the method of
toggling parent css class to hide/show relevant children.
2025-03-04 13:36:30 -08:00
Alex Vandiver
47e622f5a5 run_hooks: Pass down, and respect, --from-git argument.
The refactoring in 4e28e1d3ff incorrectly switched a check for
`if args.from_git` into `if NEW_ZULIP_MERGE_BASE`, which is
incorrect -- the merge-base is always defined, it may just match the
version.  This led to errors when installing from tarball, without a
git repo.

Since the run_hooks command was already set up to take a `--from-git`
argument, but was ignoring it, pass down that flag from
upgrade-zulip-stage-3 when necessary, and swap the run_hooks logic
back to basing the version-resolution logic on that flag.
2025-03-04 13:18:50 -08:00
evykassirer
5e4f70c11e settings: Scale notification sound icon with font size. 2025-03-04 13:16:35 -08:00