Skip to content

Show pending bounty proposals on detail pages#897

Merged
ramimbo merged 1 commit into
ramimbo:mainfrom
CleanDev-Fix:codex/bounty-detail-pending-proposals-845
Jun 5, 2026
Merged

Show pending bounty proposals on detail pages#897
ramimbo merged 1 commit into
ramimbo:mainfrom
CleanDev-Fix:codex/bounty-detail-pending-proposals-845

Conversation

@CleanDev-Fix
Copy link
Copy Markdown
Contributor

@CleanDev-Fix CleanDev-Fix commented Jun 4, 2026

Refs #845

Summary

  • Add a focused Pending treasury proposals section to public bounty detail pages when pending payout or close proposals affect effective capacity.
  • Link each pending proposal to its public treasury proposal API route.
  • For pending payouts, show the target account, submitted-work link, and execution time.
  • For pending close proposals, show the execution time and close reference when present.

Why

The detail page already shows effective capacity and a generic availability note, but contributors have to jump to JSON/API data to see which pending proposal is consuming capacity. This keeps the bounty lifecycle distinction visible on the human detail page: visible capacity before pending proposals vs. effective capacity after pending payout or close proposals.

Duplicate check

Patch apply checks were clean against active same-surface PR heads #896, #890, #884, #895, and #894.

Validation

  • uv run --extra dev python -m pytest tests/test_bounty_pages.py::test_bounties_page_shows_effective_capacity_after_pending_payout tests/test_bounty_pages.py::test_bounties_page_shows_effective_capacity_after_pending_close -q -> 2 passed, 1 existing Starlette/httpx warning.
  • uv run --extra dev python -m pytest tests/test_bounty_pages.py tests/test_public_routes.py -q -> 24 passed, 1 existing Starlette/httpx warning.
  • uv run --extra dev python -m pytest -q -> 790 passed, 1 existing Starlette/httpx warning.
  • uv run --extra dev ruff check . -> passed.
  • uv run --extra dev ruff format --check . -> 111 files already formatted.
  • uv run --extra dev mypy app -> success across 42 source files.
  • uv run --extra dev python scripts/docs_smoke.py -> docs smoke ok.
  • git diff --check -> clean except the existing Windows LF-to-CRLF working-copy notice for the edited template.

Scope

Public bounty detail page and page regression tests only. No bounty creation, proposal execution, payout execution, ledger mutation, wallet behavior, admin-token APIs, exchange, bridge, off-ramp, cash-out, MRWK price behavior, private data, credentials, or secrets changed.

Summary by CodeRabbit

  • New Features

    • Bounty detail pages now display a "Pending treasury proposals" section when applicable, showing capacity under review, payout proposal links, submission URLs, and execution timing.
    • Added visibility for pending close proposals with accessible reference information.
  • Tests

    • Updated bounty page tests to validate pending treasury proposals display, messaging accuracy, and proper link generation.

@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: 15ac9f15-4e98-4819-888c-0fbcf4f70103

📥 Commits

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

📒 Files selected for processing (2)
  • app/templates/bounty_detail.html
  • tests/test_bounty_pages.py

📝 Walkthrough

Walkthrough

The PR adds template rendering and test coverage for pending treasury proposals in bounty detail pages. The template now displays a conditional acceptance card listing payout proposals with treasury links and submitted work URLs, plus close proposal details with reference handling. Tests are updated to capture proposal IDs and assert the new sections appear with correct messaging and links.

Changes

Pending Treasury Proposals Display

Layer / File(s) Summary
Template rendering of pending proposals
app/templates/bounty_detail.html
Conditional section displays pending proposals card with payout proposals (showing treasury proposal links, optional submitted work URLs, and execution timestamps) and close proposal details with reference link-or-code fallback.
Tests for pending payout proposals
tests/test_bounty_pages.py
Test now captures returned proposal object to extract proposal_id, then asserts the bounty detail page includes "Pending treasury proposals" section, "Capacity already in review" heading, treasury proposal link, and submitted work content with external URL.
Tests for pending close proposals
tests/test_bounty_pages.py
Test now captures returned proposal object to extract proposal_id, then asserts the bounty detail page includes "Pending treasury proposals" section, treasury proposal link, "would close this bounty after" messaging, and close reference rendered as external issue link.

Possibly related PRs

  • ramimbo/mergework#657: Main PR's bounty detail template and tests for pending treasury proposals and effective capacity build on the serializer fields (pending_*_proposals, effective_*) that power the new UI assertions.
  • ramimbo/mergework#458: Main PR's treasury proposals display and API links to /api/v1/treasury/proposals/{proposal_id} build on the treasury proposals subsystem that manages pending-capacity semantics and proposal IDs.
🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Show pending bounty proposals on detail pages' clearly names the changed surface and accurately reflects the main change in the changeset.
Description check ✅ Passed The PR description includes all required sections with concrete details: a clear summary of changes, evidence of why the change was needed, validation of all required checks, 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 introduces only neutral informational UI for pending treasury proposals. No investment, price, cash-out, or fabricated claims found. Consistent with project MRWK guidelines.
Bounty Pr Focus ✅ Passed Two files changed only: bounty_detail.html (template) and test_bounty_pages.py. Template adds pending proposals section. Tests updated with proposal_id capture and assertions. No scope creep.

✏️ 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

@sayuru-akash sayuru-akash left a comment

Choose a reason for hiding this comment

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

Reviewed current head a73ac5e630083652d45ea8818f5c18ee14af6b02 as a non-author.

I approve this from the public bounty-detail page behavior angle.

Evidence checked:

  • Inspected app/templates/bounty_detail.html and tests/test_bounty_pages.py.
  • Verified the new section only renders when pending_payout_proposals or pending_close_proposal exists.
  • Verified pending payout rows link to the public treasury proposal route and use safe_public_url() before rendering submitted-work links.
  • Verified pending close references also pass through safe_public_url() before becoming links, otherwise render as code text.
  • Verified this stays on the human detail page surface and does not add admin-token, proposal execution, payout execution, ledger, wallet, or bounty lifecycle mutation paths.
  • Checked live PR state before review: open, mergeable, hosted Quality/readiness/docs/image check successful, and no current-head human review found.
  • Checked #643 comments for pull/897, PR #897, and #897; no visible review-bounty claim found before this review.

Validation:

  • UV_CACHE_DIR=.uv-cache uv run pytest tests/test_bounty_pages.py tests/test_public_routes.py -q -> 24 passed, 1 existing Starlette/httpx warning.
  • UV_CACHE_DIR=.uv-cache uv run ruff check tests/test_bounty_pages.py -> passed.
  • UV_CACHE_DIR=.uv-cache uv run ruff format --check tests/test_bounty_pages.py -> 1 file already formatted.
  • git diff --check origin/main...HEAD -> clean.
  • git merge-tree --write-tree origin/main HEAD -> clean tree 584f35e29a257d469a411b09898afd7de33e7cf8.

Note: I did not count an explicit Ruff invocation against the Jinja template, because Ruff does not parse .html templates; the rendered behavior is covered by the page tests above.

No private data, credentials, wallet material, payout execution, treasury mutation, ledger mutation, bridge, exchange, cash-out, MRWK price behavior, or issue mutation was used.

@stmr
Copy link
Copy Markdown

stmr commented Jun 4, 2026

Bounty #838 current-head review for PR #897.

Reviewed head a73ac5e630083652d45ea8818f5c18ee14af6b02. Files inspected: app/templates/bounty_detail.html, tests/test_bounty_pages.py.

Verdict: no blocker found. The pending proposal section renders only when pending_payout_proposals or pending_close_proposal exists, links to public proposal API routes, uses safe_public_url for submitted-work and close-reference links, and keeps the page read-only. Regression coverage now asserts both pending payout and pending close detail-page text/links.

GitHub state checked: mergeStateStatus=CLEAN; hosted Quality, readiness, docs, and image checks passed; CodeRabbit passed. Scope is public bounty detail rendering and tests only. No ledger, wallet, treasury execution, payout execution, admin-token, private data, secrets, exchange, bridge, cash-out, or MRWK price behavior changed.

@ramimbo ramimbo merged commit 49f0ef3 into ramimbo:main Jun 5, 2026
2 checks passed
@ramimbo ramimbo added mrwk:accepted Maintainer accepted for payout mrwk:paid Ledger payment recorded labels Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mrwk:accepted Maintainer accepted for payout mrwk:paid Ledger payment recorded

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants