Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

settings: Add `web_left_sidebar_unreads_count_summary` setting.

opmkumar87d14086af3d
diff --git a/api_docs/changelog.md b/api_docs/changelog.md
index f8322cc96d6..c3d953b460e 100644
--- a/api_docs/changelog.md
+++ b/api_docs/changelog.md
@@ -20,6 +20,13 @@ format used by the Zulip server that they are interacting with.
## Changes in Zulip 11.0
+**Feature level 398**
+
+* [`POST /register`](/api/register-queue), [`PATCH /settings`](/api/update-settings),
+ [`PATCH /realm/user_settings_defaults`](/api/update-realm-user-settings-defaults):
+ Added new `web_left_sidebar_unreads_count_summary` display setting,
+ controlling whether summary unread counts are displayed in the left sidebar.
+
**Feature level 397**
* [`POST /users/me/subscriptions`](/api/subscribe): Added parameter
diff --git a/version.py b/version.py
index 537b4d07df1..9ecf238178f 100644
--- a/version.py
+++ b/version.py
@@ -34,7 +34,7 @@ DESKTOP_WARNING_VERSION = "5.9.3"
# new level means in api_docs/changelog.md, as well as "**Changes**"
# entries in the endpoint's documentation in `zulip.yaml`.
-API_FEATURE_LEVEL = 397
+API_FEATURE_LEVEL = 398
# Bump the minor PROVISION_VERSION to indicate that folks should provision
# only when going from an old version of the code to a newer version. Bump
diff --git a/zerver/migrations/0725_realmuserdefault_web_left_sidebar_unreads_count_summary_and_more.py b/zerver/migrations/0725_realmuserdefault_web_left_sidebar_unreads_count_summary_and_more.py
new file mode 100644
index 00000000000..f822d0227bc
--- /dev/null
+++ b/zerver/migrations/0725_realmuserdefault_web_left_sidebar_unreads_count_summary_and_more.py
@@ -0,0 +1,22 @@
+# Generated by Django 5.1.8 on 2025-05-20 06:47
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("zerver", "0724_alter_stream_can_move_messages_out_of_channel_group"),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name="realmuserdefault",
+ name="web_left_sidebar_unreads_count_summary",
+ field=models.BooleanField(db_default=True, default=True),
+ ),
+ migrations.AddField(
+ model_name="userprofile",
+ name="web_left_sidebar_unreads_count_summary",
+ field=models.BooleanField(db_default=True, default=True),
+ ),
+ ]
diff --git a/zerver/models/users.py b/zerver/models/users.py
index bc8f8063475..74e5389fd05 100644
--- a/zerver/models/users.py
+++ b/zerver/models/users.py
@@ -183,6 +183,8 @@ class UserBaseSettings(models.Model):
default=WEB_STREAM_UNREADS_COUNT_DISPLAY_POLICY_UNMUTED_STREAMS
)
+ web_left_sidebar_unreads_count_summary = models.BooleanField(default=True, db_default=True)
+
# Setting to control whether to automatically go to the
# conversation where message was sent.
web_navigate_to_sent_message = models.BooleanField(default=True)
@@ -379,6 +381,7 @@ class UserBaseSettings(models.Model):
web_suggest_update_timezone=bool,
hide_ai_features=bool,
resolved_topic_notice_auto_read_policy=ResolvedTopicNoticeAutoReadPolicyEnum,
+ web_left_sidebar_unreads_count_summary=bool,
)
modern_notification_settings = dict(
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml
index 36e73cc7d8f..36a4b38739a 100644
--- a/zerver/openapi/zulip.yaml
+++ b/zerver/openapi/zulip.yaml
@@ -13348,6 +13348,14 @@ paths:
be hidden in all Zulip clients.
**Changes**: New in Zulip 10.0 (feature level 350).
+ web_left_sidebar_unreads_count_summary:
+ description: |
+ Determines whether the web/desktop application's left sidebar displays
+ the unread message count summary.
+
+ **Changes**: New in Zulip 11.0 (feature level 398).
+ type: boolean
+ example: true
enable_stream_desktop_notifications:
description: |
Enable visual desktop notifications for channel messages.
@@ -13674,6 +13682,8 @@ paths:
contentType: application/json
hide_ai_features:
contentType: application/json
+ web_left_sidebar_unreads_count_summary:
+ contentType: application/json
enable_stream_desktop_notifications:
contentType: application/json
enable_stream_email_notifications:
@@ -16790,6 +16800,13 @@ paths:
be hidden in all Zulip clients.
**Changes**: New in Zulip 10.0 (feature level 350).
+ web_left_sidebar_unreads_count_summary:
+ type: boolean
+ description: |
+ Determines whether the web/desktop application's left sidebar displays
+ the unread message count summary.
+
+ **Changes**: New in Zulip 11.0 (feature level 398).
timezone:
type: string
description: |
@@ -19586,6 +19603,13 @@ paths:
be hidden in all Zulip clients.
**Changes**: New in Zulip 10.0 (feature level 350).
+ web_left_sidebar_unreads_count_summary:
+ type: boolean
+ description: |
+ Determines whether the web/desktop application's left sidebar displays
+ the unread message count summary.
+
+ **Changes**: New in Zulip 11.0 (feature level 398).
enable_stream_desktop_notifications:
type: boolean
description: |
@@ -20848,6 +20872,14 @@ paths:
be hidden in all Zulip clients.
**Changes**: New in Zulip 10.0 (feature level 350).
+ web_left_sidebar_unreads_count_summary:
+ description: |
+ Determines whether the web/desktop application's left sidebar displays
+ the unread message count summary.
+
+ **Changes**: New in Zulip 11.0 (feature level 398).
+ type: boolean
+ example: true
timezone:
description: |
The IANA identifier of the user's [profile time zone](/help/change-your-timezone),
@@ -21261,6 +21293,8 @@ paths:
contentType: application/json
hide_ai_features:
contentType: application/json
+ web_left_sidebar_unreads_count_summary:
+ contentType: application/json
enable_stream_desktop_notifications:
contentType: application/json
enable_stream_email_notifications:
diff --git a/zerver/views/realm.py b/zerver/views/realm.py
index 474d7891410..d665504c573 100644
--- a/zerver/views/realm.py
+++ b/zerver/views/realm.py
@@ -710,6 +710,7 @@ def update_realm_user_settings_defaults(
| None = None,
web_navigate_to_sent_message: Json[bool] | None = None,
web_suggest_update_timezone: Json[bool] | None = None,
+ web_left_sidebar_unreads_count_summary: Json[bool] | None = None,
hide_ai_features: Json[bool] | None = None,
resolved_topic_notice_auto_read_policy: Annotated[
str | None,
diff --git a/zerver/views/user_settings.py b/zerver/views/user_settings.py
index cbbb37bf76f..00ef10138ad 100644
--- a/zerver/views/user_settings.py
+++ b/zerver/views/user_settings.py
@@ -313,6 +313,7 @@ def json_change_settings(
| None = None,
web_navigate_to_sent_message: Json[bool] | None = None,
web_suggest_update_timezone: Json[bool] | None = None,
+ web_left_sidebar_unreads_count_summary: Json[bool] | None = None,
hide_ai_features: Json[bool] | None = None,
resolved_topic_notice_auto_read_policy: Annotated[
str | None,