Commit Graph

64739 Commits

Author SHA1 Message Date
Aman Agrawal
b459f6f3d2 users: Separate view function to get singer user data.
This will avoid overloading a function with similar parameters when
we add `user_ids` parameter to `get_members_backend`.
2025-05-12 15:13:49 -07:00
Evy Kassirer
25c0b279f7 invite: Fetch full user set for get_unique_subscriber_count_for_streams.
Work towards #34244.
2025-05-12 15:11:50 -07:00
Karl Stolley
3e9d3a8ff4 compose_typeahead: Add gap between topic, New indicator. 2025-05-12 12:12:00 -07:00
Alex Vandiver
1c8cfff0bd postgres: Add knobs for min_wal_size / max_wal_size. 2025-05-12 11:12:45 -07:00
Alex Vandiver
b4c8d2e6f5 postgres: Add knobs for parallelism control. 2025-05-12 11:12:45 -07:00
Alex Vandiver
933871e825 postgres: Double maintenance_work_mem to 1/8th, but cap at 2GiB.
This is based on annotated.conf[^1].

[^1]: c4ebbf1420/postgresql.10.simple.conf (L122-L133)
2025-05-12 11:12:45 -07:00
Alex Vandiver
8850c3f85c postgres: Tune effective_cache_size upwards, to 75%.
The previous 10/16ths is an odd value; various suggestions are around
75% of RAM, and in practice this is closer to what is observed.
2025-05-12 11:12:45 -07:00
Alex Vandiver
49c307e136 postgres: Remove explicit wal_buffers setting.
The value, if unset, defaults to[^1]:

> a size equal to 1/32nd (about 3%) of shared_buffers, but not less
> than 64kB nor more than the size of one WAL segment, typically 16MB

Letting it choose this, by default, but allowing an override via
`zulip.conf`, seems preferable to hard-coding an arbitrary value.

[^1]: https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-WAL-BUFFERS
2025-05-12 11:12:45 -07:00
Alex Vandiver
45b6c5931a puppet: Remove unnecessary use of scope[...]. 2025-05-12 11:12:45 -07:00
Alex Vandiver
a4ddc0a2d5 postgres: Remove lower-than-suggested checkpoint_completion_target.
This defaults to 0.9, and lowering it is not generally suggested[^1].

[^1]: https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-CHECKPOINT-COMPLETION-TARGET
2025-05-12 11:12:45 -07:00
Alex Vandiver
f47d150fb5 puppet: Allow overrides of computed PostgreSQL config settings.
The four precomputed memory values gain overrides in `zulip.conf` with
the same names, for more precise manual tuning.
2025-05-12 11:12:45 -07:00
Alex Vandiver
5bc75a94be puppet: Base PostgreSQL tuning on if the frontend is on the same host.
The previous thresholds were set based on the assumption that 50% of
the memory on the host was taken up by Django and friends, leaving
only 50% for the database host.

On separate database hosts, this leads to a too-small default value
for shared_buffers, which is generally suggested to be 25% of your
database-dedicated memory.

Check if there is a `zulip::app_frontend_base` as part of the deploy,
and use that to adjust if we halve `$zulip::common::total_memory_mb`
or not for purposes of calculating PostgreSQL memory settings.  We
also provide a `postgresql.memory` override, if necessary.
2025-05-12 11:12:45 -07:00
Anders Kaseorg
61c04078cc server_events: Extract interface for compose, transmit to new module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-12 11:07:12 -07:00
Aman Agrawal
eaeed0e0f8 inbox_ui: Store channel navigation state separately from inbox view.
We store last visited channel navigation state and restore it if
possible. This is store separately from inbox view state.
2025-05-09 15:13:56 -07:00
Aman Agrawal
1ace8b80f5 hash_util: Set channel URL based on user setting.
We now render channel feed URL or channel topics list URL in
all elements based on user setting.
2025-05-09 15:13:56 -07:00
Aman Agrawal
97c69e3038 inbox: Show inbox channel view based on user setting.
Fixes: #29574
2025-05-09 15:13:56 -07:00
Aman Agrawal
cc4b4f5670 users: Add new option in web_channel_default_view.
Added "list of topics" option which will allow users to indicate
that they want to view an inbox style list of topics on visiting
a channel link.
2025-05-09 15:13:56 -07:00
Aman Agrawal
6aca4c8509 topic_link_util: Use hash_util functions to get channel link.
This brings uniformity in code since we don't use `internal_url`
functions unless absolutely necessary.
2025-05-09 15:13:56 -07:00
Aman Agrawal
0ad2f8fc85 inbox_ui: Directly import inbox_util to code clarity. 2025-05-09 15:13:56 -07:00
Aman Agrawal
903e65aba8 util: Fix spelling mistake. 2025-05-09 15:13:56 -07:00
Anders Kaseorg
b8923128c9 compose_send_menu_popover: Fix check for closed popover.
An empty jQuery object is still truthy.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-09 14:51:01 -07:00
Alex Vandiver
1b9a8dbc52 kandra: Allow PostgreSQL primary ssh access for PostgreSQL upgrade.
This allows scripting of the whole upgrade process; these grants are
temporary.
2025-05-09 10:05:19 -07:00
Alex Vandiver
a959f71208 kandra: Support installing multiple ssh keys from multiple secrets. 2025-05-09 10:05:19 -07:00
apoorvapendse
5a21f42000 message_row: Remove cursor:pointer for messagebox.
Related article: https://adamsilver.io/blog/buttons-shouldnt-have-a-hand-cursor/

Fixes: https://chat.zulip.org/#narrow/channel/137-feedback/topic/.60cursor.3A.20pointer.60.20applied.20to.20whole.20message.20content/with/2167059
2025-05-09 09:05:32 -07:00
Lauryn Menard
c2007ebf30 support: Fix unit for file upload usage information. 2025-05-09 09:04:57 -07:00
Anders Kaseorg
5bdb734cde support: Avoid $(callback) to reduce zjquery complexity.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-09 09:04:39 -07:00
Anders Kaseorg
1a41a13ea3 upload: Avoid unnecessary .one() usage to simplify test.
Both of these handlers immediately hide the banner, so the difference
between .on() and .one() doesn’t matter.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-08 18:21:57 -07:00
Anders Kaseorg
15e04b1d8a server_events_dispatch: Use two-argument toggleClass.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-08 18:06:50 -07:00
Anders Kaseorg
147a2c40b2 reactions: Correctly convert template output to a jQuery object.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-08 17:13:25 -07:00
kash2104
2320a8917e channels: Include unsubscribed channels in move selectors.
For channel dropdowns in move messages and move topic modals
only subscribed channels are included.

To fix it, a new function is made to include subscribed
and unsubscribed channels to which the acting user has
content access. Each group is sorted respectively with
subscribed channels followed by unsubscribed channels.

To avoid unsubscribed channels from getting included in the
compose box dropdown and saved snippets UI, a separate function
get_stream_for_move_messages_widget is made. This function
is used to include unsubscribed channels in move selector
dropdown only.

Fixes #33670.
2025-05-08 12:20:54 -07:00
userAdityaa
354a16fb0a migration: Rename 'populate_db' Client to 'ZulipDataImport'.
This commit:

* Creates a migration to rename any existing Client with
name="populate_db" to "ZulipDataImport".
* Updates populate_db.py to use ZulipDataImport for new
message creation

These changes should make code to identify imported messages
considerably more readable.

Fixes #33909.
2025-05-08 12:18:34 -07:00
Evy Kassirer
9577dc9da7 typeahead_helper: Fetch full subscriber list while sorting.
Work towards #34244.
2025-05-08 10:10:36 -07:00
Maneesh Shukla
5b1ddf35ba buttons: Modify the styles of buttons in stream settings. 2025-05-08 09:40:51 -07:00
Shubham Padia
05542d6cb4 help-beta: Pass allowedHosts when running dev server.
Vite introduced allowedHosts config at
https://vite.dev/config/server-options#server-allowedhosts. This caused
our help beta dev server to break in case of dev droplets since it's
hostname is not specified in the allowed lists. Since we have a way to
know our hostname, we do not pass a blanket true for all hostnames in
this case.
2025-05-08 09:40:12 -07:00
Lauryn Menard
7fc9d29c1e support: Show file upload usage compared to realm upload quota.
Implemented on Zulip Cloud support view only since this information
isn't relevant for self-hosted support actions.

Looking up the realm's currently used upload space adds 3 database
queries to the support view test as there is no RealmCount data for
the upload quota used in the test. And therefore installation_epoch
is called for the realm.

With RealmCount upload quota used data, only 2 additional database
queries would be made for the realm's support view data.
2025-05-08 09:38:02 -07:00
Evy Kassirer
798f59a01b drafts: Remove noop setting of private_message_recipient in tests.
If we stub out `set_from_emails` as a noop, then setting the private
recipient is a noop and doesn't need to happen.
2025-05-08 09:36:36 -07:00
Evy Kassirer
497ba6bd25 compose_action: Move missed PM recipient into compose_defaults. 2025-05-08 09:35:53 -07:00
Evy Kassirer
1ade634728 compose_actions: Reset start_called in tests. 2025-05-08 09:35:53 -07:00
Maneesh Shukla
c6660fbea7 group_panel: Fix the description below "Add members" label. 2025-05-07 16:51:51 -07:00
Maneesh Shukla
67631225c4 tooltips: Show tooltip on disabled "Add" button in group and channel settings.
Fixes: #34325.
2025-05-07 16:51:51 -07:00
Niloth P
f57768f4c4 integration-docs: Update Discourse for new doc format.
Part of zulip#29592.
2025-05-07 16:50:12 -07:00
Lauryn Menard
fde3e01236 demo-orgs: Use banners for org settings demo organization warning.
Migrate the demo organization warning that's shown on all the tabs
for organization settings to use the shared banner code.

Updates links in the current warning to be buttons in the banner,
and matches the navbar alert banner for demo organizations.

Fixes #34447.
2025-05-07 16:48:12 -07:00
Lauryn Menard
43b13c938b demo-orgs: Update event listeners that open convert org modal. 2025-05-07 16:48:12 -07:00
Lauryn Menard
d7afd6af42 navbar-alerts: Clean up demo organization banner label generation.
Since we're no longer adding links to this banner, we don't need
to use "$t_html" when generating the label for the demo organization
warning banner.

Follow-up to #34518.
2025-05-07 16:48:12 -07:00
Lauryn Menard
2b089c7e98 api-docs: Revise POST report-message endpoint descriptions.
Fixes the version of Zulip in the main changes note for this new
endpoint.

Revises the main description and the parameter/error descriptions.
2025-05-07 13:19:29 -07:00
Niloth P
ed005e7bf7 integration-docs: Update URL in change-zulip-config-file macro.
Use the context variable `zulip_url` instead of `api_url` to remove the
'/api' suffix.
2025-05-07 12:57:53 -07:00
Mateusz Mandera
420b84e79c migration: Prepare for backporting of migration 0700.
This follows our usual backporting scheme, occurring e.g.
in #31468. We make the migration depend on the last migration in 10.x,
and create a merge migration to avoid having multiple leafs.
2025-05-07 12:56:33 -07:00
PieterCK
0a2d7eedf8 integrations: Use real replace_link in Slack webhook.
The real `replace_link` function is now available. This cleans up the
duplicate and switches it with the real one instead.
2025-05-07 12:45:27 -07:00
Evy Kassirer
cbc4dfb086 compose: Fix broken logic in 'finish' test.
It doesn't make sense that there would be no compose pill user ids
if there were compose pill emails, and there needs to be permission
to send a direct message or the message won't successfully send.

This was working before because `user_ids_string` ended up empty
in `validate_private_message`, which incorrectly returned true
for `check_dm_permissions_and_get_error_string`.
2025-05-07 09:32:02 -07:00
Evy Kassirer
b210456e35 compose_actions: Fix on_narrow tests to pass opts correctly. 2025-05-07 09:31:19 -07:00