Commit Graph

65439 Commits

Author SHA1 Message Date
Aman Agrawal
b8651e78e7 upload: Fix send button disabled when compose is closed during upload.
While uploading a file, if you close the compose box, and reopen
it, compose send button remains disabled due to upload in progress
being true.

To fix it, we update upload status for compose when upload is
cancelled.
2025-04-03 12:57:14 -07:00
Alex Vandiver
bd8764f0f6 actions: Add test upgrade from 10.0. 2025-04-03 11:37:42 -07:00
Anders Kaseorg
f2a171a881 Revert "css: Remove unused transition property."
This reverts commit 7d08f32ebb.

The commit message is factually incorrect, and the change broke our
fade-out transitions.  visibility can be transitioned, and there is a
specific rule for what that means.  This is critical for transitioning
opacity in the fade-out direction: if you fail to also transition
visibility, then the element disappears immediately regardless of
opacity.

https://developer.mozilla.org/en-US/docs/Web/CSS/visibility#interpolation

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-04-03 10:59:08 -07:00
Alex Vandiver
342d278c8a upgrade: Remove handling of "googleblob" emoji rename.
This code was originally added in 608173657d in Zulip Server 2.0;
since we can only directly upgrade from 5.0 or later, this code is
guaranteed to have run already. Remove it.
2025-04-03 10:46:12 -07:00
Alex Vandiver
e93d43e8d1 upgrade: Remove puppet_classes renaming code.
This code was originally added in 5f3765b872 in Zulip Server 4.0;
since we can only directly upgrade from 5.0 or later, this code is
guaranteed to have run already. Remove it.
2025-04-03 10:46:12 -07:00
Alex Vandiver
f48a3a772f upgrade: Remove ancient symlink of settings.py.
This code was originally added in 2b146012e1 in Zulip Server 1.7.0;
since we can only directly upgrade from 5.0 or later, this code is
guaranteed to have run already. Remove it.
2025-04-03 10:46:12 -07:00
Alex Vandiver
e404a9b71c upgrade: Remove explicit python3-yaml install step.
The python3-yaml dependency was added at install time in 3314fefaec
in Zulip Server 4.0, and this workaround was added in de41a10d38,
also in 4.0.  Since we can only directly upgrade from 5.0 or later,
the dependency is guaranteed to be installed already, by one or the
other of those ways. Remove this workaround.
2025-04-03 10:46:12 -07:00
Alex Vandiver
39cc830ae5 upgrade: Remove tsearch_extras cleanup code.
This code was originally added in 382261dc72 in Zulip Server 3.0;
since we can only directly upgrade from 5.0 or later, this code is
guaranteed to have run already. Remove it.
2025-04-03 10:46:12 -07:00
Alex Vandiver
53bf48a873 upgrade: Remove RabbitMQ cookie randomization code.
This code was originally added in e705883857 in Zulip Server 5.0;
since we can only directly upgrade from 5.0 or later, this code is
guaranteed to have run already. Remove it.
2025-04-03 10:46:12 -07:00
Aman Agrawal
7d08f32ebb css: Remove unused transition property.
`visibility` cannot be animated since it is a boolean.

This fixes composition failure error in Chrome dev tools when
these animations are triggered that the animation has
no visible change.
2025-04-03 10:44:33 -07:00
Evy Kassirer
ea2fd69f67 subscription_info: Send partial subscriber info to client separately.
We're doing this so that the client can keep track of which channels
it might need to request full subscriber data from, and which already
have full subscriber data.
2025-04-02 16:19:05 -07:00
apoorvapendse
82f4ec0d6c message_row: Restore copy button in edit textbox.
Fixes: https://chat.zulip.org/#narrow/channel/9-issues/topic/missing.20copy.20button.20for.20View.20Original.20Message/near/2142823
2025-04-02 13:47:22 -07:00
whilstsomebody
22341c18db popover: Hide unexpired invitation count when it is 0.
In deactivate user confirm dialog, we hide the count of
unexpired invitations of a user when the count is zero.

Fixes: #34265
2025-04-02 13:15:06 -07:00
Karl Stolley
492541f1e2 recent_view: Place new sort arrows. 2025-04-02 13:14:07 -07:00
Karl Stolley
ede630a6dd settings: Add new sort arrows to all settings tables. 2025-04-02 13:14:07 -07:00
Alex Vandiver
d2772a0a38 postgresql: Remove inaccurate comment.
PostgreSQL 10 and later can adjust their TLS configuration without a
restart, with `SELECT pg_reload_conf()` or `pg_ctlcluster 16 main
reload`.
2025-04-02 13:07:31 -07:00
Aman Agrawal
4202e4e044 app: Track keyboard overlaps with compose box bug as a TODO.
This will help us revert back to `resizes-visual` on Firefox
Android when the bug is fixed.
2025-04-02 12:36:11 -07:00
Alex Vandiver
9073ad3cc5 kandra: Add missing variable used in the template. 2025-04-02 09:55:21 -07:00
Alex Vandiver
258003a1c8 kandra: Extract the Teleport host CA to disk. 2025-04-02 09:55:21 -07:00
Karl Stolley
a1bba7a453 message_row: Better flexibly align hover controls. 2025-04-02 09:43:58 -07:00
Karl Stolley
11fdd5f005 message_row: Restore padding to senderless content box. 2025-04-02 09:43:58 -07:00
Karl Stolley
46b33f0d26 message_row: Better target first children. 2025-04-02 09:43:58 -07:00
Alya Abbott
f145d5738e corporate: Add more detail to job description. 2025-04-01 18:36:54 -07:00
Kislay Verma
426b97a2e5 popover_menus: Fix bug in user card shortcut.
When hovering over the user avatar, the tooltip
"View user card" appears. If this tooltip appears
over the currently selected message, then pressing
`u` once doesn't show the user card popover, rather
it only hides the tooltip. It is on the second press of `u`
that the user card appears.

This commit fixes that.

We also add some comments to help clarify this code path.
2025-04-01 18:19:33 -07:00
KIRTAN AGARWAL
b1d955379e test-backend: Remove outdated reference to MarkdownTest class.
The tests and test classes have been slightly renamed over time.
2025-04-01 17:58:22 -07:00
Karl Stolley
465971171d rendered_markdown: Adjust content blocks for link focus ring. 2025-04-01 17:47:06 -07:00
Aman Agrawal
203cc69969 navigate: Fix up keypress behaviour when a long prev message.
Fixes #32970

When navigating from a short message to a tall message via up
keypress, we used to jump to the top of the message. This
doesn't align with user's expectation that up / down keypress
will let them see the entire message feed.

To fix it, we can `page_up` which scrolls up the correct amount
and then our message selection logic kicks in to select the
correct message on screen.
2025-04-01 14:51:01 -07:00
Alex Vandiver
23e8eb5c7c nginx: Use cache slicing to prevent thundering herds for video thumbs.
This prevents a thundering herd for videos -- if a very large video is
posted to a channel with many active clients, all of them
simultaneously request it, to provide the in-feed preview image.
While these requests come with a `Range` header which is intended to
limit the request to just the first couple MB, nginx ignores this
header when making its request to the upstream -- so it can obtain and
cache the whole file locally.  This results in multiple competing
requests for the whole content from S3, all racing to store the
content in the cache.

Use cache slicing to split the content cache into chunks of 5MB; the
cache is filled one slice at a time, as needed based on the byte
ranges that clients request.  Clients making requests without a
`Range` header are provided with the content transparently stitched
together from the individual slices.

The slice size of 5MB is chosen to encompass more 95% of file
uploads (saving an extra trip to the origin) while also being large
enough to be able to provide video thumbnails in a single slice, as
well as not take too much time to obtain from the upstream.
2025-04-01 13:35:28 -07:00
Karl Stolley
ca1e56d91b compose: Prevent picker from collapsing. 2025-04-01 11:22:14 -07:00
Alex Vandiver
4e26705fbc nginx: Tell the backend service what port we listen on.
The `$host` nginx variable is _not_ the unadulterated `Host`
header (which would be `$http_host`) -- it is that header, *without
the port*, with a fallback to the `server_name` which processed the
request.

This means that backend services are not aware of the port that the
request came in on, unless they derive that from reading
`nginx_listen_port` in `/etc/zulip/zulip.conf`, or similar.
Specifically, this caused `tusd`, on deploys with non-standard
`nginx_listen_port`, to generate a `Location` header which left off
the port, and as such attempted a CORS check when retrieving metadata
about the just-uploaded file, which failed.

Add the port to the `Host` header we pass to `tusd` and other backend
services.
2025-04-01 09:28:18 -07:00
Alex Vandiver
bee3c6eb59 runtusd: Respect application_server.nginx_listen_port.
In deploys `nginx_listen_port` set, tusd would fail to send its hook
requests, as it assumed that nginx would always be listening on
127.0.0.1:80.

Set the `nginx_listen_port` on the hook URL, if necessary.
2025-04-01 09:28:18 -07:00
Alex Vandiver
b4fb22ba1b nginx: Move localhost to its own block, bound to the loopback address.
This makes the `localhost.d` directory less of a lie, and decreases
the chances that local reconfigurations will break the 127.0.0.1:80
server which is used for IPC.

In cases where `nginx_http_only` is enabled, we respect
`nginx_listen_port` soas to not attempt to bind on port 80 if the
administrator was explicitly attempting to avoid that.
2025-04-01 09:28:18 -07:00
Aman Agrawal
7d5d79909c buddy_list: Don't update user list in right sidebar for spectators.
When adding new messages, we were updating buddy list which
resulted in insertion errors.

Fixed by not updating the right sidebar in case of spectators.
2025-04-01 09:09:12 -07:00
Aman Agrawal
6daf130a42 hotkey: Disable user search hotkey for spectators.
Since we don't have any user data in spectator view, triggering
user search can lead to unexpected results.
2025-04-01 09:09:12 -07:00
Alya Abbott
76deb33542 help: Improve inbox and recent conversations docs.
Fixes #27191.
2025-04-01 09:06:22 -07:00
Anders Kaseorg
b470df98da unescape-contents: Remove.
With commit 2de648df02 (#32346), this
has no effect.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-04-01 09:05:30 -07:00
Evy Kassirer
1405dd630f subscription_info: Add option to get partial subscribers.
It returns just bots for now.
2025-03-31 22:13:50 -07:00
Evy Kassirer
9dc5d19082 stream_data: Remove undefined check for never undefined user_id. 2025-03-31 09:41:45 -07:00
Kunal Sharma
c6e40e70b7 saved_snippets: Remove "new-style" class from add/edit modals. 2025-03-31 09:21:43 -07:00
Anders Kaseorg
5d686f2562 dev-vagrant-docker: Upgrade docker-systemctl-replacement to 1.5.9063.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-03-30 14:11:39 -07:00
Mateusz Mandera
e31dfebc07 test-api: Make desdemona consenting to private data export.
Fixes CI - it was failing due to the API test for organization exports,
which was returning an error due to there being no Organization Owners
with consent to private data export.
2025-03-28 23:05:19 -07:00
Tim Abbott
3a6bacca2b docs: Update changelog for 10.1 release. 2025-03-28 17:49:23 -07:00
Mateusz Mandera
716ead8f4e export: Also add guardrail to the management command. 2025-03-28 17:44:58 -07:00
Mateusz Mandera
8ab400b95d export: Add guardrails against generating a dysfunctional export via UI.
As explained in the comments, if in an export with consent there are no
consenting owners or in a public export there are no owners with email
visibility set to at least ADMINS, the exported data will, upon import,
create an organization without usable owner accounts.
2025-03-28 17:44:58 -07:00
Mateusz Mandera
9864eee029 export: Add detailed tests for export of public vs private data.
Adds detailed tests for the work in the prior commits fixing the
treatment of private data in various tables in exports with consent and
public exports.
2025-03-28 17:44:58 -07:00
Mateusz Mandera
d098b9c349 export: Don't export DirectMessageGroup info of non-consented users.
This is private information, as by inspecting the DirectMessageGroup
objects and their associated Subscription objects, you could determine
which users conversed with each other in a DM group.

This did *not* leak any actual message - only the fact that at least one
of the users in the group sent a group DM.
2025-03-28 17:44:28 -07:00
Mateusz Mandera
0fd79e379e export: Fix public exports.
The prior significantly restricted what data gets exported from
non-consented users. The last thing we're missing is to fix the logic
to work correctly for public exports.

Prior commits focused on addressing exports with consent. This commit
adapts it to work with public exports.:
- Do not turn user accounts into mirror dummies in the public export - or
  after export->import you'll end up with a realm with no functional
  accounts; as every user is non-consented and the original logic added in
  the prior commits will turn them into mirror dummies.
- Some of the custom fetch/process functions were changed without
  considering public exports - now they work correctly, by setting
  consenting_user_ids to an empty set.
2025-03-28 17:44:28 -07:00
Mateusz Mandera
6695e8f9eb export: Scrub Subscriptions to defaults for non-consented users.
The Subscription Config is constructed in a bit of a strange way, that's
not compatible with defining a custom_fetch function.
Instead we have to extend the system to support passing a custom
function for processing just the final list of rows right before it's
returned for writing to export files.
2025-03-28 17:44:28 -07:00
Mateusz Mandera
03887bf871 export: Don't turn non-consented deactivated users into mirror dummies.
As explained in the comment, if we turn a non-consented deactivated user
into a mirror dummy, this will violate the rule that a deactivated user
cannot restore their account by themselves after an export->import
cycle.
2025-03-28 17:44:28 -07:00
Mateusz Mandera
85a98009cd export: Treat is_mirror_dummy=True users as consenting.
As explained in the comment added to the function, in terms of privacy
concerns, it is fine to export all data for these accounts. And it is
important to do - so that exporting an organization which was originally
imported e.g. from Slack doesn't result in excessively limited data for
accounts that were mirror dummies and never "activated" themselves.
2025-03-28 17:44:28 -07:00