Commit Graph

65426 Commits

Author SHA1 Message Date
Karl Stolley
966c8451df compose: Add functions to mute/unmute recipient row. 2025-06-19 17:21:20 -07:00
Karl Stolley
1ed8f577ed compose: Add temporary hover color on recipient borders. 2025-06-19 17:21:20 -07:00
Karl Stolley
a237f3284f compose: Add on show callback for recipient widget. 2025-06-19 17:21:20 -07:00
Karl Stolley
f5a661a462 compose: Rewrite picker as grid and adjust presentation. 2025-06-19 17:21:20 -07:00
Karl Stolley
5ca0c39125 compose: Reduce negative space in compose box. 2025-06-19 17:21:20 -07:00
Karl Stolley
11de082def compose: Reduce recipient-row height to 32px at 16px/1em. 2025-06-19 17:21:20 -07:00
Karl Stolley
00a2e13e07 compose: Suppress chevron on channel/DM picker. 2025-06-19 17:21:20 -07:00
Tim Abbott
ea68b7320a api docs: Clarify how the various presence APIs relate.
Co-authored-by: Greg Price <greg@zulip.com>
2025-06-19 15:20:15 -07:00
Tim Abbott
8179a31dc7 docs: Delete legacy presence subsystem page.
Everything on this page is now better explained in the API
documentation for presence.
2025-06-19 15:20:15 -07:00
whilstsomebody
01935c5be2 message_delete: Fix flaky 'do_delete_messages' function.
This commit fixes a flake in `do_delete_messages`, because of
which `test_do_delete_messages_grouping_logic` test occasionally
failed due to nondeterministic ordering of "delete_message" events.

The root cause was that the dictionaries used to group private
and stream messages for deletion (`private_messages_by_recipient`
and `stream_messages_by_topic`) were not sorted before generating
the events. While the `message_ids` within each event were already
sorted, the order of the events themselves could vary based on
the insertion order of the dictionaries, especially when running
tests in different sequences.

We now sort both `private_messages_by_recipient` and
`stream_messages_by_topic` before emitting events, ensuring
consistent ordering.
2025-06-19 15:03:59 -07:00
Evy Kassirer
1ebfa6bae3 stream_types: Sort stream_schema. 2025-06-19 14:25:41 -07:00
Evy Kassirer
4313648ca5 streams: Add subscriber_count to page load data. 2025-06-19 14:25:41 -07:00
Tim Abbott
e298eddefc inbox: Fix calls to is_complete_for_stream_id.
The call from the inbox code was asking the wrong question -- it wants
to know if we've fetched full topic data to know whether to ask for
it. The new name for the function moved in
7d55ad3c13 helped reveal it.

There also was a mention in a comment that was half-baked; wrote the
comment properly.
2025-06-19 13:05:15 -07:00
Lauryn Menard
2abe4ad18b help: Add edit message tip for mentions notifications.
Updates the "Mention a user or group" article to have a tip that
links to the section on how message notifications work for mentions
when editing a message's content.
2025-06-19 12:49:20 -07:00
Lauryn Menard
0fde715a24 devlogin: Filter placeholder realms from a subdomain change.
Showing these realms in the drop down list of realms is not helpful
for developers, so we filter them out of the list. Realms that are
deactivated without a redirect are still listed.
2025-06-19 12:49:03 -07:00
Prakhar Pratyush
7970e1fa45 streams: Fix error while sending notice in deactivated stream.
Sending messages to a deactivated stream is not allowed with
the exception of notices sent in "channel events" topic.

Earlier, notice sent to a deactivated stream when it is
deactivated was working correctly but it was resulting in
an error in the following cases:
* Renaming stream
* Changing stream description
* Changing message retention period
* Changing posting permission
* Changing access permission

This commit makes sure to send notice successfully in those cases.
2025-06-19 12:47:54 -07:00
Prakhar Pratyush
4515c29d44 topic_list: Fix missing 'show all topics' when messages not cached.
Earlier, when number of topics displayed in the topic list
widget was at max `topic_list_data.max_topics` and
first_message_id of stream >= first_cached_message_id.
There was a possibility of a few topics missing for messages
which were sent when the user wasn't subscribed.

We were neither displaying 'show more topics', nor fetching it
from server to update the list asyncronously.

This commit fixes that bug to display 'show all topics' in that
case and also initiates an API call in parallel to fetch all topics
for that stream and update the topic list asyncronously if topics
were actually missing.

Fixes #28949.
2025-06-19 12:43:02 -07:00
Prakhar Pratyush
7d55ad3c13 topic_list: Move and reorganize couple of functions to topic_list.ts.
A prep commit to move `is_complete_for_stream_id` and
`all_topics_in_cache` from `stream_topic_history` to `topic_list`
as it is specifically used while building topic list widget.

As it makes more sense to use `is_complete_for_stream_id` instead of
`all_topics_in_cache` directly, we reorganize to put it inside
`is_complete_for_stream_id`.

We rename `is_complete_for_stream_id` to
`is_full_topic_history_available` for clarity.

It'll also help to avoid tackling circular import issue
while resolving #28949.

No functional change in this commit.
2025-06-19 12:43:02 -07:00
Prakhar Pratyush
f94d3bd4a2 stream_topic_history: Use first_including_muted for the oldest message.
Earlier, we were using `all_messages_data.first()` for the oldest
message ID we have in cache, which is incorrect.

`all_messages_data.first_including_muted()` returns the oldest ID.

This commit fixes the bug.
2025-06-19 12:43:02 -07:00
Prakhar Pratyush
9bd55fcb8c get_server_history: Support multiple callbacks while request is pending.
Previously, if `get_server_history()` was called while a request
for the stream was already pending, the provided `on_success`
callback was ignored.

This commit fixes that by queuing all `on_success` callbacks per
stream_id when a request is already in flight. Once the request
completes, all queued callbacks are executed.
2025-06-19 12:43:02 -07:00
Tim Abbott
f5d0a3ee30 test_subs: Fix incorrect removed import.
Another use got added before the commit removing the import was merged.
2025-06-19 10:55:36 -07:00
Kislay Verma
2f696c5ec3 tests: Add library function to create message lists.
This function actually instantiates the
`MessageList` and `MessageListData` classes instead
of just mocking its structure as it is currently done.

It addresses https://github.com/zulip/zulip/pull/34645#discussion_r2099058418
2025-06-19 10:50:21 -07:00
Kislay Verma
5174dafb37 drafts: Use library functions in test.
In this commit we use functions from `example_stream`
and `example_user` modules in our test library.

Fixes part of 32326
2025-06-19 10:50:21 -07:00
Sahil Batra
b655bd14ea messages: Use "\x07" as topic for DMs and group DMs.
This commit updates code to use "\x07" as value for
"subject" field of Message objects for DMs and group
DMs, so that we have a unique value for DMs and group
DMs which cannot be used for channel messages.

This helps in avoiding having an empty string value as
topic for DMs, which is also used for "general chat"
channel messages, as large number of DMs in the realm
resulted in PostgreSQL query planner thinking that there
are too many "general chat" messages and thus generated
bad query plans for operations like fetching
"general chat" messages in a stream or moving messages
to and from "general chat" topic.

This change as done for ArchivedMessage and
ScheduledMessage objects as well.

Note that the clients still get "subject" value as
an empty string "".

This commit also adds tests for checking that "\x07"
cannot be used as topic for channel messages.

Fixes #34360.
2025-06-19 10:44:37 -07:00
Sahil Batra
5a45779634 test_message_dict: Add test for checking "subject" field value. 2025-06-19 10:44:37 -07:00
Sahil Batra
bdcdbc5565 tests: Add test to check edit history of a DM. 2025-06-19 10:44:37 -07:00
Sahil Batra
e06c181a95 tests: Move test to check permission to deactivate streams.
This commit moves test to check permission to deactivate
streams to test_channel_permissions.py.
2025-06-19 10:42:52 -07:00
Sahil Batra
3f8518f9d1 tests: Move channel administering permission tests.
This commit moves tests to check permission for administering
streams as per can_administer_channel_group setting to
test_channel_permissions.py.
2025-06-19 10:42:52 -07:00
bedo
7eadabe10a move_topic_modal: Only include messages senders in warning banner.
Only participants who sent the messages being moved
should appear in the warning banner.
2025-06-19 10:30:08 -07:00
bedo
26efeef3ee move_topic_modal: Fix "n_unsubscribed_participants" name.
Rename "n_unsubscribed_participants" to "unsubscribed_participants_count",
the former is the wrong template variable name.
2025-06-19 10:30:08 -07:00
Mateusz Mandera
0d17f34ff5 slack_import: Import Slackbot as a bot instead of a user.
Slackbot should be correctly marked as a bot rather than a regular user
- otherwise, it confusingly appears on the Users list and in the realm
creation from Slack import flow, in the dropdown for choosing the
organization owner account.

Closes #34649
2025-06-18 16:55:31 -07:00
Mateusz Mandera
75da563776 slack_import: Fix bug when need_select_realm_owner is not set.
When selecting the realm owner is not needed in the realm creation from
Slack flow, we don't set need_select_realm_owner value on the
preregistration_realm object. Thus, this codepath cannot expect to
always find the key - and instead should use .get(), defaulting to False.
2025-06-18 16:55:31 -07:00
Lauryn Menard
bbd0f6e11c support: Revise view for scrubbed realms.
When a realm is scrubbed, there should be no support actions to
take and all user information has been removed.
2025-06-18 16:51:25 -07:00
Lauryn Menard
79ea4b6eb0 support: Revise management forms for deactivated realms.
The only form we want to show in the "Realm management" section of
the support view for deactivate realms is the one to reactivate it.
2025-06-18 16:51:25 -07:00
Lauryn Menard
f9dd3aada3 support: Show sponsorship forms only for non-deactivated realms.
For deactivated realms, we show their sponsorship state (discount,
required plan tier, etc.) but not the form to update those fields.
2025-06-18 16:51:25 -07:00
Lauryn Menard
405dc6131f support: Show scrub realm button only when realm is deactivated. 2025-06-18 16:51:25 -07:00
Lauryn Menard
696bdf0b17 support: Update view for placeholder realms.
When a realm is a placeholder realm due, i.e., the realm redirects
to another URL due to previously changing the realm's subdomain,
we only show the redirect information.

There is a copy link that for the redirect URL that can be pasted
into the search bar to get to the support view for the actual
realm.
2025-06-18 16:51:25 -07:00
Lauryn Menard
a29dd27c4a support: Add label when a realm is deactivated. 2025-06-18 16:51:25 -07:00
Lauryn Menard
466ef9d682 support: Improve format of confirmation realm section.
For confirmation objects that do not show realm details, but have
a realm object, format the header information to match what we do
show in the realm details page and show the realm's subdomain.
2025-06-18 16:51:25 -07:00
Lauryn Menard
7f0697eccb support: Set realm correctly for realm reactivation confirmations. 2025-06-18 16:51:25 -07:00
Tim Abbott
f0331b8c50 api: Increment API feature level to 393. 2025-06-18 16:48:26 -07:00
Shubham Padia
00fe2236da message_delete: Sort message_ids when sending delete_message event.
Fixes #34324.
https://chat.zulip.org/#narrow/channel/412-api-documentation/topic/Make.20message_ids.20from.20message.20update.20event.20sorted
2025-06-18 16:48:21 -07:00
Shubham Padia
37bfb7c963 message_edit: Sort message_ids when sending update_message event.
https://chat.zulip.org/#narrow/channel/412-api-documentation/topic/Make.20message_ids.20from.20message.20update.20event.20sorted
2025-06-18 16:48:21 -07:00
Alex Vandiver
4f67c1dbf1 wal-g-exporter: Handle empty backup list, for new buckets. 2025-06-18 16:47:22 -07:00
Lauryn Menard
425abd83fc demo-orgs: Make password not required for demo org creation.
Creating a demo organization will not require the user to
set either an email or password, so explicitly set the
password field to not be required for that case.

Updates the form submitted in the dev environment to create
a new demo organization to not send a password value.
2025-06-18 16:47:09 -07:00
Kislay Verma
b4da918c00 compose_paste: Refactor is_safe_url_paste_target.
This commit eliminates a check which is covered just before
the call to this function, and renames it to better explain what
it does.
2025-06-18 14:10:10 -07:00
Kislay Verma
a62ee3f8e0 compose_paste: Don't paste formatted text at md link marker.
This prevents the case when we have text like `[abcd](url)`
in the compose box and the "url" part is selected, and we paste
a link copied from message actions popover.
2025-06-18 14:10:10 -07:00
Lauryn Menard
bfe5962853 help: Revise "Configure where you land in message feeds".
Updates instruction for selecting the desire configuration to
better match other similar mobile help instructions, e.g., "Manage
color theme".
2025-06-18 14:00:47 -07:00
Kislay Verma
1ece5ad15e topic_link_util: Add support for empty topics in the frontend.
Though the frontend module generated correct urls for
empty topics, it would sometime generate incorrect
link text in the fallback md link syntax. (eg, if
empty string was provided as the topic name).

This commit fixes that.
2025-06-18 13:03:56 -07:00
Kislay Verma
2a120d2717 topic_link_util: Support message links in backend.
This commit adds support for message link
(#**stream>topic@message_id**) syntax in the
backend `topic_link_util` module.
2025-06-18 13:03:56 -07:00