Guess Kate won't finish this PR, so I will take over...
I've updated the PR and fixed some obvious bugs, adjusted the tests and also made search category and count available as segments
Should be ready for a review now
There are some tests that are failing, including one UI test that looks non-trivial to fix, otherwise looks good to merge to me.
@diosmosis the failing plugin tests simply needs to be update in the submodule. Would do that before merge. But which UI test are you referring to? I think all of those failing here might also fail on 4.x-dev. (some of them started failing after merging 3.x-dev to 4.x-dev)
@sgiehl there was an actions report that was failing but I don't see it anymore, I'm not sure what happened there. I guess ignore my comment.