Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: Add show-startup-logs flag to reduce startup log verbosity #1218

Merged
merged 2 commits into from
Nov 28, 2024

Conversation

apoorvapendse
Copy link
Contributor

@apoorvapendse apoorvapendse commented Nov 20, 2024

This enables the user to enable or disable the startup logs while starting the tusd server. It helps the user suppress the startup logs as per their preference.

The flag has a default value of true.
Fixes #1216.

Before:
image


After:

set as false:

image

set as true explicity:
image

default:
image

@Acconut
Copy link
Member

Acconut commented Nov 26, 2024

Thank you for opening this PR! While I agree that it's useful to control the startup logs, I am not sure if a dedicated flag is the best approach. In #1216 (comment), I propose the idea of adding a generic flag for controlling the log level. If the log level does allow info messages, the startup logs would not be printed. Feel free to join the discussion in the other issue and let us know what you think.

This would also help us to remove the additional if statements that are introduced in this PR. They are quite cumbersome and I worry that in the future we forget about them and add direct log statements that should actually go in such an if statement. Using slog's method for logging at specific levels removes the need for these conditional clauses.

@apoorvapendse
Copy link
Contributor Author

Thanks for the feedback.
I'd like to collaborate with you to make the log level feature, if that's fine.
Let me know how you are planning to approach it.
I will read up on the documentation of slog in the meantime.

if Flags.S3Endpoint == "" {
if Flags.S3TransferAcceleration {
stdout.Printf("Using 's3://%s' as S3 bucket for storage with AWS S3 Transfer Acceleration enabled.\n", Flags.S3Bucket)
if Flags.ShowStartupLogs {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a better interface would be to have a function, printStartupLogLine, that does the ShowStartupLogs checks but is otherwise a wrapper for stdout.PrintF.

That'd avoid the excessive indentation here, as well as being likely a lot more robust to refactoring.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense to me.
@Acconut what do you think about this?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably just try implementing it; it's easier for maintainers to review a concept like this after seeing it. The current version seems unlikely to be merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll update this PR 👍
Thanks Tim!

@apoorvapendse
Copy link
Contributor Author

image

image

I've made the updations.

This adds the 'show-startup-logs' flag to the tusd server, allowing the
user to enable or disable startup logs. This helps the user suppress
startup logs as per their preference.

Fixes tus#1216.
@Acconut Acconut changed the title logging: Add show-startup-logs flag. cli: Add show-startup-logs flag to reduce startup log verbosity Nov 28, 2024
Copy link
Member

@Acconut Acconut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution! I did the final touches by myself to speed up the process of merging this.

@Acconut Acconut merged commit f36bb06 into tus:main Nov 28, 2024
6 of 7 checks passed
@apoorvapendse
Copy link
Contributor Author

Thank you for the contribution! I did the final touches by myself to speed up the process of merging this.

Thanks a lot @Acconut!

apoorvapendse added a commit to apoorvapendse/zulip that referenced this pull request Dec 4, 2024
Previously, tusd printed unnecessary logs on startup while running
the tools/run-dev script. This commit resolves the issue by setting
the verbose flag to false, which defaults to true if not specified.

The required PR adding this flag was introduced in
tus/tusd#1218.

Fixes zulip#32301.
timabbott pushed a commit to zulip/zulip that referenced this pull request Feb 23, 2025
Previously, tusd printed unnecessary logs on startup while running
the tools/run-dev script. This commit resolves the issue by setting
the verbose flag to false, which defaults to true if not specified.

The required PR adding this flag was introduced in
tus/tusd#1218.

Fixes #32301.
Anushlinux added a commit to Anushlinux/zulip that referenced this pull request Feb 27, 2025
templates: Change poll icon location to just before ?.

This commit change the location of poll icon into their own
section in the right just before `?`.

poll_modal: Set cursor on question field.

poll_modal: Disable browser autocomplete on question field.

We disable this on most similar inputs, and it is likely more
distracting than helpful.

todo_list: Add option for modal to create todo-lists.

A button has been introduced to launch a modal
for creating todo-lists directly from the compose box.

The modal features a form that, upon submission,
generates a message using the `/todo` syntax and the data
inputted in the form. Subsequently, the content of the compose box
is set to this message, which the user can then send.

This modal closely parallels the UI for adding a poll; therefore,
the poll and todo code has been shifted to a newly created
file named `widget_modal.ts`, and `poll_modal.ts` is now deprecated.

Co-authored-by: Sujal Shah <sujalshah28092004@gmail.com>

Fixes #29779.

tornado: Use Signal.asend.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

test_tornado: Remove async_to_sync_decorator.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

test_tornado: Remove in_django_thread.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

requirements: Upgrade asgiref.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

help: Document permanent topic links.

Also note that channel links are permanent.

help: Language tweak for group-based permissions.

help: Document topic permalinks and group-based permissions.

compose_reply: Add error handling when trying to fetch a message.

compose: Scale close button with font size.

aria-labels: Add aria labels for left sidebar 3 dots menu.

Fixes #20284

aria-label: Add aria label for vdots in collapsed navigation menu.

test_tornado: Add nocoverage for task cleanup.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

updates: Add update message (level=12).

stream: Function to check if user is in groups granting content access.

We're going to be adding a new setting called `can_join_group` soon and
it would be good to have this wrapper function ready for it to be used
in.

test_message_flags: Refactor assert_bulk_access to be more readable.

Making the query counts keyword arguments makes it more readable
wherever the function is used.

code_playground: Add custom playground options in the default_options list.

We can configure a custom playground for any language, including ones
which we don't have in our typeahead suggestions. One might then want to
make that language the default for code blocks, which is now possible
with this commit.

Fixes: #33282.

inbox_ui: Fix buggy mark as read for empty string topic.

Earlier, marking empty string topic as read via Inbox UI
resulted in marking the stream as read.

This commit fixes the bug.

unmute_topic_banner: Fix 'unmute topic' button for empty string topic.

When message is sent in a muted topic (with automatically follow
or unmute topic setting turned off), unmute topic banner is shown.

Earlier, using unmute topic button was resulting in server error
for empty string topic.

This commit fixes the bug.

message_edit: Fix 'stream_and_topic_exist_in_edit_history' for topic="".

This commit fixes the 'stream_and_topic_exist_in_edit_history'
function for empty string topic.

Earlier, `if` statements were not checking toipc===undefined explicitly
resulting in buggy behaviour when topic="".

empty_feed_notice: Add support for empty string topic.

Earlier, we were not showing `realm_empty_topic_display_name`
value in the empty_feed_notice.

requirements: Upgrade Django from 5.0.10 to 5.1.6.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

settings: Correctly handle passing empty anonymous group.

If empty anonymous group is passed for a setting value in
an API request, the setting is set to "Nobody" group.

compose: Use em for sizing and position of stream typeahead icon.

cache_helpers: Stop pre-filling the non-narrow user cache.

This is simply too time-intensive, at scale, to perform during the
critical period of an upgrade.  The most performance-critical
codepaths (Tornado and presence) have moved to the narrow user cache,
which we continue to pre-fill.

import_realm: Skip lock=true when enqueuing thumbnailing.

The `lock=true` parameter fails, since it is not being run inside of a
transaction.  We swap to not using locking, since there is no
correctness requirement for a lock here.

stream_data: Use user_has_permission_for_group_setting.

Before this, we were using `is_user_in_setting_group` which does not do
the extra checks around a guest user's permissions (and in future, some
other checks).
We introduced `initialize_and_override_current_user` in stream_data test
to make it easier to set current_user.user_id.

search: Fix Ctrl+Backspace whitespace removal on typing.

Fixes: #33443.
Co-authored-by: Harsh Bansal <harshbansal8705@gmail.com>

typeahead: Use em for image placement.

This is a quicker fix before we convert these styles to grid.

migrations: Add migration fixing realm of Attachments.

Old messages with attachments, sent by cross-realm bots, didn't have
the realm set correctly to the target realm, this migration fixes it
by looking at the messages linking to the attachment and setting the realm
based on the recipient.

This is the migration follow-up to
410281624098f56ff9a67c8c17aca205487d59bf

popovers: Scale font-size consistently (15px at 14px em).

emoji: Scale emoji popover with em.

compose: Fix em calculation errors.

Followup to  #33523.

todo_modal: Remove side scrolling in the todo modal.

app_variables: Remove dead variables.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

app_variables: Use CSS light-dark().

https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/light-dark
https://www.npmjs.com/package/@csstools/postcss-light-dark-function

Signed-off-by: Anders Kaseorg <anders@zulip.com>

composebox_typeahead: Update order of user typeahead elements.

Also fixes the extra comma issue
linked below.
Fixes: https://chat.zulip.org/#narrow/channel/9-issues/topic/.F0.9F.8E.AF.20extraneous.20comma.20after.20pronouns/with/2088251.

typos: Fix typos caught by typos and mwic.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

composebox_typeahead: Remove extra comma in user mentions.

This makes sense because we only insert comma
if the email address is shown next to the
pronouns as of now.

Fixes: https://chat.zulip.org/#narrow/channel/9-issues/topic/.F0.9F.8E.AF.20extraneous.20comma.20after.20pronouns/with/2088251.

compose: Remove stale classname: compose_draft_button.

This was removed in 609106e2d0958903c57761620293782aa5ec1d23
but the CSS was still there, unused.

desktop_notification: Add support for empty string topic.

This commit adds support to display `realm_empty_topic_display_name`
value for empty string topic in the desktop notification.

user_group_settings: Fix the alignment of remove button.

user_groups_settings: Add styles to hide the email table data on small screens.

backends: Rename SAMLAuthBackend.process_logout override.

Our method has an incompatible signature and cannot be validly typed
as an override.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

backends: Add missing @override declarations.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

backends: Fix type errors.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

slack_incoming: Fix slack_error_handler typing.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

decorator: Work around internal_api_view typing problem.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

codespell: Fix typos caught by codespell.

“Brunch” wasn’t a typo, but, whatever.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

python: Replace deprecated BeautifulSoup.findAll.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

requirements: Upgrade Python requirements.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

postprocess: Fix animated images automatically playing on Firefox.

This commit fixes a bug where animated images automatically play on
Firefox because the image source didn't output the same URL across
different browsers. Currently, the image source is normalized to
ensure consistent URLs across different browsers.

Fixes #33248

Co-authored-by: Alex Vandiver <alexmv@zulip.com>

deactivated_user: Show deactivated status for deactivated users.

Fixes: #26833.

typeahead: Use null check for user comma insertion.

As per https://github.com/zulip/zulip/pull/33536#discussion_r1960991985
which seems like a better fix than the current
implementation to include/exclude comma after
pronouns.

typeahead: Add comment for no left margin in status emoji.

Fixes: https://chat.zulip.org/#narrow/channel/6-frontend/topic/Removing.20extra.20space.20for.20status.20emoji.20in.20typeahead.2E/near/2095823

app_variables: Fix light-dark() conversion of gradients.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

app_variables: Rename “color” variables that are actually gradients.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

kandra: Add a hook to notify of local schema drift from merge-base.

pyre: Remove unmaintained configuration for Pyre and Pysa.

This doesn’t run at all right now, doesn’t look simple to get working,
and doesn’t seem to have anyone interested in it at this time.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

help: Note that other users can see who's deactivated.

clean_node_cache: Remove.

The old /srv/zulip-npm-cache system has been unused for two
years (Zulip Server ≥ 7.0).  We can just delete this directory.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

typeahead: Consider display name for system groups when sorting.

When sorting items for typeahead in sort_recipients, display
names should be considered for system groups and not their
original names.

groups: Change display names of everyone and members system groups.

"role:members" group name is displayed as "Everyone except guests"
in the UI and "role:everyone" group name is displayed as
"Everyone including guests".

typeahead: Handle matching for "role:members" system group.

The name displayed for "role:members" group is
"Everyone, except guests" and "role:members" group should
be shown in the typeahead when searching for "Members" as
well, i.e. while matching the query in the input "Members"
and "Everyone, except guests" both should be considered as
display names for "role:members" group.

typeahead: Fix left margin for groups icon in typeahead.

This commit fixes the left margin for groups icon in the
typeahead so that icon is aligned correctly with the
avatar in user item in typeahead.

zilencer: Log bouncer-side info when RemoteRealm creation fails.

This should also be logged on the bouncer side, to give us better
debugging information when self-hosters run into this error.

management: Don't silence send_server_data_to_push_bouncer exceptions.

When these exceptions are thrown from the request-to-bouncer functions
inside of manage.py register_server/update_analytics_counts, they
shouldn't be silenced, merely calling maybe_mark_pushes_disabled in the
background.
This results in the occurrence of the error not being shown to the
user. Failure to upload analytics data when running these commands
should result in a loud, obvious error.

Failure of running register_server before this change:
```
./manage.py register_server
This command registers your server for the Mobile Push Notifications Service.
Doing so will share basic metadata with the service's maintainers:

* This server's configured hostname: zulipdev.com:9991
* This server's configured contact email address: desdemona+admin@zulip.com
* Metadata about each organization hosted by the server; see:

    <https://zulip.com/doc-permalinks/basic-metadata>

Use of this service is governed by the Zulip Terms of Service:

    <https://zulip.com/policies/terms>

Do you want to agree to the Zulip Terms of Service and proceed? [Y/n]

Mobile Push Notification Service registration successfully updated!
```

The occurrence of the error is not revealed to the user. Same concern
applies to the update_analytics_counts command.

After this change:
```
./manage.py register_server
This command registers your server for the Mobile Push Notifications Service.
Doing so will share basic metadata with the service's maintainers:
    <...>
Do you want to agree to the Zulip Terms of Service and proceed? [Y/n]

Traceback (most recent call last):
  File "/srv/zulip/./manage.py", line 150, in <module>
    execute_from_command_line(sys.argv)
  File "/srv/zulip/./manage.py", line 115, in execute_from_command_line
    utility.execute()
  File "/srv/zulip-venv-cache/bb36fc1fcb6d8c70a9a0bcb7bac45d78623a9ff4/zulip-py3-venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/srv/zulip-venv-cache/bb36fc1fcb6d8c70a9a0bcb7bac45d78623a9ff4/zulip-py3-venv/lib/python3.10/site-packages/django/core/management/base.py", line 413, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/srv/zulip/zerver/lib/management.py", line 97, in execute
    super().execute(*args, **options)
  File "/srv/zulip-venv-cache/bb36fc1fcb6d8c70a9a0bcb7bac45d78623a9ff4/zulip-py3-venv/lib/python3.10/site-packages/django/core/management/base.py", line 459, in execute
    output = self.handle(*args, **options)
  File "/srv/zulip/zerver/management/commands/register_server.py", line 137, in handle
    send_server_data_to_push_bouncer(consider_usage_statistics=False, raise_on_error=True)
  File "/srv/zulip/zerver/lib/remote_server.py", line 453, in send_server_data_to_push_bouncer
    response = send_to_push_bouncer(
  File "/srv/zulip/zerver/lib/remote_server.py", line 233, in send_to_push_bouncer
    raise JsonableError(msg)
zerver.lib.exceptions.JsonableError: Duplicate registration detected.
```

tools: Add tools to manage API feature level changes.

This commit adds two new tools to avoid API feature level rebases:

`create-api-changelog`: Generates an empty changelog file for temporarily
recording API changes.

`merge-api-changelogs`: Merges temporary changelog files and increments
the API feature level.

help: Add create a to-do list via compose box button tip.

Adds a tip for creating a collaborative to-do list via the new
compose box button in the markdown formatting article.

Edits the include examples for to-do lists so that the note about
marking a task as complete/incomplete is text before the example
screenshot.

Revises the collaborative to-do list article for a missing comma,
and adjusts some line wrapping.

Fixes #33522.

saved snippets: Use em for width, font-size, padding.

stream_list: Fix missing 'go to channel feed' tooltip for topic="".

Earlier, the 'go_to_channel_feed_tooltip' was missing when
hovering over the stream name in left sidebar while being
narrowed to an empty string topic.

This commit fixes the bug.

stream_list: Fix not being narrowed to stream feed on click.

When narrowed to an empty string topic, clicking on the stream
name in the left sidebar should narrow to stream feed.

Earlier, it was not working. This commit fixes the bug.

recent_view_ui: Use `last_visited_topic=undefined` when no topic is set.

This commit updates `last_visited_topic` to be explicitly `undefined`
instead of an empty string when no topic is set.

message_list_view: Remove always_visible_topic_edit.

We no longer have "(no topic)" placeholder for empty string topic,
so there's no need to push for configuring a topic.

compose_state: Remove `empty_topic_placeholder` function.

This commit removes `empty_topic_placeholder` function as
it is no longer used.

message_row: Mock available icons to prevent post-echo reflow.

topic_summaries: Ensure modal takes rendered_markdown class.

move_topic_to_stream: Limit topic name length in modal.

Fixes:
https://chat.zulip.org/#narrow/channel/9-issues/topic/no.20topic.20length.20limit.20in.20move.20modal/with/2097474.

compose: Use em for message-limit-indicator font size.

sidebars: Refactor to remove .default-sidebar-behaviour.

Despite the comment in `ui_init.js`, this class is never in fact
removed, and appears only to add unnecessary complexity to certain
selectors, which are here cleaned up.

help: Document typing notifications for message editing.

help: Update DM page to use modern terminology.

Adds a "Via search box" tabbed section for viewing DMs via the
search box in the web and desktop apps.

billing: Use customer.minimum_licenses for minimum plan check.

Allow for manually setting a minimum_licenses value on a customer
to return that for min_licenses_for_plan in cases where we wanted
to override the general plan minimum for a particular case.

docs: Update changelog for changes in main.

loading_spinner: Add loading spinner to settings page.

Remove "Loading..." text from settings page and replace it
with a spinner.

stars: Hide stars button on locally echoed messages.

stream_settings: Fix height of right pane for two-row header.

kandra: Update Teleport version.

kandra: Update Teleport CA.

cache: Flush caches from all known key prefixes.

When flushing caches, we want to ensure that even processes which may
have a wrong cache-key-prefix know to fetch the latest data from the
database.  This is complicated by the cache-key-prefixes being stored
on disk, and thus checking that every cache delete is not sufficiently
performant.

We store the list of cache-key-prefixes in the cache, itself, with no
prefix.  This cache is updated when a new cache-key is written, and is
also allowed to lapse after 24 hours.  Updating this global cache
entry on new prefix creation ensures that even a
not-yet-restarted-into deployment will have its caches appropriately
purged if changes are made to the underlying data.

However, this both adds a cache-get, as well as multiplies the size of
all cache clears; for large bulk clears (e.g. for stream renames,
which clear the cache for all message-ids in them) this may prove
untenable.

topic_list_data: Add support to filter empty string topic.

We show `realm_empty_topic_display_name` for empty string topics
in the left sidebar.

This commit makes it possible for users to search for
the `realm_empty_topic_display_name` value to filter out empty
string topics.

puppet: Upgrade external dependencies.

webhooks/github: Added support for issue transferred events.

On transferring an issue to another repository, GitHub sends
- a "transferred" event to the old repository's webhook URL,
- and an "opened event", containing links to the old issue,
  to the new repository's webhook URL.

This commit adds support for both events independently.
Fixes: #33450.

message: Take into account usergroups for has_message_access.

stream_data: Users with content access should be able to preview.

Before this, not all users with content access were able to see the
preview button.

message: Allow to send without subscribing if user has content access.

If the user has content access and is part of the
`can_send_message_group`, they can send a message to streams with shared
history. We do not allow them to send messages to stream with protected
history since they it would go into a void and they cannot see the
message later.
See https://chat.zulip.org/#narrow/channel/101-design/topic/shared.20history.20can.20send.20message/with/2095398

composebox: Streams without content access shouldn't be in typeahead.

Other places where we use get_unsorted_subs do not require content
access.
See https://chat.zulip.org/#narrow/channel/101-design/topic/dropdown.20for.20metadata.20access.20stream/near/2096230

streams: Add get_content_access_streams function.

To get content access streams for mention.py, we will now use
get_content_access_streams and we have done a lot more other refactors
in this commit around filter_stream_authorization. Mainly making that
function only to be used for adding subscribers and naming it
accordingly.

user_group: Move UserGroupMembershipDetails from lib/streams.py.

resize_observer: Prevent loop using requestAnimationFrame.

This commit solves the issue where the ResizeObserver loop completes
with undelivered notifications. By using requestAnimationFrame, the
resize event is deferred until after the paint cycle, preventing an
infinite loop caused by consecutive resize triggers before repaint.

deactivated_user: Correctly display deactivated users in the right sidebar.

Fixes: #30797.

help: Improve left sidebar documentation.

- Add instructions for starting new conversations.
- Update style to be more consistent with other pages.

styles: Modify users table spinner css to scale properly with font size.

left_sidebar: Show tooltip only for truncated channel names.

notifications: Render emoji in desktop notifications.

In desktop notifications, we no longer display an emoji's status
code. Instead, we show the corresponding Unicode emoji to
render it properly in desktop notifications. For custom
emojis, we continue to display their name.

Fixes #30598.

Co-authored-by: Tanmay Kumar <tnmdotkr@gmail.com>
Co-authored-by: Tim Abbott <tabbott@zulip.com>

zerver: Remove unnecessary tusd logs during run-dev startup.

Previously, tusd printed unnecessary logs on startup while running
the tools/run-dev script. This commit resolves the issue by setting
the verbose flag to false, which defaults to true if not specified.

The required PR adding this flag was introduced in
https://github.com/tus/tusd/pull/1218.

Fixes #32301.

onboarding: Make new topic instructions point to left sidebar.

message_flags: Add skipped unsubscribed stream ids in the response.

Added `ignored_because_not_subscribed` field in the response of
`/messages/flags/narrow` endpoint.

Fixes a part of #23470.

Co-authored-by: Hemant Umre <hemantumre12@gmail.com>.

inbox: Fix width of inbox search input at different window sizes.

drafts: Add a copy draft button.

This adds a button to the draft overlay that allows the user to copy
the draft to the clipboard.

tooltip_delay: Change the tooltip_delay of restore_draft.

message_length_toggle: Fix tooltip not hidden on narrow change.

We fix tooltip being still visible once collapse / expand tooltip
is visible and user changes narrow by destroying the tooltip when
reference is hidden.

settings: Rearrange "Other settings" section.

copy_and_paste: Use parse instead of fixtures for inline cases.

Fixes: https://chat.zulip.org/#narrow/channel/6-frontend/topic/Use.20original.20markup.20to.20generate.20HTML.20for.20katex.20tests/near/2097702

compose_banner: Update message for no private recipient.

This commit updates the error banner message when no
private recipient is specified.

compose: Disable send button with a default cursor.

This commit is a pre commit to a change that will
introduce banners and tooltips as per various
unmet conditions while composing a message.

To accomodate future changes, the toggling is
switched to conditional addition/removal of the
`disabled-message-send-controls` class while
updating the status of the send button.

Also a default cursor is added and the send
area tooltips are disabled whenever the
`disabled-message-send-controls` class is
present.

compose_banner: Reword no channel selected banner error.

Preparatory commit for #32115.

compose_validate: Refactor conditionals for existing errors.

Pre commit for #32115.

compose_validate: Update state in validate_message_length.

compose: Focus textearea after trying to send empty message.

compose_banner: Assign banner priority.

Assigns priority to banner errors as
mentioned in #32115.

compose: Add tooltip support for invalid messages.

This commit adds tooltip support for various
invalid conditions mentioned in issue 32115.

A `show_banner` positional argument is added
in the `validate` method which has a default
value of true.

The reason behind introducing this is to
not trigger banners on hovering the disabled
send button, since the tooltip message is also
determined using the same validate method.

We want to only disable the button on hover,
which is why the update_send_button_status() method
is called only on "mouseenter" event, which is
added to the send button in compose_setup.js

To incorporate this change a new param is
introduced which determines whether to enable/disable
send_button by running update_send_button_status

Earlier, typing something in the textarea or
recipient box would also trigger
`update_send_button_status` which doesn't
work well since we've introduced a lot of
new booleans which determine whether send
button gets disabled causing send button to
get disabled while typing instead while hovering
Hence this change.

compose_banner: Flash only once for exceeded length.

https://chat.zulip.org/#narrow/channel/101-design/topic/invalid.20message.20border.20flashing/near/2094736

compose: Keep focus on recipient field when input is invalid.

Previously, if an invalid user was entered in the recipient field,
the input box would shake to indicate an error but also move the
cursor to the message field. This was unintended and disrupted the
user experience.

This commit ensures that the focus remains in the recipient field
when the input is invalid, preventing premature cursor movement.

resolved: Rename "Topics marked as resolved" -> "Resolved topics".

Fixes part of #31725.

unresolved: Add support for searching for unresolved topics.

Fixes: #31725.

css: Fix CSS of Notification triggers table in Default user settings.

This commit applies CSS styles to the Notification triggers table in
the Default user settings under Organization settings, similar to how
they are applied to the Notification triggers table in the Notification
settings under Personal settings.

combined-feed-ui: Add placeholder text to empty combined feed.

Also, added live update behaviour to the combined feed narrow.

Fixes #31602.

topic_link_util: Extract get_topic_link_content and helpers.

Refactors the get_fallback_markdown_link to generate some reusable
functions.

popovers: Add x-gfm content type for copied Zulip links.

Copying links to a Zulip element now generate 3 content types:
- plain url, pasteable in address bar and non rich text editor
- HTML, for rich text editors.
- x-gfm, for pasting into GitHub and other services that support
  Markdown, new in this PR.

Fixes: #31813.

help: Improve "Quote or forward a message" intro.

help: Add polls section to "Message formating" article.

Creates an intro and an examples md file for the shared content
on the "Message formatting" article and "Polls" article.

bots: Fix email already in use error message.

Currently the error message is "Username already in use" which is
misleading. This fixes the error message to be correct and consistent
with the same error message for the same check in `create_user_backend`.

narrow_term: Refactor a `NeverNegatedNarrowTerm`.

Previously `NarrowTerm` is only used in our event-handling paths and to
a lesser extent in the `detect_narrowed_window` in `view/home.py`. Both
of which haven't yet support or handle the `negated` term.

Since we're planning to parse a narrow URL into narrow terms (like in
`hash_util.ts`) in the web app, we're going to need a `NarrowTerm`
dataclass with all three flags.

This commit adds the `negated` term to `NarrowTerm` and adds a
`NeverNegatedNarrowTerm` which is a subclass of `NarrowTerm` that always
has the `negated` flag as `False`, so functionally it is the same as the
current `NarrowTerm`.

url_decoding: Add `parse_narrow_url`.

This adds the Python copy of `hash_util.parse_narrow`. In the web app,
it will mainly be used in the import process later on. So, although it
has the same purpose as its frontend twin, there are differences:

- This doesn't convert a user-id-slug into a list of user emails. It
will instead parse it into a list of user IDs, as that is the preferred
form for those kinds of operators. It will also help in later operations
to remap the object IDs during import.

- To the same effect as the first point, operands can be an actual list
or int instead of a list or int as a string (e.g., "12,14,15" or "93").

- It has fewer validations than its frontend counterpart. It doesn't
look up the parsed object IDs for validity. This is partly because of
its main use case in import.

integrations: Remove unused extension variable.

Since 0904d61, we don't support HTML docs, and all docs use `.md`, so we
can remove the extension variable.

integrations: Move big-blue-button logo to the default path.

integrations: Add a default doc path.

integrations: Add class `PythonAPIIntegration`.

For the class of integrations that exist in zulip/integrations
of the zulip/python-zulip-api repo.

python-api-integrations: Map to directory names used in the API repo.

Added a `directory_name` field in PythonAPIIntegration objects to map
each integration to their corresponding directory in
zulip/python-zulip-api.

integration-docs: Add context properties for PythonAPIIntegrations.

Updated the change-zulip-config-file macro to use a newly added
context parameter, demonstrating its purpose.

api_docs: Clarify that bot_storage.contains() operates on the cache.

Fixes #32580

api_docs: Document the context manager for bot storage.

- Added a section for the context manager `use_storage`,
- a section for its two flush methods,
- and updated the "Performance considerations" section, clarifying the
two approaches of accessing bot storage.

docs: Update sections for organization settings tab changes.

Updates help center, integration and contributor docs where for
the new subsections on the organization settings tab, which were
changed in #33605.

Previously, these settings were all in the "Other settings"
subsection for that organization settings tab.

help: Document specifying sender in generate channel email modal.

Documents setting the email sender in the generate channel email
modal that was added in #32581 and #32382.

help: Fix wrong tab label.

help: Add a page on viewing channel information from message view.

user_circles: Match idle icon to active icon.

user_circles: Introduce Vlad's new color schemes.

user_circles: Reduce size to spec in sidebars.

user_circles: Experiment with horizontal gradient on idle circles.

user_circles: Improve gradients in light mode and over avatars.

user_circles: Better fit and position circles over avatars.

user_circles: Show deactivated icon in sidebars, inbox, recents.

send_email: If using AWS, automatically remove from suppression list.

When sending invites and password reminders, ensure that the email
address is not on the AWS SES suppression list.  Addresses often
mistakenly end up on there and are never removed; automatically
removing them, if necessary, before we reach out to attempt a signup
reduces support overhead and perceived buggy behaviour.

composebox_typeahead: Fix topic completion broken for long stream names.

Previous value of `40` didn't account for full length of stream name
which results in topic completion not working for stream names bigger
than that.

compose: Fix topic input box not visible for long stream names.

Since we want the width of the stream name to change responsively,
we need to use either media breakpoints or `vw` to ensure
that the stream name and topic name are visible at all widths.

typeahead: Fix stream description not aligned with stream name.

typeahead: Wrap topic name in topic edit recipient bar form.

Fixes #33288

composebox_typeahead: Fix failing tests.

Fixing test failure from
6d30b10b60064b75ab11ef7db44ac1634bcf8a38.

get_streams: Add `include_can_access_content`.

Also add some query count checks.
See https://chat.zulip.org/#narrow/channel/378-api-design/topic/GET.20.2Fstreams.20with.20new.20permissions/with/2096944
for API design discussion.

get_stream: Rename `include_all_active` to `include_all`.

We keep around the old `include_all_active` parameter for backwards
compatibility.
Web frontend doesn't use this API and thus there were no changes needed
there.

requirements: Patch invalid escape sequences in talon.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

install: Remove --cacert and CUSTOM_CA_CERTIFICATES.

This has been broken for many years and nobody’s complained.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

requirements: Migrate to uv.

https://docs.astral.sh/uv/

Signed-off-by: Anders Kaseorg <anders@zulip.com>

compose: Scale send button with font size.

settings_users: Refactor role filter dropdown creation and setup.

This commit reorganizes the role filter dropdown initialization code
to prepare for implementing live updates of role counts.

settings_users: Live update of role count on activation/deactivation.
Previously, the role count in the active and deactivated users
sections was not updated live upon activation/deactivation.

This commit introduces live updates for the corresponding role
counts.

Fixes: #33566.

composebox_typeahead: Fix bug in generating link syntax.

A minor bug was introduced in #32184 where we didn't check if the
channel name would cause a broken link syntax (and hence should
generate a fallback md link).  This would cause problems when
implementing a shortcut syntax to link to current channel.

Fixes part of #31420.

composebox_typeahead: Improve insertion of link syntax.

We do not need to extract the stream name from typed text as we have
it available in the TopicSuggestion.

composebox_typeahead: Allow easily linking to topics in same channel.

This commit makes it easier to link to topics in the same channel.
Typing `#>` in the compose box replaces it with `#**channel_name>`
and opens the topic_list typeahead.

Channel names producing broken link syntax
are handled by generating a fallback md link
syntax when the topic is chosen.

Fixes #31420

zephyr: Fix compute_mit_user_fullname for py3dns returning bytes.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

api-docs: Describe object format of group-setting as anonymous group.

Revises some additional text in the main description for clarity.

get_realm_with_settings: Fix unnecessary joins with channel.

We were not actually using anything but the IDs here, so it was a
bunch of wasted work to fetch these.

This essentially reverts f48e87cd3cb6846d99db5099cafe604390a9b667. At
the time, something like that was required, because we needed to check
if the channel was deactivated before exposing it to the API, but more
recent reworking of the system to change the setting if the channel is
deactivated, rather than masking it in fetch_initial_state_data, means
we can do this cleanup.

zephyr: Switch from py3dns to dnspython.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

pyproject: Remove py3dns.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

bookend: Add button to subscriber user to channel from bookend.

Add a "Subscribe" link at the end of the
"You are not subscribed to {channel}."
divider, that subscribes the user to the current channel.

bookend: Only show links on the last bookend.

Fixes #33060.

css: Consolidate bookend styles.

css: Move message_length_toggle styles to message_row.css.

The main goal is to have it in the right file, but also it doesn't
need to be nested as it was.

settings: Remove dead CSS for globe icon.

Any globe icon that matches this rule gets font-size
from .large-icon .zulip-icon above, so this font-size
is never used.

subscriptions: Align header icon with flex.

This will help with keeping the icon centered when we update
it to change size with font-size settings.

This CSS technically also applies to user groups but I don't
think there are any icons used there.

settings: Scale zulip icons with font size.

streams: Add new can_subscribe_group permission setting.

Fixes part of #33417.

streams: Modfiy stream permissions to use can_subscribe_group.

Fixes part of #33417.

streams: Use can_subscribe_group setting for checking permission.

This commit adds code to use can_subscribe_group setting in webapp.

Fixes part of #33417.

streams: Remove unused code for can_add_subscribers_group label.

Text shown in parentheses with label for can_add_subscribers_group
was removed in befe49c293c.

streams: Do not fetch can_add_subscribers_group unnecessarily.

In public_stream_user_ids function, which is used to get users
who can access public streams, there is no need to fetch members
of can_add_subscribers_group as we eventually exclude guests
from them and we have already included all non guest users of
the realm.

help: Document fancy HTML pasting of Zulip links.

help: Reorganize left sidebar, especially admin sections.

help: Add article on viewing group members.

help: Note that user cards show deactivation status.

help: Reorganize user card properties to match current UI.

help: Tweak user profile help page.

help: Add introduction to users page.

user_profile: Override default width of input, to avoid overflow.

get_streams: Return metadata access streams in `include_all`.

This parameter is no longer restricted to realm administrators. Any
user can get the streams they have metadata access to by setting this
parameter to true.

stars: Placehold container width in local echo.

user_status: Scale emoji with user's font-size.

user_status: Convert margin to padding for taller hover highlight.

banner: Aligned the username icon for topic header.

This commit fixes the alignment of the user emoji
in the topic header. Previously, the icon in the
user's name was slightly cut off at the top. This
issue was resolved by setting the line height to 19px.

settings: Add backend to change allow_edit_history to integer field.

This commit implements the backend of migrating the
`allow_edit_history` setting to
`message_edit_history_visibility_policy`.
This allows organizations, to have an intermediate setting to
view only the "Moves" history of the messages.

We still pass `realm_allow_edit_history` in `/register` response
though for older clients with its value being set depending on the
value of `realm_message_edit_history_visibility_policy`. We set
`realm_allow_edit_history` to `False` if the
`realm_message_edit_history_visibility_policy` is "None", and
`True` for "Moves only" or "All" message edit history.

Fixes part of #21398.

Co-authored-by: Shlok Patel <shlokcpatel2001@gmail.com>
Co-authored-by: Tim Abbott <tabbott@zulip.com>

settings: Add frontend to change allow_edit_history to integer field.

This commit implements the frontend of migrating the
`allow_edit_history` setting to `message_edit_history_visibility`.
This allows organizations, to have an intermediate setting to
view only the "Moves" history of the messages.

Fixes #21398.

Co-authored-by: Shlok Patel <shlokcpatel2001@gmail.com>
Co-authored-by: Tim Abbott <tabbott@zulip.com>

copy_and_paste: Fix copy pasting LaTeX using navigator.clipboard.

We use getRangedAt(0), since we don't support multiple selections.
So only the HTML/text of the first selection is considered.
See: https://stackoverflow.com/questions/23934656/how-can-i-copy-rich-text-contents-to-the-clipboard-with-javascript/71850835#71850835

Fixes:
https://chat.zulip.org/#narrow/channel/9-issues/topic/pasting.20LaTeX/with/2099736.

copy_and_paste: Improve copying within math blocks.

If you select just one expression,
it gets resolved to an inline expression
We just search for the closest .katex-display and
set its contents in the selection range, which is
basically it's immediate `.katex` child.

In case the focus and anchor belong to different
katex-displays, we restore the original selection
to prevent triggering the inline selection which
would end up selecting only one of the n expressions
you selected.

copy_and_paste: Reuse `execute_copy` for clipboard.

copy_and_paste: Fix typo in explanation comment.

copy_and_paste: Remove redundant math rule.

We have made considerable progress in implementing
KaTeX copy and paste :)

settings: Rename `Filter x` to `Filter` for channel and group settings.

postprocess_content: Drop invalid inline image elements.

These shouldn't exist without bugs in the Markdown processor, but at
least some ancient messages in chat.zulip.org seem to have them.

bots: Do not remove bot from inaccessible streams on owner change.

See
https://chat.zulip.org/#narrow/channel/101-design/topic/manage.20bot.20access.20feature.20removal

search: Fix bug where icon wasn't displaying on narrow screens.

navbar: Remove too-wide fixed width for right portion.

This width should be set for .column-right at wider screens,
which it already is in another CSS rule, so this style was a
duplicate. The duplicate was causing issues because it was
overriding the `width:auto` that comes into play at narrower
screens when the buddy list isn't always visible. When the
header right column is too wide, it covers up the search button
and makes it not hoverable or clickable anymore. This fixes
that.

css: Remove `margin-top` from move messages count if empty.

This commit makes sure that the top margin is unset
from the move messages count paragraph if it is
empty, fixing the layout in the move topic modal.

presence: Fix for last active time for invisible mode.

Co-authored-by: Tim Abbott <tabbott@zulip.com>

presence_data: Fix last_active_time for users with no last_active_time.

There's a rare possibility for a user to have no last_active_time. In
such a case, we always want to fall back to date_joined for displaying
"Last active" in the UI.

Co-authored-by: Tim Abbott <tabbott@zulip.com>

help_center: Update presentation of user circles.

navbar: Move userlist-toggle to be the right most icon.

left_sidebar: Change icon.

We use a different icon whose dashed line version is visible when
left sidebar is visible and solid line version is visible if
left sidebar is hidden.

sidebar_ui: Fix positioning of unread dot on left sidebar toggle button.

This commit fixes the inconsistent positioning of the unread dot
on the left sidebar toggle button. Instead of using fixed pixel
values, the position is now defined using a relative percentage,
ensuring consistent alignment.

The unread dot's dimensions are also expressed in ems for better
scaling and alignment at different font-sizes. And an unnecessary
(and confusing) 0 was removed from the templates.

Co-Authored-By: harshbansal8705 <harsh@harshbansal.in>

copy_and_paste: Split copy and paste.

Note that the puppeteer tests only tested
copying whereas the node tests only tested
pasting, which is why the puppeteer tests
for pasting and node tests for copying are
absent after this split.

help: Update links for information about users to new intro article.

Updates "help/manage-a-user" links that are contextually for general
information about users to go to the new "help/introduction-to-users"
article.

Adds a link to "Manage a user" in the related articles section of
the new intro to users article.

typeahead: Re render header html for every update in user string.

Previously, the typeahead's header html used to be updated only
once -- after it is shown.

This caused stale state in compose box typeaheads -- when user
starts with an `@`, the typeahead is shown for the first time,
and the header html is rendered. Then when next character is
`_` (silent mention), the header html is no longer updated since
it is already updated once when `@` is used.

This is fixed by updating the typeahead everytime the user string
is updated.

typeahead: Clarify that silent mention hint currently applies.

migration: Rename 'general chat' topic to empty string topic.

Zulip now supports empty string as a valid topic name.

For clients predating this feature, such messages appear
in "general chat" topic. Messages sent to "general chat" are
stored in the database as having a "" topic.

This commit adds a migration to rename the existing
"general chat" topic in the database to "".

Fixes parts of #32996.

composebox_typeahead: Add support for empty string topic in textarea.

This commit adds support for empty string topic in compose textarea
typeahead.

compose: Match topic input text color to channel.

compose: Rename placeholder update function for clarity.

compose: Update textarea placeholder with general chat.

compose: Conditionally render placeholder for general chat.

compose: Correctly focus when replying to general chat.

compose: Handle topic-box focus and blur.

compose: Suppress 'general chat' with open recipient widget.

compose: Handle fading with general chat.

This commit also attempts to fix a bug, present in main, where a
draft restored directly to the compose box loses its original topic
upon switching to other topic narrows.

Co-authored-by: Prakhar Pratyush <prakhar@zulip.com>

compose: Correctly restore general-topic drafts.

composebox_topic_typeahead: Add support for empty string topic.

This commit adds support to show `realm_empty_topic_display_name`
value in the composebox topic typeahead for empty string topic.

The item is italicized.

The 'New' label is not shown for empty string topic.

compose_recipient: Early return in on_hidden_callback if no item click.

Previously, the topic / direct message recipient input box was always
focused when the compose select recipient dropdown got closed, even if
the user clicked elsewhere. This resulted in unwanted trigger of
onFocus event listener etc.

This adds an early return to ensure focus updates only when an item
is clicked.

composebox: Show 'Enter a topic (skip for general chat)' placeholder.

Use a more instructive placeholder instead of "Topic" when
topic is not mandatory in a realm.

Updated placeholder:
'Enter a topic (skip for general chat)'.

css_variables: Remove unused breakpoints.

right_sidebar: Rename to right column wherever applicable.

In our css variables, we were using sidebar and column interchangably.
But, sidebar is 10px less wider than the column. This commit makes no
behaviour change, but renames variables to use column where necessary
and uses variable for sidebar instead of a fixed 240px value.

right_sidebar: Set em-based min and max width, flexible column width.

container_queries: Detect spec-aligned support.

Some browsers, notably Safari on both iOS and macOS, are not yet
aligned with the CSS specification, which does not force layout
containment but does force an independent formatting context
(see https://github.com/w3c/csswg-drafts/issues/10544).

The little test here will allow us to deliver em-aware container
queries to browsers that are spec aligned, and fall back to media
queries in browsers that are lagging.

app_layout: Establish containers for spec-aligned browsers.

container_queries: Establish new breakpoints.

container_queries: Add baseline container queries and fallbacks.

viewports: Re-engineer breakpoint detection from JavaScript.

right_sidebar: Better handle manually hidden right sidebar.

With the larger, flexibly sized right sidebar, we want to allow
for the middle column to expand to fill its place even outside of
the "Use full width on wide screens" setting.

navbar_search: Adjust z-index to keep collpased search clickable.

specator_view: Prevent large login button from colliding with search box.

navbar: Remove realm navbar icon logo.

install-node: Upgrade Node.js from 22.12.0 to 22.14.0.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

tests: Remove unusual ‘this’ usage.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

eslint: Fix unicorn/consistent-assert.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

eslint: Fix unicorn/consistent-date-clone.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

dependencies: Upgrade JavaScript dependencies.

Signed-off-by: Anders Kaseorg <anders@zulip.com>

message: Allow accessing archived channel when not modifying message.

Fixes #33567.

We have used the flag `is_modifying_message` since it's more generic
than an archived channel specific flag and helps us understand better
what is the condition where we do not want to allow archived channels.
We have not added tests for message edit since it  has an existing test
for this.

help: Document "general chat" topic.

help: Document nice syntax for linking in the current channel.

buttons: Use snake_case for the button handlebars template filenames.

This renames the button handlebars template filenames to follow the
snake_case naming convention used throughout the codebase.

buttons: Add option in hbs template to enable squared icon buttons.

inline_topic_edit: Hide all recipient bar controls on topic edit.

This commit hides all the recipient bar controls from the recipient
bar when the topic edit UI opens.

Previously we used to only hide some of the controls while some other
were still visible alongside the save and cancel buttons from the
inline topic edit UI which led to confusion.

inline_topic_edit: Improve design of inline topic edit UI.

This commit improves the design of the inline topic edit UI by making
the following changes:
- Increases the dimensions of the text input element.
- Fixes the font scaling inside text input element.
- Replaces the old save and cancel buttons with the new icon buttons.

Fixes #33155.

buttons: Set "button" type to prevent default submission in forms.

inline_topic_edit: Change ID->Class since multiple instances can exist.

Since multiple inline topic edit forms can exist in a channel feed, when
multiple topic names are being edited, we change the ID to classname.

inline_topic_edit: Fix keydown logic inside the inline topic edit form.

Previously, anytime Enter was pressed anywhere inside the inline topic
edit UI, it led to the submission of the form. This logic resulted in
the unintentional saving of the new topic name when Enter was pressed
even on the cancel button; which should have actually closed the inline
topic edit UI instead.

This commit makes sure to only save the new topic name when the user
presses enter when focused on the text input element or the save button.

inline_topic_edit: Remove overflowing error text on saving empty topic.

inline_topic_edit: Show invalid input error visually on empty topic.

This commit adds the `invalid-input` class to the inline topic edit
input element when the new topic name is considered empty as a result
of realm_mandatory_topics property being set to True. This adds the
red glow borders to the invalid input field, which visually
communicates that some thing is wrong with the new topic name.

inline_topic_edit: Disable save button and show tooltip on empty topic.

This commit disables the save button when the topic name is considered
as empty as part of the `realm_mandatory_topics` being set to True.

Since disabled elements do not fire events, it is not possible to
trigger tippy tooltips on disabled elements – such as the Save button
in the inline topic edit UI. Thus this commit adds a tooltip to the
disabled save button by wrapping/unwrapping it inside a `span` wrapper
pragmatically via the `ui_util.disable_element_and_add_tooltip` and
`ui_util.enable_element_and_remove_tooltip` helper methods.

inline_topic_edit: Update styling for confirm and cancel buttons.

popovers: Disable move-messages count due to logic errors.

Until we've fixed the bugs that display incorrect numbers, this is a
simple way to hide the component.

This will be reverted once #32892 is complete.

message_edit_history: Fix empty string topic not displaying correctly.

Earlier, for topic-edit involving empty string topic the rendered
topic name was not buggy.

We used to display `""` instead of `realm_empty_topic_display_name`
with proper styling.

This commit fixes the bug.

hotkey: Fix `=` to toggle reaction results in error.

Fixes #33574

This was due to the method used to get the emoji name was incorrect.

streams: Do not archive vacant private streams.

We no longer archive private streams when they become vacant,
since user can still have permissions to subscribe to it.

And streams can anyways be archived manually if needed.

Fixes #33689.

github: Include old issue number in transfer message for new repo.

This commit updates the GitHub webhook integration to include the
old issue number in the transfer message sent for the new repository,
alongside the old repository's full name.

typeahead: Scale header text with font size.

typeahead: Show ellipsis for overflowing primary text.

Fixes #31392

migration: Handle conflict in UserTopic when topic="" pre-exists.

When a channel has both "general chat" and "" topic and a user
has visibility policy configured for both the topics, then
the migration to rename "general chat" to "" resulted in error
as it violated '(user_profile_id, stream_id, lower(topic_name)'
unique constraint.

This commit fixes the error.

For each row with topic="general chat", we create a new row
with topic="". On conflict we update the visibility policy
of the existing row -- we prefer the visibility policy of
'general chat' topic over "" as we're renaming 'general chat'
to "" so the configured policy of 'general chat' should be
preferred and any "" topic created wouldn't be intentional
or would be for testing purpose as it is not announced yet.

Finally, we delete the rows with "general chat" topic.

groups: Rename AnonymousSettingGroupDict to UserGroupMembersDict.

This change is done because we would use the same data structure
for named user groups as well in future commits.

user_groups: Refactor code in user_groups_in_realm_serialized.

Following improvments are done in user_groups_in_realm_serialized-
- Members and subgroups are fetched using a single query using
union.
- Query to fetch groups now does not fetch setting fields since
we already have the members and subgroups of all the setting
groups and we can check if setting group was a named group
or not directly without checking named_user_group field of
UserGroup object as we have IDs of all named groups of the realm.

register: Optimize computing realm group setting values.

We do not fetch all the realm group settings using
select_related for register data now since it takes a
lot of time in planning phase. This commit updates
the code to fetch all the members and subgroups data
in user_groups_in_realm_serialized so that we do not
need to access each setting group individually.

user_groups_in_realm_serialized is updated to send the
required data accordingly.

Fixes #33656.

right_sidebar: Improve available space in buddy list.

right_sidebar: Perfectly align all right-sidebar vdots.

sidebar_vdots: Scale vdots areas to maintain square target.

compose_banner: Fix automatic visibility policy banner rendering.

Earlier when a new user sent a message in empty string topic,
it resulted in an error while displaying the automatic new
visibility policy banner.

'topic_name' was missing.

This commit fixes the bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to disable noisy log output to stdout on startup
3 participants