Skip to content

Search results should show recipient headers for every message #1550

Open
@neiljp

Description

@neiljp

Bug description

When searching (for text, our only option right now), it is possible to end up with results that show messages adjacently under the same heading (recipients, conversation).

This can be confusing, since these messages may be in the same conversation, but there may be messages between them that do not meet the search criteria (filter text), and it appears that the messages simply follow one another.

This was partially inspired by # design > Date indicators in search results.

How is the bug triggered?

How can you reproduce the bug?

Currently:

  1. Go to All messages view in ZT
  2. Search for the text (eg. /, 'date indicators', Enter)
  3. (Possibly scroll up/down to look for examples)
  4. Observe multiple conversations with adjacent messages under the same header line

Repeating in the web app shows each message with its own equivalent of our header line

A few examples with this search text are:

  • # api design > trimming date_joined (two messages on 27 & 31 July 2024, separated by others)
  • # design > Date indicators in search results (two time-adjacent messages)

What did you expect to happen?

In the web client, this appears to be resolved by showing the recipient (conversation) header for every message in a search result.

While extra lines are at a premium in a terminal, we should show extra header lines a similar way, ie. showing the message recipient line above each message.

Note that it should not display the recipient part of the header in conversation views (specific DMs, topics), just like now, since the header information is in the part above that already.

We should also ensure the message line with the status/author/date, particularly the date, should always be shown - that is the default with the current code, except for two messages written to the same conversation within a narrow time window by the same sender. We should ensure the date appears in every message, when such messages are split by a recipient header, once this feature is implemented.

How are you running the application?

Please include as many of the following as possible:

  • Zulip-terminal version: main in September 2024
  • Zulip server version(s): chat.zulip.org
  • Operating system (and version): Debian
  • Python version (and implementation): CPython 3.9

Related future follow-ups

  • To save space, we might be able to 'fold' conversations where eg. the search text is in a topic name. That would avoid showing every matching message, along with the title bar for each.
  • Highlighting search terms in search results.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions