Commit Graph

65439 Commits

Author SHA1 Message Date
Sahil Batra
350f6a1fa1 streams: Add ChannelFolder table.
Fixes part of #31972.
2025-05-20 13:25:06 -07:00
Evy Kassirer
e2b90176ee buddy_list: Clear search bar when the narrow changes. 2025-05-20 13:16:04 -07:00
apoorvapendse
9912109e82 setup_docs: Add troubleshooting steps for WSL2.
This commit adds steps to troubleshoot errors encountered
because of certain services like postgresql not starting
on WSL2.

The common reason behind this is port conflicts with other
services running on some other WSL2 instance or the host
Windows system.

This commit provides a guide to handle these issues, and
also provides some additional tips to WSL2 users to avoid
facing these issues in the future.

Fixes #32718.
2025-05-20 10:53:21 -07:00
apoorvapendse
5b4f9a42b7 setup_docs: Use operating system tabs for troubleshooting errors. 2025-05-20 10:53:21 -07:00
Apoorva Pendse
24b47dd263 setup_docs: Extract common Windows VM errors to a shared file.
The assumption here is that VirtualBox is used only for Windows. This
is because we do not mention VirtualBox for Unix based platforms prior
to this troubleshooting errors section.

Prep for organizing common errors into operating systems tabs.
2025-05-20 10:53:21 -07:00
Apoorva Pendse
c51542e44c setup_docs: Extract common unix errors to a shared file.
Prep for organizing common errors into operating system tabs.
2025-05-20 10:53:21 -07:00
apoorvapendse
3116925a6f setup_docs: Extract common vagrant errors to a shared file.
This change is done as a prerequisite step to
eventually add tabs for different platforms
for the troubleshooting section.

The reason behind making this change is to group
the errors common to vagrant setup when using
either docker or VirtualBox backends which would
make it convenient to maintain in the future.
2025-05-20 10:53:21 -07:00
apoorvapendse
713bdb85d0 setup_docs: Update troubleshooting intro for Vagrant and WSL. 2025-05-20 10:53:21 -07:00
apoorvapendse
34d8f83cf5 setup_docs: Capitalize information points.
Fixes: https://github.com/zulip/zulip/pull/32719#discussion_r2081928031.
2025-05-20 10:53:21 -07:00
apoorvapendse
82846f89ca setup_docs: Deduplicate bug reporting steps.
This removes the bug reporting steps from
the intro of the setup tutorial, as it
is already present in the `Troubleshooting
and common errors` section.
2025-05-20 10:53:21 -07:00
Sahil Batra
ba1780c6b2 hash_util: Redirect '#groups/new' to '#groups/your' on limited plans.
This commit adds code to redirect '#groups/new' to '#groups/your'
if realm is on limited plan like we do when user does not have
permission to create groups.
2025-05-20 10:45:13 -07:00
Sahil Batra
bc61a5ed08 groups-ui: Live update UI to create groups.
This commit adds code to live update the UI when
can_create_user_groups setting changes.

The elements that are live updated are -
- Icon button at the top left panel
- Button shown in right panel when no group
is selected.
- Text shown in right panel mentioning whether
user has permission.

We do not live update the text shown when left
panel is empty as it is somewhat complex to
handle all conditions correctly for it.
2025-05-20 10:45:13 -07:00
Sahil Batra
737f5f4cd3 admin: Remove unused variable.
We now have new groups UI, so there is no way to pass
the can_create_user_groups variable to settings template.
2025-05-20 10:45:13 -07:00
Sahil Batra
72e2605b98 stream-settings: Fix duplicate IDs.
"stream-advanced-configurations" was being used as ID for
advanced configurations section in both stream edit and
creation UI, which is not correct as ID should be unique.

This commit fixes it by removing the ID and instead using
class in selectors. Also, there was some unused CSS, as
we do not have dropdown widget buttons in advanced
configurations section, written using the duplicate ID so
removed that as well.
2025-05-20 10:40:19 -07:00
Sahil Batra
a2d4913cc0 stream_ui_updates: Fix live-update of web-public option.
In update_web_public_stream_privacy_option_state, when showing
and hiding the web-public option, "hidden" prop was set while
hiding the option and ".show()" was called to show the option.

Now once the UI was live updated by calling "show" setting
hidden attribute again to hide did not work because
"display: block" CSS applied by calling "show" kept the
option visible. This commit updated code to show the option
by setting "hidden" attribute to "false".
2025-05-20 10:40:19 -07:00
Sahil Batra
bc89d96893 stream-settings: Fix duplicate IDs.
This commit fixes the use of "stream_permission_settings"
as ID for "Channel permissions" subsection in both
stream edit and creation UI, which was not correct since
ID should be unique.

To fix this ID was removed from the element and following
changes are done -
- $("#stream_settings") element is now used as a container
for live update functions for stream edit UI.
- "stream-permissions" class is used to access the element
instead of ID.
- Advanced configurations container also had "stream-permissions"
class before, and that was removed in this commit so that
"Channel permissions" container can be identified uniquely
and thus some CSS changes were needed.
- Also, fixed "update_stream_privacy_choices" function to
not use ":visible" in selectors.
2025-05-20 10:40:19 -07:00
Sahil Batra
0e3b036d71 groups-ui: Do not open group in right panel when leaving.
Previously, when leaving the group by clicking "checkmark"
icon in group row, group details were opened in right panel
as well due to event propagation.

We keep the behavior of opening the group in right panel
after joining the group by clicking on "+" icon in the
group row.

For narrow widths, left panel is kept open while joining
or leaving the group, same like we do for stream settings.
2025-05-20 10:37:59 -07:00
Sahil Batra
8e64e67e94 groups-ui: Fix exiting from creation UI for mobile widths.
When clicking on "Cancel" button in the footer in stream
creation UI, left panel should be shown for mobile widths.
Previously, it resulted in a buggy view showing both left
and right panels.

This change makes the behavior consistent with what we
have for streams UI.

There is no change in behavior for wider screens.
2025-05-20 10:37:59 -07:00
Sahil Batra
6d40c6629f group-settings: Fix hiding empty panel text.
The selector used to check whether there is any group
row visible was incorrect and thus the empty list
text was shown incorrectly.
2025-05-20 10:37:59 -07:00
Sahil Batra
7833ea0bb5 user_group_edit: Fix typo in class name.
"hide-deactivated-user-groups" was incorrectly written in
"hide-deactived-user-groups".
2025-05-20 10:37:59 -07:00
Alex Vandiver
d87c0b43f1 soft_deactivation: Remove unnecessary nocoverage lines.
These are unnecessary given the `# nocoverage` on the above
`except Exception`.
2025-05-20 10:35:14 -07:00
Alex Vandiver
c6fd943a55 soft_deactivation: Better logging on failures. 2025-05-20 10:35:14 -07:00
Lauryn Menard
6326b07905 billing: Update CustomerPlan.invoiced_through documentation.
Clarify what the invoiced_through field on a CustomerPlan indicates
after the changes to the billing state machine as ledger entries
are processed in invoice_plan.

Updates the plan activity page where this field is shown to support
admin users for these changes as well.

Follow-up to #34643.
2025-05-20 07:05:02 -07:00
Kislay Verma
e04f232f63 organization_settings: Fix label text. 2025-05-20 07:04:20 -07:00
Aman Agrawal
2767122a3d realm_creation_form: Change style of import tooltip. 2025-05-20 07:03:51 -07:00
Alex Vandiver
1d72e38e62 process_exporter: Monitor the standalone email_server. 2025-05-20 07:03:23 -07:00
Aman Agrawal
f4e6f2f89b events: Add option to send partial data.
Server can now send partial data to the client to help in
developement. We don't want this to be widely used right now,
hence no documentation changes have been made.

This will likely be a check on client capability later.
2025-05-19 16:58:56 -07:00
Alex Vandiver
01e08f0e32 email_server: Attempt to reject unauth'd destinations at RCPT TO time.
This is done in a best-effort way -- we rely on the final ACL check
happening when the message is sent.  However, by then we will be in
the `email_mirror` worker, with no way to convey to the original SMTP
client that the sending failed; giving the client the information will
allow them to provide it back to the end-user, instead of merely being
swallowed up in the worker.
2025-05-19 16:39:44 -07:00
Alex Vandiver
c6e0f0b436 email-mirror: Remove HTTP interface. 2025-05-19 16:39:44 -07:00
Alex Vandiver
a6a5fc246a kandra: Swap in zulip::local_mailserver for postfix. 2025-05-19 16:39:44 -07:00
Alex Vandiver
7a62a9b509 upgrade: Swap postfix_localmail for local_mailserver. 2025-05-19 16:39:44 -07:00
Alex Vandiver
1f0cfd4662 email-mirror: Add a standalone server that processes incoming email.
Using postfix to handle the incoming email gateway complicates things
a great deal:

- It cannot verify that incoming email addresses exist in Zulip before
  accepting them; it thus accepts mail at the `RCPT TO` stage which it
  cannot handle, and thus must reject after the `DATA`.

- It is built to handle both incoming and outgoing email, which
  results in subtle errors (1c17583ad5, 79931051bd, a53092687e,
  #18600).

- Rate-limiting happens much too late to avoid denial of
  service (#12501).

- Mis-configurations of the HTTP endpoint can break incoming
  mail (#18105).

Provide a replacement SMTP server which accepts incoming email on port
25, verifies that Zulip can accept the address, and that no
rate-limits are being broken, and then adds it directly to the
relevant queue.

Removes an incorrect comment which implied that missed-message
addresses were only usable once.  We leave rate-limiting to only
channel email addresses, since missed-message addresses are unlikely
to be placed into automated systems, as channel email addresses are.

Also simplifies #7814 somewhat.
2025-05-19 16:39:44 -07:00
Alex Vandiver
e6bcde00e3 requirements: Add aiosmtpd. 2025-05-19 16:39:44 -07:00
Alex Vandiver
31ffe12873 logging_util: Error-proof against weird exc_info. 2025-05-19 16:39:44 -07:00
yatinsharmaa12
452a93f72b styles: Improve the style of login page at narrow screen. 2025-05-19 16:38:33 -07:00
Alya Abbott
dd7e871b11 portico: Add partnership program page. 2025-05-19 16:36:26 -07:00
Aman Agrawal
b11047789a self-hosting: Properly fix content in feature box at all widths.
Also moves height properties outside the nested styles for easy
overriding by other pages.
2025-05-19 16:36:26 -07:00
Alex Vandiver
18f0b73fa9 process_fts_updates: Document as being required for remote PostgreSQL. 2025-05-19 12:58:51 -07:00
Alex Vandiver
f06253a62b puppet: Fix comment to point to the updated docs.
This was moved in 44c4b93f6e.
2025-05-19 12:58:51 -07:00
Alex Vandiver
cc665cb9b7 process_fts_updates: Update comments for TODO being actually done. 2025-05-19 12:58:51 -07:00
Alex Vandiver
09f1195fb5 process_fts_updates: Use 3 queries, instead of BATCH_SIZE + 2.
This provides at least a 10x speedup.

We could use a CTE to fetch from, and lock, `fts_update_log` at the
same time as performing the `zerver_message` update -- however, this
would mean that the number of returned rows would be less than
BATCH_SIZE if some rows in `zerver_message` no longer existed, causing
premature termination of the outer loop.

We lock the `zerver_message` rows in ascending ID order, to prevent
deadlocks.  We use `ctid` values[^1] to transfer the rows from the
inner query to the outer update; this is safe, as the rows are locked
from updates.

[^1]: https://www.postgresql.org/docs/current/ddl-system-columns.html#DDL-SYSTEM-COLUMNS-CTID
2025-05-19 12:58:51 -07:00
Alex Vandiver
f2f94d30fe process_fts_updates: Only DELETE if rows were processed. 2025-05-19 12:58:51 -07:00
Alex Vandiver
eeb485f894 process_fts_updates: After getting notifies, process them all.
Every insert into `fts_update_log` triggers a `NOTIFY`; processing a
batch of 1000 for every NOTIFY that we get thus results in a lot of
extra processing of no rows.

Instead, we clear all notifies, and repeat the pattern of processing
rows until the batch comes up short.  This may still result in extra
wake-ups, in the event that a new NOTIFY occurs after we clear them,
and that new row is processed by us in `update_all_rows`.  However,
these wake-ups are necessary for correctness, and this change will
result in drastically fewer extra checks.
2025-05-19 12:58:51 -07:00
Alex Vandiver
fd898dafae process_fts_updates: Use row locking and transactions. 2025-05-19 12:58:51 -07:00
Tim Abbott
4d4a73c492 util: Clarify format_array_as_list_with_highlighted_elements.
This should avoid my having to look up the relevant Intl APIs to
understand this function in the future.
2025-05-19 00:08:29 -07:00
bedo
465a0ef0d0 message_util: Rename "get_messages_in_topic".
Follow-up commit.

This renaming clearly conveys that
fetched messages are cached.
2025-05-19 00:08:29 -07:00
bedo
f9e6bef47b move_topic_modal: Add unsubscribed participants warning banner.
Fixes #33627

In Move messages and Move topic modals,
Show a warning banner if any of current topic participants
are NOT subscribed to the destination stream.

Inside the banner, Show participant names if
number of conversation participants
is <= 5; otherwise, show only the count.
2025-05-19 00:08:29 -07:00
Mohammad Reza Kianifar
a0488715f3 direct_messages: Use DM groups for 1:1 or self DMs if present.
This is a preparatory refactor for migrating the internal structure of
Recipient objects for group DMs to use the DirectMessageGroup type,
not the legacy PERSONAL type. This step has the message-sending code
path check if a DirectMessageGroupe exists and prefer it if available.

It should have no effect in production other than doing a useless
database query for each outgoing DM, since we do not at present ever
create such DirectMessageGroup objects. (It will not add a marginal
database query once the migration is complete, just during this
transition).
2025-05-18 23:58:59 -07:00
Sayam Samal
e5db9614eb buttons: Add hover state styles to focus state styles.
This commit adds the button hover state styles to focus state styles,
as focusing on the button with the keyboard is a similar action to
hovering over it with a mouse.
2025-05-18 22:43:28 -07:00
Sayam Samal
1732848baa buttons: Improve button outline on focus.
This commit improves the button outline on focus by changing the color
of the outline to black-on-light and white-on-dark, and tweaking the
outline width and offset.
2025-05-18 22:43:28 -07:00