Skip to content

Add source filter reset link on bounties page#894

Open
xiefuzheng713-alt wants to merge 1 commit into
ramimbo:mainfrom
xiefuzheng713-alt:codex/bounty-summary-links-845
Open

Add source filter reset link on bounties page#894
xiefuzheng713-alt wants to merge 1 commit into
ramimbo:mainfrom
xiefuzheng713-alt:codex/bounty-summary-links-845

Conversation

@xiefuzheng713-alt
Copy link
Copy Markdown

@xiefuzheng713-alt xiefuzheng713-alt commented Jun 4, 2026

Refs #845

What changed

  • Added a clear_source_filter_url to the public bounties page context.
  • Shows a Clear source filter link when the list is filtered by source repo and/or issue number.
  • Preserves other contributor filters such as status, query text, sort, limit, and availability when clearing only the source lane.
  • Added direct regression coverage for preserving limit and availability after CodeRabbit review feedback.

Why

Source-filtered bounty list links are useful for routing contributors from a GitHub issue to matching public bounty rows, but the page previously only described the active source filter. This gives contributors a direct way back to the broader filtered bounty list without manually editing the URL.

Validation

  • uv run --python 3.12 --extra dev python -m pytest tests/test_bounty_pages.py tests/test_public_routes.py -q -> 25 passed, 1 existing Starlette/httpx warning
  • uv run --python 3.12 --extra dev ruff check app/public_routes.py tests/test_public_routes.py tests/test_bounty_pages.py -> passed
  • uv run --python 3.12 --extra dev ruff format --check app/public_routes.py tests/test_public_routes.py tests/test_bounty_pages.py -> 3 files already formatted
  • uv run --python 3.12 --extra dev mypy app/public_routes.py -> success
  • uv run --python 3.12 --extra dev python scripts/docs_smoke.py -> docs smoke ok
  • git diff --check origin/main...HEAD -> clean
  • git merge-tree --write-tree origin/main HEAD -> clean tree 38fcf622f7e1a428f17a13830dda90e828042614

Scope: public bounty list contributor navigation only. No ledger, wallet, treasury, payout, proposal execution, admin-token behavior, private data, exchange, bridge, cash-out, or MRWK price behavior changed.

Summary by CodeRabbit

  • New Features
    • Added a "Clear source filter" link on the bounties page. When a repository or issue number filter is applied, users can remove it while preserving other active search preferences (search text, status, sort, limit, and availability).
  • Tests
    • Updated and added tests to verify the clear-source behavior and that other filters are preserved.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 64b7b1f2-402b-4a55-894a-922e4099c6a0

📥 Commits

Reviewing files that changed from the base of the PR and between 9772d59 and 573d594.

📒 Files selected for processing (4)
  • app/public_routes.py
  • app/templates/bounties.html
  • tests/test_bounty_pages.py
  • tests/test_public_routes.py

📝 Walkthrough

Walkthrough

Adds a backend-generated clear_source_filter_url to bounties context and an inline "Clear source filter" link in the bounties template; tests were updated/added to assert the URL is present and preserves other filters while clearing repo/issue_number.

Changes

Clear source filter

Layer / File(s) Summary
Clear source filter URL generation and rendering
app/public_routes.py, app/templates/bounties.html, tests/test_public_routes.py, tests/test_bounty_pages.py
public_bounties_context() adds clear_source_filter_url that clears repo and issue_number while preserving q, status, sort, limit, and availability. Template renders an inline "Clear source filter" link when a source filter is active. Tests updated to include the new field and to assert the link renders and that other filters are preserved.

Possibly related PRs

  • ramimbo/mergework#736: Establishes the foundational repo/issue_number source filter state and context that this PR builds the clear-filter link on top of.
  • ramimbo/mergework#394: Prior work modifying public_bounties_context() and bounties test coverage for source filter URL handling.
🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed Title clearly and concretely describes the main change: adding a source filter reset link to the bounties page UI.
Description check ✅ Passed Description includes all required sections: summary of changes, evidence/reasoning, validation with command outputs, and scope clarification.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Mergework Public Artifact Hygiene ✅ Passed PR contains no investment, price, cash-out, or fabricated payout claims. Technical UX feature adding clear-filter link; no security details disclosed.
Bounty Pr Focus ✅ Passed All four expected files contain claimed changes. Implementation adds clear_source_filter_url preserving other filters. Scope limited to bounties; no ledger, wallet, or treasury modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f3ddad72-8f03-41a9-a032-4510e09af0bd

📥 Commits

Reviewing files that changed from the base of the PR and between d4d0e48 and 9772d59.

📒 Files selected for processing (4)
  • app/public_routes.py
  • app/templates/bounties.html
  • tests/test_bounty_pages.py
  • tests/test_public_routes.py

Comment thread tests/test_public_routes.py
Copy link
Copy Markdown

@mauricemohr88-debug mauricemohr88-debug left a comment

Choose a reason for hiding this comment

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

Current-head review for #838 on 573d594dad8675664ae84913dca020ae5d4d3abd.

Evidence checked:

  • Inspected app/public_routes.py; clear_source_filter_url clears only repo and issue_number while preserving status, query, sort, limit, and availability through the existing _bounties_page_url helper.
  • Inspected app/templates/bounties.html; the source-filter notice now renders a clear-source link only when a source filter is active.
  • Inspected tests/test_bounty_pages.py and tests/test_public_routes.py; coverage includes the simple source-filter page link and preservation of other filters including limit and availability.
  • Confirmed GitHub reports PR #894 open, current head 573d594dad8675664ae84913dca020ae5d4d3abd, merge state clean, and both visible checks successful.
  • Ran uv run --python 3.12 --extra dev python -m pytest tests/test_bounty_pages.py tests/test_public_routes.py -q: 25 passed, 1 existing Starlette warning.
  • Ran uv run --python 3.12 --extra dev ruff check app/public_routes.py tests/test_public_routes.py tests/test_bounty_pages.py: passed.
  • Ran uv run --python 3.12 --extra dev ruff format --check app/public_routes.py tests/test_public_routes.py tests/test_bounty_pages.py: 3 files already formatted.
  • Ran uv run --python 3.12 --extra dev mypy app/public_routes.py: success.
  • Ran uv run --python 3.12 --extra dev python scripts/docs_smoke.py: docs smoke ok.
  • Ran git diff --check origin/main...HEAD and git merge-tree --write-tree origin/main HEAD: clean.

No blocker found. The change is narrow contributor navigation, preserves existing filters correctly, and does not touch ledger, wallet, treasury, or payout behavior.

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