Commit Graph

65725 Commits

Author SHA1 Message Date
Tim Abbott
428efeb1a4 topic_list: Only match is: queries in typeahead.
The previous behavior for this component was too annoying if you were
just trying to do a normal filter.

There's definitely more to clean up here; the search_pill.ts usage is
problematic.
2025-07-15 17:09:11 -07:00
Tim Abbott
24113b5dd5 topic_list: Rewrite typeahead using an item type.
This makes it a lot easier to control the matching and display
separately.
2025-07-15 17:09:11 -07:00
Alya Abbott
421f5e9e0c help: Tighten SAML group sync intro wording. 2025-07-15 17:08:50 -07:00
Sahil Batra
70d18d7528 tests: Move test for permission to update topics_policy.
This commit updates tests for permission to update topics_policy
of a channel to test_channel_permissions.py.
2025-07-15 15:54:30 -07:00
Sahil Batra
7e6d487916 tests: Improve tests for checking permissions to update channel privacy.
This commit updates check_channel_privacy_update to use
do_change_stream_permission for setting the stream privacy
to its old state so that we do that in a reliable way and
can avoid bugs in future.
2025-07-15 15:54:30 -07:00
Sahil Batra
2126f365c0 tests: Refactor test for checking permission to update channel.
This commit updates how we check permission for updating
properties of an unsubscribed private channel.

There is no need of checking all can_administer_channel_group
values for unsubscribed private channel, when we check them
for a subscribed private channel. It is sufficient to check
one case where an unsubscribed user can update private channel
if they belong to can_administer_channel_group.

This also helps in avoiding repeated calls to subscribed_to_stream
which made a DB query that could make the test slow.
2025-07-15 15:54:30 -07:00
Sahil Batra
534fdc2ac1 test_channel_permissions: Use one parameter for error cases.
This commit updates check_channel_property_update to just
accept error_msg parameter instead of having both allow_fail
and error_msg, as error_msg is sufficient to determine
whether the request is expected to fail or not.
2025-07-15 15:54:30 -07:00
PieterCK
580845415b slack_data_import: Refactor get_user_mentions.
This commit extracts a portion of logic from `get_user_mentions` into a
new helper function for reusability. This is a prep commit for #30166.
2025-07-15 15:49:05 -07:00
Kislay Verma
a21afe2d60 message_list_hover: Fix glitch when hovering over a message.
If we hover over a message, we see the message move button
(provided the settings allow so). But if the move deadline is
passed while we're hovering, we still see the move button,
when it should be hidden.

This commit fixes this by updating the move button
visibility when the move deadline is passed.

Fixes #15810.
2025-07-15 13:11:24 -07:00
Kislay Verma
14a115224a message_list_hover: Fix glitch when hovering over a message.
If we hover over a message, we see the message edit button
(provided the settings allow so). But if the edit deadline is
passed while we're hovering, we still see the edit button,
when it should be hidden.

This commit fixes this by updating the edit button
visibility when the edit deadline is passed.

Fixes #15810.
2025-07-15 13:11:24 -07:00
Kislay Verma
de4139a219 message_list_popover: Refactor message_hover.
This commit removes the `args` variable which serves no useful purpose.
The JQuery logic is extracted into a separate function which will later be
used inside timeouts. This is done as a prep to #15810.
2025-07-15 13:11:24 -07:00
Mateusz Mandera
90640350ed help: Add instructions for Okta-side configuration for SAML group sync.
Also update plans and features table. Follow-up to #34671.
2025-07-15 12:45:09 -07:00
Tim Abbott
8a3b27061c help: Fix typo in link syntax. 2025-07-15 12:43:10 -07:00
Shubham Padia
1a2adb4e82 help-beta: Update sidebar to the current state.
Partially fixes #35130.
We will still need to do a second check before the cutover, but this
commit does most of the work before the cutover happens.
The comparison was done manually.
Added comment to sidebar index should help update these changes to astro
config, although we will not solely rely on people reading that. A
second check before cutover would be prudent.
2025-07-15 12:23:47 -07:00
Alya Abbott
cfd9979a3c portico: Add quotes to /for/communities. 2025-07-15 11:58:22 -07:00
Sahil Batra
7b66eb838e groups-ui: Update error shown when group cannot be deactivated.
This commit updates error banner shown when group is only used
as subgroups and not as permission.

If group is used as a permission, then we mention that in the
error banner and have a button to go to "Permissions" panel.
We show the same banner even when group is used as a subgroup
as well. But when group is only used as subgroups, we just
show a message containing names of all the supergroups.
2025-07-15 11:57:42 -07:00
opmkumar
b5fc39044e left_sidebar: Fix unread counts showing for muted channels.
Previously, unmuted unread counts for muted channels were still shown
in the left sidebar even when the "Show unread counts for" setting was
set to "No channels".

This commit ensures that unread counts are correctly hidden for muted
channels based on user settings.
2025-07-15 11:38:13 -07:00
Vector73
f9e41915c3 pill_container: Fix background-color in dark theme. 2025-07-15 11:12:50 -07:00
opmkumar
722a2cce9d filter: Update title for spectators when using channels:public filter. 2025-07-15 10:48:39 -07:00
Vector73
4e93607fde tooltip: Show only empty topic allowed tooltip on the topic text.
This commit shows "Only general chat allowed in this channel" tooltip
close to the topic text instead of in the center of topic input by updating
the topic input box "max-width" to "fit-content".
2025-07-15 10:10:02 -07:00
Shubham Padia
8d71793756 help: Add heading between an unordered and ordered list.
Fixes #35121.

The ordered list in question when converted to the new help center
looked weird when it was following just after an unordered list. We
add a heading in between to make it look nice.

We could not find any other instances of similar pattern occurring
directly in the markdown. The pattern in this case was also happening
b/w two different imported markdown files, we have not checked for the
pattern post-import since that would be too complicated for the purposes
of our issue.

Co-authored-by: Alya Abbott <2090066+alya@users.noreply.github.com>
2025-07-15 16:39:40 +00:00
apoorvapendse
b8a1a224d5 copy_messages: Prevent blueslip error while copying overlay message header.
Fixes: https://github.com/zulip/zulip/pull/35097#issuecomment-3058834909
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-07-15 09:22:54 -07:00
Shubham Padia
183b79b1ab help-beta: Highlight heading if it is the target.
Fixes #35119.
In the old help center, our css used to target each heading tag, h1, h2,
etc. individually. We don't need to do that anymore since the first
child of .sl-heading-wrapper is the heading element in starlight.

The rounded border on the top left and top right has been removed since
it did not look good with the default starlight theme.
2025-07-15 09:15:37 -07:00
Pratik Chanda
421b6e9787 hotkey: Add topic filter focus check in is_in_focus.
This commit adds a topic filter focus check inside `is_in_focus`
which prevents shifting focus from topic filter input to topic list
when typing.
2025-07-15 09:13:57 -07:00
Shubham Padia
2cdcadf1c6 help-beta: Remove border after the title. 2025-07-15 09:11:27 -07:00
Shubham Padia
4f23bd2e68 help-beta: Decrease heading sizing by a factor of 1.
Fixes #35123.
2025-07-15 09:11:27 -07:00
Alex Vandiver
6d80d4c77f restart-server: Skip weekly restart-server if a deploy is in process.
This is unlikely, but cron running `restart-server` at the random
wrong time mid-deploy could be bad.
2025-07-15 09:07:36 -07:00
Alex Vandiver
a5a5791794 management: Skip hourly crons during deploys.
This is most important for `send_zulip_update_announcements`, which
can race with the version run as a post-deploy hook.  However, all of
these crons can tolerate being slightly delayed, and there's little
benefit to them taking CPU or possibly hitting odd borderline race
conditions when the deploy is in progress.

For safety, we only trust the deploy lockfile if it was created
within the last hour -- deploys should not take more than an hour, and
failing to ever run hourly crons is much worse than perhaps running
them during a real very-long deploy.
2025-07-15 09:07:36 -07:00
Prakhar Pratyush
7d6b18976a api-docs: Fix link formatting and improve status value presentation.
Corrected a broken Markdown link.

Also updated the description of the `status` field to use backticks
with values.
2025-07-15 07:33:16 -07:00
Anders Kaseorg
b1a7db3662 forms: Use monkey-patched SetPasswordForm generic.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-15 07:32:44 -07:00
Anders Kaseorg
3be686fa86 requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-15 07:32:44 -07:00
Anders Kaseorg
996eb72e2a install-uv: Upgrade uv from 0.7.15 to 0.7.21.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-15 07:32:44 -07:00
Tim Abbott
bd29fb3e26 push_registration: Fix incorrect line-wrapping. 2025-07-14 15:12:30 -07:00
Mateusz Mandera
374c1a93ee realm_audit_logs: Add clarifying comment to REALM_IMPORTED event. 2025-07-14 15:11:43 -07:00
Mateusz Mandera
35ed45ce44 import: Send Welcome Bot messages to users from non-Zulip exports.
Exports from other apps obviously don't come with Welcome Bot messages -
which isn't a great experience as it is, as those are meant to help with
onboarding. We should generate them for all users at import time.

We limit the set of users to active accounts to make the workload more
reasonable in case of large orgs with plenty of deactivated accounts.
The downside is that an imported user joining after being reactivated
will be lacking these messages. We can re-think this approach if needed.

Fixes #34820.
2025-07-14 15:11:43 -07:00
Mateusz Mandera
a43bdcd166 import: Fix is_realm_imported_from_other_zulip_server logic.
This logic was fundamentally broken:
```
    is_realm_imported_from_other_zulip_server = RealmAuditLog.objects.filter(
        realm=realm, event_type=AuditLogEventType.REALM_EXPORTED
    ).exists()
    if not is_realm_imported_from_other_zulip_server:
        send_zulip_update_announcements_to_realm(
            realm, skip_delay=False, realm_imported_from_other_product=True
        )
```

Because the `REALM_EXPORTED` was only created after the export completed
- meaning it couldn't be included in the export data at all. Thus
considering exports to be "not from Zulip" incorrectly.

We get around this issue by explicitly including an import_source in the
realm dict in the export data from 3rd party apps. The importer can then
rely on this value to determine if it's dealing with a Zulip-originated
export or not.
2025-07-14 15:11:43 -07:00
Mateusz Mandera
1c5c2b79ca import: Fix import of RealmAuditLogs with modified_channel_folder.
RealmAuditLog objects with `modified_channel_folder` set would crash the
import because we were missing the `re_map_foreign_keys` call for the
field.
2025-07-14 15:11:43 -07:00
Prakhar Pratyush
5f8edf669d zerver: Add endpoint to register a push device to server.
This commit adds an endpoint to register a push device
to receive E2EE push notifications.
2025-07-14 14:52:39 -07:00
Prakhar Pratyush
c846302417 send_to_push_bouncer: Avoid repeated code lookup in error handling.
This commit extracts `code` lookup into a local variable
to simplify and de-duplicate the conditional logic for
handling different error codes.
2025-07-14 14:52:38 -07:00
Prakhar Pratyush
afe6986991 register-queue: Add push_devices in response.
This commit adds a `push_devices` dictionary to
`POST /register` response, keyed with push account ID,
where each entry describes the user's push device's
registration status and error code (if registration failed).
2025-07-14 14:52:38 -07:00
Prakhar Pratyush
6a4b06b6f4 zerver: Add PushDevice model.
This commit adds a `PushDevice` model where each row
corresponds to an account on an install of the app
that has attempted to register with the bouncer to
receive mobile push notifications.

This is the core server table storing registrations
that are potentially registered with the mobile push
notifications bouncer service.
2025-07-14 14:52:38 -07:00
Prakhar Pratyush
3c6a3b0d77 zilencer: Add endpoint to register push device to bouncer.
This commit adds a zilencer endpoint to let self-hosted
servers register push devices to whom mobile push notifications
will be sent.

POST "/api/v1/remotes/push/e2ee/register"
Payload: realm_uuid, push_account_id, encrypted_push_registration,
bouncer_public_key

The post request needs to be authenticated with the server’s API key.

Note: For Zulip Cloud, a background fact about the push bouncer is
that it runs on the same server and database as the main application;
it’s not a separate service.
So, as an optimization, we plan to directly call the
`do_register_remote_push_device` function and skip the HTTP request.
2025-07-14 14:52:38 -07:00
Prakhar Pratyush
5facec1cc3 zilencer: Remove 'user_uuid' parameter of 'get_remote_realm_helper'.
The 'user_uuid' parameter of 'get_remote_realm_helper' was only
used for logging when realm lookup fails, but we've never made
use of that detail in practice.

There is no strong reason to keep that.
2025-07-14 14:52:38 -07:00
Prakhar Pratyush
e10d413476 RemotePushDevice: Migrate token_kind from IntegerChoices to TextChoices.
Improves code readability by using string values ("apns", "fcm")
instead of integers (1, 2).
2025-07-14 14:52:38 -07:00
Sayam Samal
7a26c41c42 inputs: Remove JS logic to determine empty/non-empty input fields.
This commit removes the JavaScript logic that was used to determine
whether an input field was empty or non-empty. The CSS pseudo-classes
and selectors seem robust enough to handle the styling based on the
input state without needing additional JS logic at the moment, and
removing this JS logic simplifies the codebase and prevents potential
conflicts with the CSS styles.
2025-07-14 13:58:02 -07:00
Sayam Samal
4341453568 left_sidebar: Improve logic to detect empty filter input with pills.
This commit refines the logic for determining when the filter input with
pills is empty. The JS logic is removed from web/src/topic_list.ts,
as this new logic is now handled in the CSS, common across all filter
inputs with pills — resulting in a consistent and predictable behavior
for empty states on all the new filter inputs.
2025-07-14 13:58:02 -07:00
Sayam Samal
ac27299cc9 left_sidebar: Fix filter input alignment with common left sidebar grid.
This commit adjusts the left and right padding of the input element in
the filter topics input to account for the left and right borders.
This ensures that the text inside the input is aligned with the text in
other elements of the left sidebar grid.
2025-07-14 13:58:02 -07:00
Sayam Samal
c90190bcdb left_sidebar: Make icon column width scale with font size. 2025-07-14 13:58:02 -07:00
Sayam Samal
8b236e6f29 left_sidebar: Stretch filter inputs to fill available space on right. 2025-07-14 13:58:02 -07:00
Sayam Samal
5e92a57adb inputs: Fix input color values deviating from the design.
This follow-up commit fixes the incorrect input color values that were
introduced in the initial commit. This change is most visible in the
'hover' state where the values were incorrectly set to the same values
as that of the normal state, leading to a lack of visual distinction.
2025-07-14 13:58:02 -07:00