Internal - Room Search Fix#721
Open
nushea wants to merge 1 commit intoSableClient:devfrom
Open
Conversation
7w1
approved these changes
Apr 28, 2026
Member
7w1
left a comment
There was a problem hiding this comment.
how tf does this fix it lol what did we break
Contributor
Author
i honestly am not completely sure either, i just tried to nail it with git blame for some 2h and couldnt get it, then i started playing around at random with the code and found that allRooms kept rerendering, but only when it had a toSorted function, so const allRooms = useAtomValue(allRoomsAtom).toSorted(factoryRoomIdByActivity(mx));if you remove the toSorted const allRooms = useAtomValue(allRoomsAtom);it doesnt trigger the issue, it works const allRooms = useAtomValue(allRoomsAtom).toSorted((a, b) => a.length - b.length);which is a nothingburger sorting, it still crashes |
Member
|
lovely |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the rerender cycle by making it sure it redoes the math if the state changes instead
It doesn't have or need a changelog as it is a bug encountered only in the dev branch
Fixes #
Type of change
Checklist:
AI disclosure:
The callas disregard for the state of the room compelled and educated in writing the pr 😔😔😔