Commit Graph

67099 Commits

Author SHA1 Message Date
Pratik Chanda
152ad3bf3d hash: Use encoding for slugs in dm narrow hashes.
Slugs in dm urls aren't really passed through url decoding and
shouldn't throw any error currently if hashReplacement aren't enforced.
But we still encode them in this commit to make this consistent.
2025-11-02 14:37:30 -08:00
Aman Agrawal
f86654ba5f slack_import: Ask importer for default email address visibility.
Fixes #34982
2025-11-02 14:36:20 -08:00
Aman Agrawal
4bd9bb1995 create_realm: Extract logic to set default email visibility.
Extract default email address visibility.
This can be used for function argument defaults without
calling the function.
2025-11-02 14:36:20 -08:00
Yogesh
15f8a63b06
settings: Remove hover effect from error message text.
The error message text had an unfortunate hover effect, resulting
from the error container element being inside the main widget element. 

Move the error message element to sit outside the main element; this also 
fixes overflow issues with the error element.

Fixes #17571.
2025-11-02 11:47:30 -08:00
Sahil Batra
ca46e09f41 groups-ui: Live update permissions panel on losing stream access.
This commit adds code to live update the group permissions panel
when user loses access to a stream by removing the stream and its
settings from the UI.
2025-11-02 11:42:36 -08:00
Sahil Batra
2b8fb4e161 user_group_edit: Extract function to hide empty permissions section.
This commit extracts code to hide "Organization permissions",
"Channel permissions" and "User group permissions" headings
in group permissions panel if there are no settings under
these sections and show the empty panel text if group does
not have any assigned permissions.

This new function will help in avoiding duplicate code in next
commit which will add code to live update the permissions
panel when user loses access to a stream.
2025-11-02 11:42:36 -08:00
Sahil Batra
c471c9a0c4 user_group_edit: Pass only group ID to get_edit_container.
get_edit_container only required ID of the user group and
not the whole group object.
2025-11-02 11:42:36 -08:00
Sahil Batra
60be02d453 resize: Fix resizing height of stream settings headers.
When resizing subheader heights to be equal on the left and
right sides, the subheader being resized was set to 1px taller
because height_of included borders in its calculation.

This commit fixes that such that subheaders on both sides are
of same height.
2025-11-02 11:39:57 -08:00
Sahil Batra
c58414b0ca settings: Restructure HTML for stream and groups overlay.
This commit restructures the HTML for stream and group
settings overlay such that we first write all the HTML
for left side and then right side.

This change is important so that focus behavior during
keyboard navigation is correct in narrow screens and
does not move to the elements which are hidden after
we fix it in #26941.

This changes the focus behavior on keyboard navigation
in wide screens where first all of the left panel will
be covered from top to bottom and then the right panel,
but it is fine.
2025-11-02 11:39:57 -08:00
santhoshkumarCodes
ecdfb14cb7 message-view: Fix banner/bookend for private channel no content access.
Previously, when a user navigated to a private channel that they had
metadata access to but not content access, they would see a confusing
"You are not subscribed" bookend and a generic empty-feed banner. This
was misleading, as the issue is about permissions, not subscription
status.

The empty message feed placeholder displays a more accurate message
for this case. And the logic in `message_list.ts` is changed to
prevent the trailing bookend from rendering at all in this case.

Fixes #36075

Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2025-11-02 11:35:53 -08:00
The Dance
a028a6b9fd custom_emails: Prevent duplicate emails from send_custom_email command.
This adds infrastructure to prevent duplicate custom emails from being
sent to users when the management command is run multiple times
with identical email template content.
The implementation uses RealmAuditLog tracking with a new
CUSTOM_EMAIL_SENT event type (810) that stores a hash of the email
template content.

Fixes: #19529.
2025-11-02 11:17:09 -08:00
Vector73
ba637d4e2c css: Fix inconsistent width of select fields in preferences settings. 2025-11-01 10:51:01 -07:00
Vector73
5704abf8b4 settings: Convert language picker to dropdown widget.
Fixes #35861.
2025-11-01 10:51:01 -07:00
Anders Kaseorg
be18d71624 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-11-01 07:24:57 -07:00
Anders Kaseorg
55293f57a8 eslint: Fix unicorn/no-immediate-mutation.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-11-01 07:24:57 -07:00
Anders Kaseorg
71ebbb30f1 eslint: Fix unicorn/no-useless-collection-argument.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-11-01 07:24:57 -07:00
Anders Kaseorg
cd1ced82d6 eslint: Fix @typescript-eslint/prefer-optional-chain.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-11-01 07:24:57 -07:00
Anders Kaseorg
8396c14cdc e2e-tests: Fix pageerror parameter type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-11-01 07:24:57 -07:00
Anders Kaseorg
35d20b04d1 install-node: Upgrade Node.js from 22.20.0 to 24.11.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-11-01 07:24:57 -07:00
Prakhar Pratyush
7260ba689f push_notifications: Clear push notifications on message deletion.
This commit adds support to revoke mobile push notifications
for messages when deleted.

Fixes #26584.

Signed-off-by: Prakhar Pratyush <prakhar@zulip.com>
2025-10-31 16:05:21 -07:00
Aman Agrawal
8b11e88a91 stripe: Upgrade to latest version.
This includes some changes to specify the correct type for
params.
2025-10-31 16:01:10 -07:00
Evy Kassirer
1e78447c50 message_store: Edit message content in a helper function.
In a future commit, this will be where we ensure the saved
topic links are up to date.
2025-10-30 17:46:10 -07:00
Evy Kassirer
04244f7099 message_edit: Fix stale comment about update message function. 2025-10-30 15:57:33 -07:00
Karl Stolley
9fe24279d7 inputs: Remove selectors for unused input types.
Some checks failed
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
Code scanning / CodeQL (push) Has been cancelled
Zulip production suite / Ubuntu 22.04 production build (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:bookworm, true, false, Debian 12 (Python 3.11, backend + documentation), bookworm) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:jammy, false, true, Ubuntu 22.04 (Python 3.10, backend + frontend), jammy) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:noble, false, false, Ubuntu 24.04 (Python 3.12, backend), noble) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:trixie, false, false, Debian 13 (Python 3.13, backend), trixie) (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm, --test-custom-db, Debian 12 production install with custom db name and user, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy, , Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga, jammy) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble, , Ubuntu 24.04 production install, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:trixie, , Debian 13 production install, trixie) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm-7.0, 7.0 Version Upgrade, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm-8.0, 8.0 Version Upgrade, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy-6.0, 6.0 Version Upgrade, jammy) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble-10.0, 10.0 Version Upgrade, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble-9.0, 9.0 Version Upgrade, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:trixie-11.0, 11.0 Version Upgrade, trixie) (push) Has been cancelled
2025-10-28 15:01:44 -07:00
Karl Stolley
a2c22795c8 inputs: Remove type=number from styles.
There are no Zulip inputs that take this type; the only
instances of type="number" are in the portico, which does
not load zulip.css.
2025-10-28 15:01:44 -07:00
Evy Kassirer
a8493e71aa channel_folders: Fix unread counts for show_channel_folders option.
Previously the counts were being generated assuming `show_channel_folders`
was true. But when we're not showing folders, the unread counts for
folders need to be distributed to the "normal" section.
2025-10-28 13:50:41 -07:00
Evy Kassirer
dbcef2efd3 stream_list: Fix two bugs related to is_filtering_inactives.
(1) Remove the "inactive-or-muted-in-channel-folder" classname
    when channels stop being considered inactive on rerender.
(2) The toggle button shouldn't mention inactive channels if
    we're not hiding them.

Discussed here:
https://chat.zulip.org/#narrow/channel/101-design/topic/hide.20inactive.20channel.20setting/near/2272941
2025-10-28 13:32:01 -07:00
Prakhar Pratyush
1468c8c160 push_notification: Prepare payload only if registered device exists.
Earlier, we were constructing the APNs & FCM payloads for legacy &
E2EE push notifications even if the user didn't have such a registered
device to send notifications to.

This commit makes changes to construct:
* apns_payload only if the user has an apple device registered
* fcm_payload only if the user has an android device registered
* payload_to_encrypt only if the user has push device registered
  which supports E2EE.

Also, now we perform one db query instead of two to calculate
`apple_devices` and `android_devices` for the legacy case.

Overall, this helps to avoid unnecessary compute.

Signed-off-by: Prakhar Pratyush <prakhar@zulip.com>
2025-10-28 13:29:02 -07:00
Prakhar Pratyush
140e575ddc push_notification: Use durable=True for the outermost transaction.
This commit updates the `transaction.atomic` context manager
used to take a lock on Message row in `handle_push_notification`
to use `durable=True` instead of `savepoint=False`. It helps to
avoid introducing an outer transaction by mistake - resulting in
locking row for a longer duration.

Signed-off-by: Prakhar Pratyush <prakhar@zulip.com>
2025-10-28 13:29:02 -07:00
Alya Abbott
d6ce1c92b7 portico: Add quote. 2025-10-28 12:31:46 -07:00
Alya Abbott
459cd87bd4 contributor docs: Rename section and update references.
Remove unnecessary reference from questions doc.
2025-10-28 10:28:02 -07:00
Alex Vandiver
c6a60fd533 exceptions: Add link to rate-limiting docs in 429 response. 2025-10-27 16:22:13 -07:00
Alex Vandiver
5c2b0d91d5 rate_limit: Additionally limit to 2000 authenticated requests per hour. 2025-10-27 16:22:13 -07:00
apoorvapendse
421ba8afcf paste: Prevent insertion of extraneous newlines in Firefox.
Firefox preserves the newlines when copying a visually
line-wrapped paragraph that originally contains zero
"intentional" newlines.

This fix removes those newlines from the text content before
pasting into the compose box.

This probably won't cause removall of intentional newlines,
as they are represented with <br/> tags in the `paste_html`.

Original report: https://rust-lang.zulipchat.com/#narrow/channel/122653-zulip/topic/Copy-paste.20includes.20hard.20newlines.20when.20message.20didn't/with/544174740

Discussion: https://chat.zulip.org/#narrow/channel/9-issues/topic/extraneous.20newlines.20when.20pasting.20in.20Firefox/with/2275319

Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>

Co-authored-by: Alex Vandiver <alexmv@zulip.com>
2025-10-27 16:19:22 -07:00
Alex Vandiver
3ca5a49557 i18n: Properly handle when a locale is removed from Weblate. 2025-10-27 09:05:06 -07:00
Sahil Batra
c31a23d589 user-profile: Fix textarea being too small in "Manage user" modal.
Some checks failed
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
Code scanning / CodeQL (push) Has been cancelled
Zulip production suite / Ubuntu 22.04 production build (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:bookworm, true, false, Debian 12 (Python 3.11, backend + documentation), bookworm) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:jammy, false, true, Ubuntu 22.04 (Python 3.10, backend + frontend), jammy) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:noble, false, false, Ubuntu 24.04 (Python 3.12, backend), noble) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:trixie, false, false, Debian 13 (Python 3.13, backend), trixie) (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm, --test-custom-db, Debian 12 production install with custom db name and user, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy, , Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga, jammy) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble, , Ubuntu 24.04 production install, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:trixie, , Debian 13 production install, trixie) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm-7.0, 7.0 Version Upgrade, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm-8.0, 8.0 Version Upgrade, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy-6.0, 6.0 Version Upgrade, jammy) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble-10.0, 10.0 Version Upgrade, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble-9.0, 9.0 Version Upgrade, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:trixie-11.0, 11.0 Version Upgrade, trixie) (push) Has been cancelled
This commit fixes textarea width being too small for "Long text"
custom profile fields in "Manage user" modal. This commit removes
the CSS which set the incorrect width and also restricts the
maximum width such that it does not overflows on narrow screens.
2025-10-24 07:15:26 -07:00
Sahil Batra
2ea21b00f7 modals: Restrict dropdown widget button widths to visible space.
This commit adds CSS to make sure dropdowns widgets remain inside
the visible area of the modals and are not cut off in narrow width
screens.
2025-10-24 07:15:26 -07:00
Sahil Batra
ad19c16dca modals: Restrict dropdown and input widths in narrow screens.
This commit adds CSS to make sure dropdowns and inputs, including
date type and pill inputs, remain inside the visible area of the
modals and are not cut off in narrow width screens.

Apart from setting max-width, this commit also changes the grid
CSS for datepicker input so the layout is arranged in such a way
that the "x" button is inside the input element and we can set
the max-width in a simpler way.
2025-10-24 07:15:26 -07:00
Sahil Batra
cce328a38f custom-profile-fields: Fix class name in datepicker input.
We previously added "settings_text_input" class to the datepickr
input in "Manage user" form as well, while other inputs have
"modal_text_input" class. This commit fixes that.
2025-10-24 07:15:26 -07:00
Anders Kaseorg
1714bfa173 requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-10-23 15:52:47 -07:00
Anders Kaseorg
69f2e95e49 install-uv: Upgrade uv from 0.8.22 to 0.9.5.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-10-23 15:52:47 -07:00
Anders Kaseorg
7e29b35fa0 saml: Update RelayState format.
The format was changed in social-core 4.5.0-5-gb6317968 and the old
format is removed in 4.7.0-49-g5d98d92a.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-10-23 15:52:47 -07:00
Alex Vandiver
c17564ac27 puppet: Include Zulip version and external host in camo User-Agent. 2025-10-23 15:40:21 -07:00
Alex Vandiver
5319b767a1 puppet: Add a get_django_setting_slow function.
The `_slow` is a hint that this function is not for general use.
2025-10-23 15:40:21 -07:00
Alex Vandiver
3f2aca5481 puppet: Add a zulip_version fact.
We use the version without the exact commit-id because Puppet likely
does not want to have a file that updates on literally every deploy.
2025-10-23 15:40:21 -07:00
Alex Vandiver
efa28c3a65 version: Add a version which does not change on every commit. 2025-10-23 15:40:21 -07:00
Tim Abbott
7406edd99c tools: Fix a linter issue caught by semgrep.
The issue was a new rule that didn't exist when the PR was written.
2025-10-23 14:33:58 -07:00
Vector73
2dca184fd3 github_action: Fix "notify-if-api-docs-changed" tool.
Fix `notify-if-api-docs-changed` tool to send the notification only
when "changelog.md" is changed in the PR.
2025-10-23 14:23:25 -07:00
Alex Vandiver
740be1d55c sync-translations: Wait until MERGED, not until not-OPEN.
The `gh pr list --search` results may have an _empty_ state for the
first several seconds, leading to this immediately aborting, deleting
the branch and closing the PR.
2025-10-23 14:17:01 -07:00
Alya Abbott
09bedafe25 contributor docs: Add intro section on how to be successful. 2025-10-23 14:16:28 -07:00