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 Search setting description is broken #1876

Open
kolAflash opened this issue Sep 17, 2024 · 0 comments
Open

Message Search setting description is broken #1876

kolAflash opened this issue Sep 17, 2024 · 0 comments
Labels
A-Search A-Seshat A-Timeline-Search O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect

Comments

@kolAflash
Copy link

kolAflash commented Sep 17, 2024

Steps to reproduce

Open:
All settings -> Security and Privacy -> Message Search -> Manage

There's a label saying:
How fast should messages be downloaded
The input field shows a default value of 3000.

PROBLEM: This description provides no information what that setting is about.
Is How fast should messages be downloaded a question?
If yes, I'd answer: as fast as possible
So should I enter as fast as possible into the text field? Probably not.
There's not even a unit, telling if 3000 is maybe something like seconds, minutes or lightyears.

Expected outcome

A proper description of the setting.

 


 

I've tried to find the answer searching through the source...

I found the German translation of the How fast should messages be downloaded string:
https://github.com/element-hq/matrix-react-sdk/blob/c24661f660ed25bfff94697c808a3f9679658517/src/i18n/strings/de_DE.json#L2652
It points to the message_search_sleep_time identifier, which points here:

https://github.com/element-hq/matrix-react-sdk/blob/c24661f660ed25bfff94697c808a3f9679658517/src/async-components/views/dialogs/eventindex/ManageEventIndexDialog.tsx#L173

                        label={_t("settings|security|message_search_sleep_time")}
                        type="number"
                        value={this.state.crawlerSleepTime.toString()}
                        onChange={this.onCrawlerSleepTimeChange}

https://github.com/element-hq/matrix-react-sdk/blob/c24661f660ed25bfff94697c808a3f9679658517/src/settings/Settings.tsx#L1005

    "crawlerSleepTime": {
        supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
        displayName: _td("settings|security|message_search_sleep_time"),
        default: 3000,
    },

 

crawlerSleepTime then points here:
https://github.com/element-hq/matrix-react-sdk/blob/c24661f660ed25bfff94697c808a3f9679658517/src/indexing/EventIndex.ts#L429

            // Don't let the user configure a lower sleep time than 100 ms.
            sleepTime = Math.max(sleepTime, 100);

Good to know! The unit is milliseconds.

By the way, a smaller improvement:
Limit the setting itself to 100 instead of maxing the read out value. So the user knows it sees that it's set to >= 100.

I'm not sure what the rest of the code does.
Do I assume correctly that this is about the maximum time the search will work. And after that time it aborts the search?

Another additional proposal:
The Search-UI should inform the user when it stopped searching. And instead of a global setting the Search-UI could provide a "continue search" button, which continues the search for another 3000 milliseconds.

Operating system

Debian-12 GNU/Linux

Application version

1.11.77

How did you install the app?

https://flathub.org/apps/im.riot.Riot

Homeserver

matrix.org

Will you send logs?

No

@dosubot dosubot bot added A-Seshat O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist labels Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Search A-Seshat A-Timeline-Search O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect
Projects
None yet
Development

No branches or pull requests

2 participants