Commit Graph

57324 Commits

Author SHA1 Message Date
Alex Vandiver a7ec7e924e import: Skip "active" check, and analytics, for crossrealm bots.
The bots do not exist in the user table to look up their active
status, and attempting to import them into the analytics table will
result in duplicate rows.
2024-03-25 10:21:48 -07:00
Tim Abbott 51773d55ed ci: Disable 8.0 upgrade suite to unbreak CI.
As noted in the comment, hopefully we get to revert this tomorrow, but
it still seems worth doing so that PRs can pass CI again.
2024-03-24 21:19:16 -07:00
Tim Abbott 2980d14cb4 scripts: Use Apache Arrow from Groonga repository.
This lets us avoid CI failures related to that repository's signing
key having expired. See https://github.com/apache/arrow/issues/40744.
2024-03-24 20:46:24 -07:00
Prakhar Pratyush e5d50d9787 message_list_tooltips: Fix code style issue.
frontend-lint was failing due to code style issue
in 'message_list_tooltips'.

This was introduced in fd3c7728fc.
2024-03-22 22:35:15 -07:00
Alya Abbott 2514093688 docs and help: Update text of no-content mobile notifications.
Documentation follow-up to d9c5eb1280.
2024-03-22 18:16:24 -07:00
Robert Dyer eb2f1b4788 docs: Upgrade development environment page to use synced tabs.
This greatly reduces how much content for other platforms a reader has
to scroll past in order to get the development environment set up.
2024-03-22 16:54:57 -07:00
Robert Dyer 40bab84e8f docs: Fix some outdated links from development environment guide. 2024-03-22 16:54:57 -07:00
Robert Dyer 5768d27116 docs: Update VNU filter to ignore warnings about sphinx-design. 2024-03-22 16:54:57 -07:00
Temidayo32 533a6153b2 compose_validate: Convert module to TypeScript. 2024-03-22 15:59:37 -07:00
Varun Singh fd3c7728fc message_list_tooltips: Convert module to TypeScript. 2024-03-22 15:37:57 -07:00
Varun Singh b0377d5d6d message_list_tooltips: Create '$template' conditionally.
We only expect 'data-tooltip-template-id' to be present if 'tippy_content'
is not valid.Hence, only when 'tippy_content' is undefined, should we create
'$template'.
2024-03-22 15:37:57 -07:00
Varun Singh 92ba149f5f message_list_tooltips: Consistently pass 'target' as 'string' argument. 2024-03-22 15:37:31 -07:00
Varun Singh 92c8b89ce2 message_list_tooltips: Return 'undefined' to satisfy tippy upstream. 2024-03-22 15:35:49 -07:00
N-Shar-ma b6a04aaa83 typeahead: Add option for word order not mattering for query matching.
Uptil now, the `query_matches_string_in_order` function would respect
the order of words in the query string when matching a source string.
This meant that for query "two one", the source string "one two three"
would not be matched.

For more flexibility, a new function, `query_matches_string_in_any_order`,
has been added., which returns true if each word in the query string matches
the prefix of a distinct word in the source string, else it returns false.

The algorithm for computing this is quadratic in terms of the source word
count so can be a little expensive, but it is only currently used for
searching topics in Recent Conversations, where the strings' length is
limited by the max stream / topic name length allowed, so this should be
performant enough for this use case.
2024-03-22 15:20:40 -07:00
N-Shar-ma c503a846ba refactor: Rename `query_matches_string` to `query_matches_string_in_order`.
The function is renamed for clarity.

Prep commit for next commit which adds a similar function where order
does not matter.
2024-03-22 15:20:40 -07:00
N-Shar-ma 5d83e53ca5 typeahead: Treat query and source string in the same way before matching.
Like the source string, now the query too is converted into lower case
and has diacritics removed, before trying to determine a match.
2024-03-22 15:20:40 -07:00
Anders Kaseorg 0cc40605b0 semgrep: Broaden select_related() and prefetch_related() rules.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-22 18:01:57 -04:00
Aditya Bajaj a20b454ebb
notifications: Shorten string for redacted content.
Replace the long string for organisations that have notification
body/content disabled (settings.PUSH_NOTIFICATION_REDACT_CONTENT
set to true) with "New message".

This allows more of the limited space on the mobile device screen to
be used for additional messages rather than this verbose content.

Fixes #29152
2024-03-22 09:37:51 -07:00
Alex Vandiver 92fa9ee78c util: Use the same regex as the backend for wildcard mentions. 2024-03-22 09:36:12 -07:00
Mateusz Mandera 89a22fb076 register_server: Check write access to secrets file when rotate_key.
Using --rotate-key without write access to the secrets file is currently
quite painful, since you end up rotating your registration's secret with
no local record of it; so effectively you lose your registration and
need help from support. We should just prevent this failure mode.
2024-03-22 09:33:00 -07:00
Alex Vandiver 7d0c12aa3a semgrep: Enforce no bare select_related() calls.
Previously, #26419 addressed the majority of these calls, but did not
prevent more from creeping in.  Remove the one remaining
callsite (after the cleanup from the previous commits), and ban any
future use of the pattern.
2024-03-22 09:30:17 -07:00
Alex Vandiver fd5a091b30 messages: Only check the UserMessage row if necessary.
For the common case of not needing to reference the UserMessage row
later, and for being a stream without private history, the UserMessage
row is irrelevant.  Convert `has_user_message` to a thunk, and defer
loading it unless necessary.
2024-03-22 09:30:17 -07:00
Alex Vandiver f92d43c690 messages: Use overloads to only return a user_message if needed. 2024-03-22 09:30:17 -07:00
Alex Vandiver 6ace34c374 messages: Stop joining through every table.
Calling `.select_related()` with no arguments joins through every
possible table, recursively.  In this case, this currently produces a
query which joins through forty-three tables.

This is rather inefficient, particularly for what is a very common
call which should be very fast.

No callsite depends on having prefetched any joined table on the
object; drop all of the joins.
2024-03-22 09:30:17 -07:00
John Lu a5cf0ec526
refactor: Replace HUDDLE with DIRECT_MESSAGE_GROUP.
Replaced HUDDLE attribute with DIRECT_MESSAGE_GROUP using VS Code search,
part of a general renaming of the object class.

Fixes part of #28640.

Co-authored-by: JohnLu2004 <JohnLu10212004@gmail.com>
2024-03-21 16:39:33 -07:00
Anders Kaseorg 224b484195 test_classes: Skip OpenAPI validation on exceptions.
This gives more helpful error tracebacks from failing tests.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-21 16:36:48 -07:00
Varun Singh 1aaedf89ee poll_modal: Convert module to TypeScript. 2024-03-21 16:33:24 -07:00
Alex Vandiver e06b1794a8 kandra: Template and insert email credentials. 2024-03-21 16:14:44 -07:00
Alex Vandiver 75411b264e kandra: Remove unnecessary libapache2-mod-wsgi.
It does not exist in 22.04, and its last use was removed in
61666a9262.
2024-03-21 14:23:30 -07:00
Alex Vandiver 9d8d2d138b missedmessage_emails: Add Sentry spans to worker thread. 2024-03-21 12:46:13 -07:00
Alex Vandiver 9451d08bb9 worker: Split out worker sampling rate, and add Sentry transactions. 2024-03-21 12:46:13 -07:00
Alex Vandiver f64b9475c1 sentry: Optionally enable tracing, with transactions and spans. 2024-03-21 12:46:13 -07:00
Alex Vandiver 3cbce0c5c7 missedmessage_emails: Clear caches and db query tracking per-loop.
Otherwise, these accumulate and leak memory.
2024-03-21 12:46:13 -07:00
Alex Vandiver 23504308fb puppet: Install the same version of postgres-client as the server.
We require a `pg_dump` whose version matches the version of the server
we are configured against (see 3a8b4b0205).  Installing the latest
`postgresql-client` does not guarantee that we have such a binary
present.
2024-03-21 12:34:34 -07:00
Alex Vandiver 6ad777c86f dev_urls: Make requests to /docs redirect to the index.
This makes it easier to browse to the docs in development mode, and
more closely matches ReadTheDocs production.
2024-03-21 11:27:14 -07:00
Vector73 f758ca596b custom_profile_fields: Add "required" parameter to the profile fields.
Fixes #28512.
2024-03-21 10:48:54 -07:00
Tim Abbott ac0673e0b5 settings: Rename overly generic field and field_hint classes. 2024-03-21 10:48:54 -07:00
Tim Abbott 9786a16680 bot_avatar_row: Rename extremely generic CSS classes.
I fixed one apparent typo, `$row.find("api_key_error").hide();`, while
doing this.
2024-03-21 10:48:54 -07:00
Tim Abbott e436aea917 change_password: Avoid super generic CSS classes. 2024-03-21 10:48:54 -07:00
afeefuddin 6f81fe1b5b info_overlay: Convert module to TypeScript. 2024-03-21 09:00:33 -07:00
Anders Kaseorg e3340774ce requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-21 08:59:17 -07:00
Anders Kaseorg 71e1b3c91b sentry: Fix type error in add_context.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-21 08:59:17 -07:00
Anders Kaseorg eb622bae0a ruff: Fix S605 Starting a process with a shell.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-21 08:59:17 -07:00
Anders Kaseorg a1a341f0ae ruff: Fix UP032 Use f-string instead of `format` call.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-21 08:59:17 -07:00
evykassirer f1b8e11e8b narrow: Remove stale comment about deactivate(). 2024-03-20 19:11:25 -07:00
evykassirer ba215e3e80 buddy_list: Ensure users are visible when hide_headers is true. 2024-03-20 18:47:24 -07:00
evykassirer 1defce3172 composebox_typeahead: Don't use typeahead to store `completions`.
It wasn't being used in the typeahead, just hackily being
referenced within composebox_typahead.
2024-03-20 13:08:26 -07:00
evykassirer d5d505a561 typeahead: Remove unneeded eventSupported.
It will always be true.
2024-03-20 13:08:26 -07:00
evykassirer 596233e14d typeahead: Default options to undefined instead of null. 2024-03-20 13:08:26 -07:00
Lauryn Menard 373671080d remote-support: Include billing entity name in internal billing notice.
Adds a line to the top of the internal_billing_notice email with
the billing entity's display name.

Makes sure all internal_billng_notice email subjects also include
the billing entity's display name.

Makes small updates to the notice text for some cases.
2024-03-20 11:58:15 -07:00