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

Message editing: interaction of search with edited messages #354

Open
dkasak opened this issue Dec 7, 2019 · 3 comments
Open

Message editing: interaction of search with edited messages #354

dkasak opened this issue Dec 7, 2019 · 3 comments
Labels
A-Message-Editing A-Timeline-Search O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Z-Synapse

Comments

@dkasak
Copy link
Member

dkasak commented Dec 7, 2019

Description

Message edits and the search functionality do not currently work well together. When a message is edited and then its new content searched for, Riot includes it in the number of results reported but the search result itself is not displayed.

Note that searching for the old term does include the edited message as a result, but since the message content is now changed, it can be confusing to see a result when it doesn't contain the term you searched for. This might warrant some UX changes.

Steps to reproduce

  1. Create a new room (optional, but for predictability).

  2. Send a message with the content foo.

  3. Search for foo.

    Riot says there is "~1 result" and the message foo is displayed among the results.

  4. Edit foo to bar.

  5. Search for bar.

    Riot still says there is "~1 result" but now the message is no longer shown in the list of results. The list simply says "No more results".

  6. Search for foo.

    Riot again says "~1 result" and the message bar is shown. This is good, but the UI should somehow indicate that the result is based on an earlier version of the message or even simply that the message was edited. Unlike in the regular room view, in the search view there is no button (edited) indicating this.

Searching for both foo and bar should yield the message in question as the result. Searching for foo should also indicate that the result is based on an earlier version.

Version information

I tested the above behaviour with both Riot Desktop 1.5.5 and https://riot.im/develop.

@kittykat kittykat added T-Defect S-Major Severely degrades major functionality or product features, with no satisfactory workaround O-Occasional Affects or can be seen by some users regularly or most users rarely X-Needs-Community-Testing labels Mar 31, 2022
@t3chguy
Copy link
Member

t3chguy commented Apr 12, 2022

When a message is edited and then its new content searched for, Riot includes it in the number of results reported but the search result itself is not displayed.

The count is provided by the server, it is also shown as an estimate with the ~

https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3search

count integer An approximate count of the total number of results found.

@turt2live
Copy link
Member

This would be a server-side issue, I think.

image

Element can't reasonably post-process these events if they're far enough in the timeline, so the server should be indexing the current version of the event rather than all versions of the event, I believe.

Not sure if the spec allows this - if it doesn't, we should make it allow it.

@dkasak
Copy link
Member Author

dkasak commented May 17, 2022

I'm reopening since we do also have client-side search (for encrypted rooms, via Seshat) and that is also affected with the same problem.

Thinking from a pure perspective of an Element user, this behaviour is surprising and a deficiency, and so should be tracked somewhere IMO, so that we can work towards the resolution. (The user will not necessarily understand or care what Synapse is, or perhaps even Matrix.) Perhaps it would make sense to open a corresponding issue in element-meta?

Sidenote:

so the server should be indexing the current version of the event rather than all versions of the event, I believe.

Personally, I like the behaviour of searching over all versions since the information is there anyway.

@dkasak dkasak reopened this May 17, 2022
@novocaine novocaine transferred this issue from element-hq/element-web May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Message-Editing A-Timeline-Search O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Z-Synapse
Projects
None yet
Development

No branches or pull requests

6 participants