Skip to content

Add support for paging through randomly sorted results#122

Merged
rahulbot merged 4 commits into
mainfrom
feature-paged-random
May 15, 2026
Merged

Add support for paging through randomly sorted results#122
rahulbot merged 4 commits into
mainfrom
feature-paged-random

Conversation

@rahulbot
Copy link
Copy Markdown
Contributor

This adds client-side support for the new admin-only randomize option for story_list (pairs with mediacloud/web-search#1297).

All the test cases in the SearchStoriesTest, which is the only one I edited, pass for me locally.

Note that in the api client here I called the param randomized so that the name matches expanded. But on the server this is called randomize (without the d). I thought it better to catch and fix that here even though I missed it on the server, so it is inconsistent with rest of stack's implementation of this feature. However, now the two param names match in the API client, which will be seen by our eyes more often than the server-side usage. Open to reconsidering.

@rahulbot rahulbot requested a review from philbudne May 15, 2026 15:44
Copy link
Copy Markdown
Contributor

@philbudne philbudne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional[bool] = None seems odd to me, Optional[bool] is an old/back-compatible form of bool | None.

I suggest just declaring it defaulting to False randomize: bool = False

(approved regardless)

@rahulbot rahulbot merged commit cefa224 into main May 15, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants