Add public bounty sort options#255
Closed
ayskobtw-lil wants to merge 1 commit into
Closed
Conversation
MolhamHamwi
approved these changes
May 25, 2026
Contributor
MolhamHamwi
left a comment
There was a problem hiding this comment.
No blockers found.
Specific evidence checked:
- Inspected
app/main.pyand confirmed/api/v1/bountiesand/bountiesboth pass the newsortparameter through the samelist_bounties_by_status()path, so the API and HTML page cannot drift on the accepted sort names. - Checked the SQL ordering for
remaining:(Bounty.max_awards - Bounty.awards_paid).desc(), Bounty.id.desc()correctly prefers bounties with more unfilled award slots and has a deterministic newest tie-breaker. - Reviewed
app/templates/bounties.htmllink construction and verified the status/search filters preserve the selected non-default sort, while the defaultnewestpath avoids extra query params. - Ran
uv run --python 3.12 --extra dev python -m pytest tests/test_bounty_pages.py -qon PR head: 5 passed. - Ran
uv run --python 3.12 --extra dev python -m ruff check app/main.py tests/test_bounty_pages.pyanduv run --python 3.12 --extra dev python -m ruff format --check app/main.py tests/test_bounty_pages.py: both passed.
weilixiong
approved these changes
May 25, 2026
Owner
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.
Refs #164
What changed:
sortquery option to the public bounty API and/bountiespage.newest,reward, andremainingordering so contributors can scan the board by newest items, highest reward, or open award slots.Verification:
python -m pytest tests/test_bounty_pages.py -q-> 5 passedpython -m pytest tests/test_bounty_pages.py tests/test_api_mcp.py tests/test_activity.py -q-> 49 passed, 1 warningpython -m pytest -q-> 206 passed, 2 warningspython -m ruff check app/main.py tests/test_bounty_pages.py-> passedpython -m ruff format --check app/main.py tests/test_bounty_pages.py-> passedpython -m mypy app-> successpython scripts/docs_smoke.py-> docs smoke okpython scripts/check_agents.py-> AGENTS.md okgit diff --check-> cleanNo secrets, wallet material, deployment values, private vulnerability details, or MRWK price claims are included.