fix(ui): build valid search query when toggling favorites sort#13217
Open
ChristophWurst wants to merge 1 commit into
Open
fix(ui): build valid search query when toggling favorites sort#13217ChristophWurst wants to merge 1 commit into
ChristophWurst wants to merge 1 commit into
Conversation
Enabling the favorites-first preference while no search was active set the query to the literal string "undefined not:starred", hiding all messages until the next reload. Disabling it left an empty string behind, which produced filters with a leading space and split the envelope cache into separate lists. Assisted-by: Claude:claude-fable-5 Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
Member
Author
|
/backport to stable5.10 |
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.
Enabling the favorites-first preference while no search was active set the query to the literal string "undefined not:starred", hiding all messages until the next reload. Disabling it left an empty string behind, which produced filters with a leading space and split the envelope cache into separate lists.
How to test
main: the UI will alternate between fav/non-fav split and a single list, but the single list will sometimes only have the non-favs and no favs.
here: the UI will alternate between fav/no-fav split and a single list that always contains the favs too
You can also pay close attention to the XHR URLs that happen on goggle. On main there is a message fetch with
filter=+not:starred-> notice the leading+. That means empty string + a filter. The frontend will therefore store the result in separate array keys.Assisted-by: Claude:claude-fable-5
🤖 AI (if applicable)