Drop the legacy `X` suffix from `GetMasterX` and `GetReplicaX`. The
presence of the suffix suggests there's a `non-X` version: but in fact
we migrated these away a long time ago, so remove the cognitive
overhead.
As an aside, this additionally helps avoid trip up LLMs that interpret
this as "something to fix".
We were incorrectly not broadcasting status cache updates
inspite of that being an LRU cache.
We were also not doing it for profilesInChannel cache.
Now we fix it by properly checking the invalidationEvent
which is something local to the cache itself rather
than the cache provider.
https://mattermost.atlassian.net/browse/MM-62077
```release-note
NONE
```
* Add dummy MMReduxAction type and use it in its ActionFunc types
* Use MMReduxAction in mattermost-redux reducers
I updated most reducers except for the following:
- I couldn't figure out how to type the request reducers because of
handleRequest, and it wasn't worth spending time on because it's
stable and we don't really use those.
- The typing reducers are weird because they use WS event names as
constants. They should be given their own action types separate from
the event names, and they probably shouldn't be in mattermost-redux.
There's also a few places that still use AnyAction, but those are for
helpers for individual reducers. In the future, we should probably pass
the data from the action directly into those.
* Add dummy MMAction type and use it in the web app ActionFunc types
* Use MMAction in web app reducers
* Re-export ActionFunc types from mattermost-redux from types/store
* Start using ActionFunc types from types/store instead of mattermost-redux
These are all the places where the type checker failed when I added the
web app version of ActionFunc. I'll move all the other files in a
separate commit.
* Use ActionFunc types from types/store everywhere outside mattermost-redux
* Make types/store versions of ActionFunc use web app GlobalState
* Stop passing GlobalState into ActionFunc explicitly
* Stop casting as GlobalState where it's no longer needed
* Prevent importing mattermost-redux version of ActionFunc in the rest of the app
* Fix no-restricted-imports applying incorrectly to mattermost-redux and types/store
This introduces a new entry in the `Main Menu -> About` modal with the hostname of the currently connected websocket. This will be used to aid debugging issues in clustered environments by showing which node in the cluster is servicing requests for a particular websocket.
This information is only visible in self-managed instances. It will not be visible on cloud instances.
This removes the search input text lowercasing from the
`EmojiPickerSearch` component, where it is used as the text displayed to
the user.
Instead, filter lowercasing is done in the `getFilteredEmojis` function
to make emoji search case-insensitive.
Signed-off-by: Kuruyia <github@kuruyia.net>
* [MM-61477] Fixed exif rotates images width and height is not correctly calculated
* [MM-61477] Apply rotation ony to png or jepg
* [MM-61477] Added test cases to verify correct rotation
* fix: fixed wrong format
* uff
* fix: exif rotation is only possible on jpeg images
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
We create a custom histogram metric that logs the userID
when the observed value is greater or equal to the last bucket value.
This allows us to start tracking the slowest users of a system
while at the same time not polluting the Prometheus metrics
by storing a userID for every observation.
https://mattermost.atlassian.net/browse/MM-61887
```release-note
NONE
```
* Fix scrollbar not clickable due to being covered by toaster
* Apply suggestions from code review
---------
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
While investigating code paths during
Redis downtime, I found out that the library
by default retries indefinitely for read commmands.
This leads to it being stuck in a loop
while trying to read anything from Redis.
We fix that by disabling retry.
Secondly, we adjust the ConnWriteTimeout
value slightly from its default of 10s
which is a bit too high for normal working
conditions.
Ref: https://github.com/redis/rueidis/issues/680
```release-note
NONE
```
Page load is one of the metrics that we track and present
to MLT. However, in its current form, it is not very
actionable because it also contains the network latency.
We split the whole metric into these parts:
startTime
|
responseStart = TTFB
|
responseEnd = TTLB
|
domInteractive = Start of processing phase
|
loadEventEnd = Load complete
This gives us better visibility into exactly
which phase in the load process is slow.
I have experimented with other metrics like
- domContentLoadedEventStart
- domContentLoadedEventEnd
- domComplete
and observed that they do not have sufficient
gaps in the timespan to have any relevance.
Additionally, I have moved TTFB from being a
web vitals metric to being tracked from the performance
metrics to remain consistent with the other navigation
metrics measured.
Lastly, I took this chance to improve some of the
validation errors that we threw to include more
context into the input that was passed and why
does it fail.
This also meant that I had to change the tests
to check for error strings rather than direct
errors which is a bad thing, but I don't think
it's worth the effort trying to have named error
variables for all of them.
https://mattermost.atlassian.net/browse/MM-61886
```release-note
NONE
```
* Fix MM-61710
* Fix test
* Make more secure the secureGetFromRecord
* Revert changes related to redux posts
* Move segureGetFromRecord
* Fix test
* Use hasOwn
* Address feedback
---------
Co-authored-by: Mattermost Build <build@mattermost.com>