Commit Graph

66702 Commits

Author SHA1 Message Date
Sahil Batra
ead413f9f8 banners: Apply text-align property to banner-label element.
Adding "text-align: start" css to banner-label element makes
sure that the banner text is not aligned as per the alignment
of parent element, as we require left alignment of text for
all the banners. Only navbar banners have text align in center
but that is handled by adjusting the flex layout of the
banner-content, parent of banner-label, element.
2025-08-28 09:46:52 -07:00
Sahil Batra
6ab670bdee lightbox: Use single keydown handler for toggling overlay.
We use the same "v" key for opening and closing the
lightbox overlay.

We already have code to open and close the lightbox
overlay in hotkey.ts.

Having another keydown handler for closing the overlay
resulted in a bug where the overlay was just not being
opened because the second handler was immediately called
to close the overlay was immediately called after the first.

Fixes #35868.
2025-08-28 09:45:41 -07:00
Evy Kassirer
22ca76ba2b stream_data: Delete partial_subscribers off of sub creation attrs.
Followup to https://github.com/zulip/zulip/pull/34960#discussion_r2176959839
2025-08-28 09:36:11 -07:00
Vector73
92fbe47a3b events: Add support for processing modern presence event in web client. 2025-08-27 17:16:31 -07:00
Kislay Verma
396f4d004a api_docs: Clarify description for send_new_subscription_messages.
The same subscription request can contain both existing channels
and newly created channels, so we clarify here that direct message
notifications are only sent when users are subscribed to existing
channels.

Also, updates this text to use "direct message" instead of "DM".

Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2025-08-27 17:06:31 -07:00
Kislay Verma
9b7d6335c1 test_subs: Add send_new_subscription_messages parameter false test case.
For the sake of completion, we add a test case ensuring that
the response does not contain `new_subscription_messages_sent` if
the parameter `send_new_subscription_messages` is `false`,
as mentioned in the API documentation.
2025-08-27 17:06:31 -07:00
Kislay Verma
18d9b686b7 add_subscriptions: Only exclude DMs and not new channel notifications.
When the number of new subscriptions crosses a threshold, we wish to
avoid sending DMs to the user as implemented in #31206. But there was
a bug causing announcement channel and new channel notification
messages to also not be sent.

This commit fixes that bug by ensuring that we only exclude direct
message notications.
2025-08-27 17:06:31 -07:00
Kislay Verma
06d2ecb482 test_subs: Add test for all notification bot messages.
In #31206, we changed `add_subscriptions_backend` to exclude the
notification bot DMs when subscribing users to a channel when the
number of subscriptions exceeds MAX_BULK_NEW_SUBSCRIPTION_MESSAGES.

This caused a bug where new channel announcement and creation
notification messages were not being sent. Here we add a test that
confirmes the current behavior, which will be corrected in a
subsequent commit.

Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2025-08-27 17:06:31 -07:00
Shubham Padia
f20dc8f6cf starlight_help: Do not use type assertions in astro components.
Partially fixes #35435.

For KeyboardTip.astro and ZulipTip.astro, we were using type assertions
and thus needed to suppress eslint warnings that were being thrown.
2025-08-27 14:30:44 -07:00
Shubham Padia
5501954637 starlight_help: Add comments for the tip components.
We could also have one underlying component powering all of our custom
aside components. The code duplication between KeyboardTip and ZulipTip
is high. We are holding off on having that underlying component since
that component looks really complex compared to having 2 separate
components now. If we feel the duplication is a major issue later on,
combining them shouldn't be too much of an hassle.
2025-08-27 14:30:44 -07:00
Shubham Padia
9812bf187f starlight_help: Do not pass global variable as argument. 2025-08-27 14:30:44 -07:00
Shubham Padia
fc176fedd4 starlight_help: Add comment for remarkStringify as a plugin for linting. 2025-08-27 14:30:44 -07:00
Karl Stolley
c4e7f5ec0d icons: Remove two unused icons. 2025-08-27 13:50:40 -07:00
Karl Stolley
3e6f67446e icons: Update README and include list of in-house icons. 2025-08-27 13:50:40 -07:00
Karl Stolley
dc40549531 thirdparty: Add missing icon references. 2025-08-27 13:50:40 -07:00
Karl Stolley
488710108e thirdparty: Alphabetize list of icons. 2025-08-27 13:50:40 -07:00
Alex Vandiver
5b3b9a990a docs: Split the sudo command from the installer.
Otherwise, users pasting the whole block into their console will have the
experience of it appearing to do nothing -- running the installer will
only happen _after_ they exit the `sudo` shell.

Split the blocks into two sections, so they will be copy/pasted
separately, and thus the installer will properly be run _inside_ the
sudo shell.
2025-08-27 13:38:12 -07:00
Mateusz Mandera
7d40fcfd7e saml: Don't allow listing zulip_groups in extra_attrs in IdP config.
zulip_groups is a special attribute, for the group sync feature, and
will always be read from the SAMLResponse if it's present and group sync
is enabled.
Listing it in extra_attrs is a misconfiguration that results in
confusing behavior. See #35787.
2025-08-27 13:21:00 -07:00
Aman Agrawal
a0c198ad99 deactivated_redirect: Preserve URL hash when redirecting.
URL hash from old url is lost using this JS method for redirecting,
preserved by extracting the hash and appending it to the new URL.

In case user clicks on the new url link, we do this by updating that url to
include the hash, and using that URL for the automated redirect as well.
2025-08-27 13:01:52 -07:00
Alex Vandiver
0cb9f65a24 help: Document the redirect that subdomain changes leave. 2025-08-27 12:59:34 -07:00
Pratik Chanda
cef1bc487e css: Fix slow-send-spinner not applying on all messagebox-content.
Earlier, slow-send-spinner was working correctly for message with
messagebox-includes-sender. Any subsequent messages with
slow-send-spinner would result in broken animated because of rules
not applying properly.

This commit fixes this behaviour by applying the rules for all
messagebox-content and fixing the animation.
2025-08-27 12:57:23 -07:00
Shubham Padia
67d3101d67 starlight_help: Update sidebar labels where they differ from the title.
Fixes #35620.
2025-08-27 12:39:13 -07:00
Shubham Padia
9c3c77b867 help: Use Change instead of Set in change-your-profile-picture.md. 2025-08-27 12:38:56 -07:00
Shubham Padia
0507c8d87f help: Fix typo in title for restrict-profile-picture-changes.md.
Confirmed on
https://chat.zulip.org/#narrow/channel/19-documentation/topic/new.20help.20center.3A.20left.20sidebar.20labels.
2025-08-27 12:38:56 -07:00
Alex Vandiver
575dd10f99 reminders: Stop interpolating user-provided values in format string.
We must not intermix Markdown strings which are ready for the message,
with format strings which we intend to interpolate on.
2025-08-27 12:07:21 -07:00
Lauryn Menard
1caff10df7 corporate: Send fixed-price stale audit log internal billing email.
Still send an internal billing notice when a fixed-price plan is
invoiced while the remote server has stale audit log data. This
does not trigger updating the stale_audit_log_data_email_sent
field on the CustomerPlan as the plan will be invoiced in this
case.
2025-08-27 11:54:33 -07:00
Lauryn Menard
208f1b30db corporate: Invoice self-hosted fixed-price plans with stale data.
Because license counts do not change the amount due for plans with
a fixed-price, we invoice them for self-hosted customers even when
the audit log data from the server is stale.
2025-08-27 11:54:33 -07:00
Lauryn Menard
d8a5105705 corporate: Add test for stale audit log fixed-price plan.
Confirms that currently if a fixed-price plan for a self-hosted
customer has stale audit log data, the plan will not be invoiced.
2025-08-27 11:54:33 -07:00
Lauryn Menard
699c0c6200 create-channel: Remove send_new_subscription_messages parameter.
Removes send_new_subscription_messages parameter from
`POST channel/create` endpoint as Notification Bot DMs
are never sent when users are subscribed as part of
creating a new channel.

Not considered a documentable API change, since the previous parameter
never had any effect, so this is effectively just a documentation and
error-handling bug fix, not an API change relevant to implementors.
2025-08-27 11:12:05 -07:00
Lauryn Menard
dda2c6e285 create-channel: Clarify flow of new channel and subscription notices.
Updates comments in send_user_subscribed_and_new_channel_notifications
so that it is clearer what notification each "if" block of the function
is generating.

Also, moves variables that are only used in the user subscribed DMs to
that "if" block.
2025-08-27 11:12:05 -07:00
Lauryn Menard
8b1e536e6b create-channel: Rename send_messages_for_new_subscribers helper.
Because send_messages_for_new_subscribers also sends channel
notification messages about newly created channels, a clearer
name for is send_user_subscribed_and_new_channel_notifications.
2025-08-27 11:12:05 -07:00
Pratik Chanda
6af4e82c49 notifications: Fix desktop notifications for message not grouping.
Earlier, message notifications for same key would not get grouped
together because of the old notification_object close event listener
firing up when not supposed to.

This commit fixes this behaviour by checking the notification object
instance is the same as the currently displayed notification object
from notice memory when closing it.

Co-authored-by: prakhar1144 <prakhar@zulip.com>
2025-08-27 10:59:38 -07:00
Prakhar Pratyush
5a37942c61 push_notifications: Parse push/e2ee/notify response using Pydantic.
In `send_push_notifications`, we were manually asserting types of the
fields returned by the `remotes/push/e2ee/notify` endpoint at runtime
and constructed the `response_data` data structure for further use.

Pydantic is the perfect tool for this task.

This commit updates the concerned code to use Pydantic's `TypeAdapter`.

No functional change.

Fixes part of #35368.
2025-08-27 10:58:10 -07:00
Prakhar Pratyush
3548764e21 push_notifications: Use SentPushNotificationResult dataclass.
Refactoring, no functional change.

This commit refactors `send_e2ee_push_notification_apple`
and `send_e2ee_push_notification_android` to return a
`SentPushNotificationResult` dataclass.

It's a cleaner protocol than passing a mutable data structure
`delete_device_ids` as argument and updating it within
functions.

Fixes part of #35368.
2025-08-27 10:56:42 -07:00
Aman Agrawal
3e7e81581c inbox: Show muted icon for muted channels. 2025-08-27 10:30:12 -07:00
Aman Agrawal
917a78ef52 inbox: Don't show same tooltip for all recipient_bar_icon icons.
We need to show different tooltip for channel row visibility icons.
2025-08-27 10:30:12 -07:00
Alex Vandiver
d15f2fb831 export-search: Use background workers to download attachments. 2025-08-27 10:24:21 -07:00
Alex Vandiver
7714ca3ff9 export-search: Add explicit usermessage message_id range filters. 2025-08-27 10:24:21 -07:00
Alex Vandiver
b9216c768d export-search: Use chunked regions by id range. 2025-08-27 10:24:21 -07:00
Alex Vandiver
e703f65198 export-search: Joins to usermessages may require adding a distinct. 2025-08-27 10:24:21 -07:00
Alex Vandiver
e9c6856d02 export-search: Limit to only the fields we need. 2025-08-27 10:24:21 -07:00
Alex Vandiver
ae090d9ff3 export-search: Prefetch message sender.
This avoids O(n) extra queries.
2025-08-27 10:24:21 -07:00
Alex Vandiver
6a74f2d889 docs: Add upgrade instructions for Debian 12 -> 13. 2025-08-27 09:32:22 -07:00
Alex Vandiver
4fc49db781 cache: Adjust to pickle_protocol=5, since we require Python 3.8+.
https://docs.python.org/3/library/pickle.html#data-stream-format
2025-08-27 09:22:56 -07:00
Alex Vandiver
c68be03df7 markdown: Remove vestigial Twitter code and cache.
Contrary to what the comment implied, the remaining `fetch_tweet_data`
function would never return a cache hit, as it is namespaced by the
current deploy's cache key.
2025-08-27 09:22:56 -07:00
Alex Vandiver
9715f6c104 cache: Use zstd compression level 9 for bmemcached compression. 2025-08-27 09:22:56 -07:00
Alex Vandiver
33e6d78f3b memcached: Switch to zstd compression.
This cannot go in `CACHES` because a module cannot be serialized via
pickle.
2025-08-27 09:22:56 -07:00
Alex Vandiver
3b1df07e7e dependencies: Add zstd. 2025-08-27 09:22:56 -07:00
Alex Vandiver
52671fd486 message_cache: Skip pickling JSON-encoded string in cache. 2025-08-27 09:22:56 -07:00
Alex Vandiver
7f325108a3 message_cache: bmemcache already applies compression.
This will appear to _increase_ time spent in memcached, according to
our access logs.  This is because we used to apply zlib compression
twice -- once, outside of our performance logging, and a
second (ineffectual) time inside.  We now only compress once, which
reduces the overall time, and accounts for it more correctly.
2025-08-27 09:22:56 -07:00