Refs #580: Add bounty list JSON shortcut#596
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe PR adds a ChangesBounties JSON API results link
Possibly related PRs
🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
Actionable comments posted: 0 |
Squirbie
left a comment
There was a problem hiding this comment.
Reviewed PR #596 at current head d868ec4 and approved. Evidence: inspected app/public_routes.py, app/templates/bounties.html, tests/test_public_routes.py, and tests/test_bounty_pages.py. Confirmed the new bounties JSON shortcut mirrors the public /bounties state into /api/v1/bounties, preserving normalized status, trimmed q, non-default sort, and limit, while leaving the default unfiltered URL as /api/v1/bounties. Also checked that q="issue #580" encodes as issue+%23580, rendered query separators are escaped in HTML, and the change does not touch auth, admin, payout, wallet, treasury, or mutation paths. Validation: focused public/bounty page tests -> 4 passed; ruff check -> passed; ruff format --check -> already formatted; mypy app/public_routes.py -> success; docs smoke -> ok; git diff --check origin/main...HEAD -> clean; git merge-tree --write-tree origin/main HEAD -> clean. I refreshed origin/main before reviewing; the actual current-base diff is 4 files / 33 insertions, so the earlier repository-initialization warning is not present against current origin/main.
eliasx45
left a comment
There was a problem hiding this comment.
Reviewed current head d868ec43895ac1d40509c04d85ee149f1d5b5e99.
Verdict: approve.
This is a clean public-page shortcut for #580. The /bounties page now exposes the matching JSON API URL for the current view, while preserving the same public-list controls instead of sending users to a generic unfiltered API result.
Evidence:
- Inspected
app/public_routes.py,app/templates/bounties.html,tests/test_public_routes.py, andtests/test_bounty_pages.py. _bounties_api_url()carriesstatus, trimmedq, non-defaultsort, andlimitinto/api/v1/bountiesusingurlencode.- Default
/bountiescorrectly links to/api/v1/bountieswithout an empty query string. - Filtered cases preserve the active view, including
status=paid,q=public,sort=reward, andlimit=2; the rendered template escapes&as expected in HTML. - The change is distinct from the activity JSON shortcut, wallet-list GitHub links, and account-claim CTA PRs.
Validation:
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .\.venv\Scripts\python.exe -m pytest tests\test_public_routes.py tests\test_bounty_pages.py::test_bounties_page_renders_and_filters_by_status tests\test_bounty_pages.py::test_bounties_page_honors_limit_filter -q-> 4 passed.PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .\.venv\Scripts\python.exe -m pytest tests\test_bounty_pages.py tests\test_public_routes.py -q-> 14 passed..\.venv\Scripts\python.exe -m ruff check app\public_routes.py tests\test_public_routes.py tests\test_bounty_pages.py-> passed..\.venv\Scripts\python.exe -m ruff format --check app\public_routes.py tests\test_public_routes.py tests\test_bounty_pages.py-> 3 files already formatted.git diff --check origin/main...HEAD-> clean.git merge-tree --write-tree origin/main HEAD-> clean merge tree.
I do not see a blocker in this bounty-list JSON results link.
Refs #580
Summary
View JSON resultsshortcut to the public/bountiespage.status,q, non-defaultsort, andlimit.Why
The human bounty list already supports status filters, text search, sorting, and row limits. The matching API endpoint already supports the same workflow, but contributors and maintainers had to manually rewrite
/bounties?...into/api/v1/bounties?...to inspect the machine-readable result set. This adds the missing bridge from the public list to the exact JSON result set being viewed.Distinctness
Validation
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python -m pytest tests/test_public_routes.py tests/test_bounty_pages.py::test_bounties_page_renders_and_filters_by_status tests/test_bounty_pages.py::test_bounties_page_honors_limit_filter -q-> 4 passed, 1 warningPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python -m pytest tests/test_bounty_pages.py tests/test_public_routes.py -q-> 14 passed, 1 warningPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python -m pytest -q-> 478 passed, 1 warninguv run --extra dev ruff check app/public_routes.py tests/test_public_routes.py tests/test_bounty_pages.py-> passeduv run --extra dev ruff format --check app/public_routes.py tests/test_public_routes.py tests/test_bounty_pages.py-> 3 files already formattedPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python scripts/docs_smoke.py-> docs smoke okPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python -m mypy app/public_routes.py-> successgit diff --check-> cleanNo private data, wallet material, credentials, production mutation, fund movement, MRWK price/off-ramp claims, exchange/liquidity claims, bridge claims, or fabricated payout claims are included.
Summary by CodeRabbit
New Features
Tests