Commit Graph

64064 Commits

Author SHA1 Message Date
Alex Vandiver
840fa74854 kandra: Add a grok exporter to parse nginx logfiles.
This provides access logging metrics to Prometheus.  For cardinality
reasons, we cannot (nor would we want to) put every request path into
its own label value -- but we do separate out the most-frequent access
paths (as well as some low-frequency but high-interest ones) into
their own label values.

In order to differentiate accesses to https://zulip.com/ from
https://example.zulipchat.com/ (both of which appear at path `/`), we
use a `grok_exporter.realm_names_regex` value in `zulip.conf`, which
is expected to be set to match the hostname of all possible realms.
2025-03-27 21:56:54 -07:00
Alex Vandiver
ba9569a6fe sha256-tarball-to: Support zipfiles. 2025-03-27 21:56:54 -07:00
Alex Vandiver
bd54f0363e kandra: Update prometheus configuration.
This pulls in the more complete production Prometheus configuration.
2025-03-27 21:56:54 -07:00
Evy Kassirer
70e542c9cc buddy_list: Make sure we always open Others section during search. 2025-03-27 16:03:11 -07:00
Lauryn Menard
d7873fbc11 compose-actions: Set topic earlier if specified in start opts.
When on_compose_select_recipient_update is called when we start
the compose box actions, then it subsequently calls
compose_recipient.update_on_recipient_change.

If there is a specified topic in the opts for the compose box,
then that should be set for various functions that are called
in update_on_recipient_change.

compose_recipient.update_topic_displayed_text is called later for
all cases, direct messages and empty topics, which will update the
compose_state.topic again.
2025-03-27 12:52:07 -07:00
Lauryn Menard
24a65c1783 narrow-state: Filter out "with" operator in narrowed_by_topic_reply.
As the web app is now using the "with" operator for links to channel
topic conversations, we need to filter out that operator when
checking the current narrow state.
2025-03-27 12:52:07 -07:00
Lauryn Menard
ae66bf287b typing-events: Use valid channel ID to get conversation typists. 2025-03-27 12:52:07 -07:00
Lauryn Menard
ec89e5afd2 billing: Improve error handling when invoicing plans as needed.
When we're unable to process an invoice for a customer due to a billing
or assertion error, we log the error and add the customer ID to a set
of failed customer IDs. This allows us to continuing invoicing other
customers, and at the same time not invoice any other pending plans
attached to a customer we failed to invoice.
2025-03-27 12:51:52 -07:00
Lauryn Menard
10fff6a691 billing: Extract helper for invoicing check of remote server audit log.
Extracts the logic for making sure that, for self-hosted plans, the
remote server audit log data is current before invoicing an active
plan.
2025-03-27 12:51:52 -07:00
Lauryn Menard
0f567a1a66 billing: Extract helper for sending invoice overdue email.
Extracts the logic for sending an email to billing support when
a remote server's audit log data is stale and there is an active
CustomerPlan that needs to be invoiced.
2025-03-27 12:51:52 -07:00
Lauryn Menard
10a02142dc billing: Extract helper for sending fixed price plan renewal email.
Extracts the logic for sending a reminder email about the end of a
fixed price plan to billing support into a separate function.
2025-03-27 12:51:52 -07:00
Evy Kassirer
8adb46867b stream_settings: Move muted channels help text to below header. 2025-03-27 11:55:04 -07:00
Prakhar Pratyush
d011fb0621 typing: Rename "(no topic)" to empty string topic.
This commit renames "(no topic)" to "" when used as
topic name in `POST /typing`.

Message sent in "(no topic)" is translated as being
sent in "" by the server, so it makes sense to show
the typing notification in "" when message is being composed.
2025-03-27 09:29:49 -07:00
Prakhar Pratyush
b53327dabe inline_topic_edit: Fix inline topic edit input field width for topic="".
Earlier, for topic="" and mandatory_topics=False, the inline topic
edit input field width was not set correctly when the inline topic
edit was started for the first time.

This resulted in overflowing placeholder.

This commit fixes that bug.
2025-03-27 09:28:41 -07:00
whilstsomebody
eef44429e2 widgets: Remove white background from "Add task"/"Add option" button.
In dark theme, when clicking the "Add task" button of
todo and "Add option" button of poll, the background
color incorrectly turns white.

This commit removes the white background color of the
buttons and makes it consistent woth the other green
buttons.
2025-03-27 09:28:07 -07:00
Saubhagya Patel
939691dfed message_move: Show "general chat" in link of confirmation toast.
When a message is moved using the "Move only this message" option
a confirmation toast is shown. This commit adds support to show
"general chat" in link of the toast when a message is moved to it.
2025-03-27 09:27:49 -07:00
Anders Kaseorg
13bd8771f9 corporate: Parse Accept header instead of X-Requested-With.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-03-26 22:29:09 -07:00
Anders Kaseorg
721f804736 middleware: Parse Accept header properly.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-03-26 22:29:09 -07:00
Prakhar Pratyush
8383b11526 recipient_row: Fix empty string topic display in keyword search view.
Searching for a word that appears in a message in a empty string
topic via the search box resulted in a message view where the
topic names in the recipient_row were empty string instead of
`realm_empty_topic_display_name`.

This commit fixes that bug.
2025-03-26 17:39:38 -07:00
Amaan-pathan
b0844109ca settings: Show UTC offsets in timezone dropdown.
This improves usability by helping users quickly recognize timezones
with their offsets.

Fixes #20988.
2025-03-26 16:52:32 -07:00
Shubham Padia
fd65bf3d42 user_group_edit: Update permissions panel on subgroup edit.
Fixes part of #33730.
2025-03-26 15:54:32 -07:00
Anders Kaseorg
7702f53d90 clean-venv-cache: Remove.
The current stable branch is on uv, so we no longer need to preserve
the old-style zulip-venv-cache directories from the last 14 days.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-03-26 15:51:48 -07:00
Lauryn Menard
e101f03b11 scheduled-message-tests: Use f-strings for setting message content. 2025-03-26 15:51:00 -07:00
Lauryn Menard
139fe3768b compose-closed-ui: Add assert for inbox or recent view.
Asserts that either the inbox or recent conversation view is
visible when a ReplyRecipientInformation object is passed as
a parameter to get_recipient_label.

Updates the related test to more clearly check the expected
reply button text for the inbox/recent conversations case.
2025-03-26 15:50:27 -07:00
Shubham Padia
559629345e test_subs: Test rendered content instead of just the content.
Without this test, a bug with the rendering logic that was fixed
by #34056 went unnoticed.
Fixes part of #34069.
2025-03-26 11:33:04 -07:00
neiljp (Neil Pilgrim)
719629e5e4 docs: [fixup?] Notes on projects. 2025-03-26 11:32:13 -07:00
neiljp (Neil Pilgrim)
3fd3392a8d docs: Clarify types of gsoc terminal projects. 2025-03-26 11:32:13 -07:00
neiljp (Neil Pilgrim)
ff0defd959 docs: Clarify skills required for gsoc terminal applicants. 2025-03-26 11:32:13 -07:00
neiljp (Neil Pilgrim)
b31e1d9a2e docs: Improve gsoc terminal project titling and layout.
- Improve 'Code:' description, including primary coding language
  (add comma to desktop description for similar consistency)
- Add bold section in bulleted text (describing ZT as a TUI, cf CLI/GUI),
  consistent with style in rest of document
- Split project details onto other lines to simplify later editing
2025-03-26 11:32:13 -07:00
Niloth P
610f8b42c3 docs: Reference the new templates directory for PythonAPIIntegrations.
Mention the new templates directory `static/generated/integrations`, and
the script that generates them, in the doc on documenting integrations.
2025-03-26 11:19:31 -07:00
Niloth P
b2910aa05c integration-docs: Migrate PythonAPIIntegration docs.
To zulip/python-zulip-api, to keep them closer to their source code.

- Renamed the generate_zulip_bots_static_files to
generate_bots_integrations_static_files to accomodate the new function.
- Added a new function to
tools/setup/generate_bots_integrations_static_files to copy the
integration docs into static/generated/integrations.
- Updated integrations.py and computed_settings.py to use the new doc
paths.
- Deleted the affected integration docs.
- Updated the dependency URL.
2025-03-26 11:19:31 -07:00
Niloth P
e76ace28d2 integration-docs: Rename Jira doc to avoid collision with Jira plugin.
The Jira plugin integration doc will be moved in the next commit, to
"static/generated/integrations/jira/doc.md", as the directory name of
the integration is "jira" in zulip/python-zulip-api.

- Jira integration doc (previously) - "zerver/webhooks/jira/doc.md"
- Jira plugin integration doc (next commit) -
"static/generated/integrations/jira/doc.md"

Both of these will use the same path "jira/doc.md" as their
integration.doc value, and the actual file is loaded based on the order
of template directories listed in computed_settings.py.

Hence, use a custom path for the Jira integration doc to avoid this
collision.
2025-03-26 11:19:31 -07:00
Niloth P
4b9317cee4 integrations: Add missing directory_name for Jira plugin integration. 2025-03-26 11:19:31 -07:00
Niloth P
4975f5b0fa integrations: Remove Jenkins from the Python API integrations' dict.
Jenkins is a plugin integration, that had been mistakenly marked as a
PythonAPIIntegration.
2025-03-26 11:19:31 -07:00
Tim Abbott
bc017d3394 event_queue: Remove pre-5.0 compatibility code.
Since we don't support 20.04 anymore, one has to upgrade through an
intermediate release to get to 11.0.
2025-03-26 10:54:38 -07:00
Tim Abbott
0fecb497a2 puppet: Remove legacy camo-purging logic.
This is no longer required, since servers must upgrade via 5.x or
higher in order to get to the current release.
2025-03-26 10:54:38 -07:00
Tim Abbott
f3a829ce71 notifications: Complete old compatibility TODO.
We no longer support upgrading from old enough versions that bots
should get here, which means we can move to the more compact assert
statement.
2025-03-26 10:54:38 -07:00
Karl Stolley
852b957da8 left_sidebar: Avoid misaligned unreads on Safari. 2025-03-26 10:53:44 -07:00
evykassirer
8a51fa4b83 drafts: Fix bug opening drafts in 'general chat'.
This was likely a longstanding issue that wasn't
caught because we required topics on CZO. The new
logic ensures topic match even for empty string
(general chat) topics.
2025-03-25 17:02:44 -07:00
Elsa Kihlberg Gawell
f6b3d59c35 migration: Fix topic name for imported DMs from third-party exports.
Currently, imported direct messages from third-party exports might have
a non-empty string as their topic name.

This migration updates the topic names for all imported third-party DMs
and GDMs to an empty string if they aren’t already.

Fixes #29466.

Co-authored-by: Pieter CK <pieterceka123@gmail.com>
2025-03-25 16:38:21 -07:00
PieterCK
d5e28bcd28 slack_import: Fix thread conversion condition.
Currently, threads in Slack direct messages will increment the
`thread_counter` variable inside the thread conversion logic. Since we
don't treat thread messages in Slack DMs differently than any other DM,
threads in DM will only falsely increment the thread topic names in
channels.

This adds a condition that checks if the Slack message is a DM or not
before executing the thread conversion logic.
2025-03-25 16:38:21 -07:00
Elsa Kihlberg Gawell
845f0d40e1 import_data: Make sure converted DMs don't have topic name.
Previously, `build_message` sets a message's topic name to the given
topic name, regardless of whether the message was a direct message (DM)
or a group direct message (GDM).

This change adds the `is_private` parameter to `build_message`. If
`is_private` is `True`, the `topic_name` will be overridden to an empty
string (""). Consequently, this also updates the third-party importers
to pass this parameter when calling `build_message`.

Co-authored-by: Pieter CK <pieterceka123@gmail.com>
2025-03-25 16:38:21 -07:00
Lauryn Menard
7d3b77e490 compose-closed-ui: Refactor get_recipient_label.
Refactors get_recipient_label so that it's a bit clearer what the
recipient_information parameter is for and what we do when that
parameter is undefined.

In doing so, we no longer treat the constructed objects, that are
passed as the recipient_information parameter, and actual Message
objects, that we get from the current message list view, as the
same thing.
2025-03-25 16:23:41 -07:00
Lauryn Menard
4f163e5ad2 compose-closed-ui: Fix inbox and recent views not updating button.
Both the inbox and recent conversation views pass information about
the reply recipient to this function's caller so that the button
text can be updated for the focused row.

Therefore, the check for an undefined current message list should
be inside the case where the recipient information parameter is
undefined.

This was changed in f630272b4c when non-message list views set
undefined for the current message list.
2025-03-25 16:23:41 -07:00
Lauryn Menard
b48134a03e compose-closed-ui: Clarify object and type for reply to button.
Renames ComposeClosedMessage to ReplyRecipientInformation, and
exports the type from compose_closed_ui.ts so that the functions
that construct these objects from the recent conversations and
inbox views have the type available.

Also, renames the variables for these objects to not be "message",
so that it's clear that these are not Message objects.
2025-03-25 16:23:41 -07:00
Lauryn Menard
94fe5fc173 compose-closed-ui: Rename update_reply_recipient_label.
Renames update_reply_recipient_label to
update_recipient_text_for_reply_button.

This better matches the function that sets the default text for
the closed compose box button: set_standard_text_for_reply_button.
2025-03-25 16:23:41 -07:00
userAdityaa
1b260c9fd7 search_pill: Aligned the user emoji with the search text.
This commit ensures that the user emoji in the search pill
is correctly aligned with the search text. The issue was
caused by improper line height, leading to the emoji being
slightly cut off at the top. Adjusting the `line-height`
of `.pill-value` resolves this, providing a consistent
and visually balanced appearance.
2025-03-25 16:06:04 -07:00
Jitendra Kumar
4696c8eb67 message_list: Update trailing bookend on empty channel or topic.
Show `You are not subscribed to  #xyz. Subscribe` bookend
on channel or topic which are not subscribed and have no messages.

Fixes: #33209
2025-03-25 16:04:55 -07:00
Aman Agrawal
afbc6f2510 message_list: Fix just_unsubscribed for empty views.
This fixes a bug where wrong bookend is shown in empty views in
the next commit.
2025-03-25 16:04:55 -07:00
ubaidrmn
a9fa5b66a2 ui_init: Hide sidebar when clicking a topic link on small devices.
Previously, clicking a topic link on small devices did not close
the left sidebar, and it had to be manually closed. This commit
fixes that by calling `sidebar_ui.hide_streamlist_sidebar()` when
a topic link is clicked and the left sidebar is displayed as an
overlay.
2025-03-25 16:03:16 -07:00