Skip to content

Add public bounty sort options#255

Closed
ayskobtw-lil wants to merge 1 commit into
ramimbo:mainfrom
ayskobtw-lil:bounty-sort-public-bounties
Closed

Add public bounty sort options#255
ayskobtw-lil wants to merge 1 commit into
ramimbo:mainfrom
ayskobtw-lil:bounty-sort-public-bounties

Conversation

@ayskobtw-lil
Copy link
Copy Markdown
Contributor

Refs #164

What changed:

  • Add a sort query option to the public bounty API and /bounties page.
  • Support newest, reward, and remaining ordering so contributors can scan the board by newest items, highest reward, or open award slots.
  • Preserve active status and search filters across the new sort links.
  • Add regression coverage for API ordering, page ordering, link preservation, and invalid sort validation.

Verification:

  • python -m pytest tests/test_bounty_pages.py -q -> 5 passed
  • python -m pytest tests/test_bounty_pages.py tests/test_api_mcp.py tests/test_activity.py -q -> 49 passed, 1 warning
  • python -m pytest -q -> 206 passed, 2 warnings
  • python -m ruff check app/main.py tests/test_bounty_pages.py -> passed
  • python -m ruff format --check app/main.py tests/test_bounty_pages.py -> passed
  • python -m mypy app -> success
  • python scripts/docs_smoke.py -> docs smoke ok
  • python scripts/check_agents.py -> AGENTS.md ok
  • git diff --check -> clean

No secrets, wallet material, deployment values, private vulnerability details, or MRWK price claims are included.

Copy link
Copy Markdown
Contributor

@MolhamHamwi MolhamHamwi left a comment

Choose a reason for hiding this comment

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

No blockers found.

Specific evidence checked:

  • Inspected app/main.py and confirmed /api/v1/bounties and /bounties both pass the new sort parameter through the same list_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.html link construction and verified the status/search filters preserve the selected non-default sort, while the default newest path avoids extra query params.
  • Ran uv run --python 3.12 --extra dev python -m pytest tests/test_bounty_pages.py -q on PR head: 5 passed.
  • Ran uv run --python 3.12 --extra dev python -m ruff check app/main.py tests/test_bounty_pages.py and uv run --python 3.12 --extra dev python -m ruff format --check app/main.py tests/test_bounty_pages.py: both passed.

Copy link
Copy Markdown

@weilixiong weilixiong left a comment

Choose a reason for hiding this comment

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

Review ✅ APPROVED

LOW — adds sort parameter to bounty list. Clean implementation. MW #219 + #164.

@ramimbo ramimbo added the mrwk:rejected Submission rejected label May 26, 2026
@ramimbo
Copy link
Copy Markdown
Owner

ramimbo commented May 26, 2026

Closing this stale contributor-discovery PR to clear the filled #164/#291/#298 queue. Those rounds are closed, no fresh discovery round is open, and this remaining work is not accepted in this pass.

@ramimbo ramimbo closed this May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mrwk:rejected Submission rejected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants