From fc12d97d312fc2b6155ac391f4d85e9af234435b Mon Sep 17 00:00:00 2001
From: adliebe <133605035+adliebe@users.noreply.github.com>
Date: Wed, 27 May 2026 15:46:11 -0400
Subject: [PATCH 1/3] Add bounty detail contributor links
---
app/templates/bounty_detail.html | 13 +++++++++++++
tests/test_bounty_pages.py | 5 +++++
2 files changed, 18 insertions(+)
diff --git a/app/templates/bounty_detail.html b/app/templates/bounty_detail.html
index 64af38f8..b0ffe2c1 100644
--- a/app/templates/bounty_detail.html
+++ b/app/templates/bounty_detail.html
@@ -45,6 +45,19 @@
{{ bounty.title }}
What has to be true
{{ bounty.acceptance }}
+
+
+ Contributor links
+ Inspect this bounty
+
+
diff --git a/tests/test_bounty_pages.py b/tests/test_bounty_pages.py
index e696d6cb..06744186 100644
--- a/tests/test_bounty_pages.py
+++ b/tests/test_bounty_pages.py
@@ -295,6 +295,11 @@ def test_bounty_detail_highlights_action_fields(sqlite_url: str) -> None:
assert "Issue" in response.text
assert "100 MRWK" in response.text
assert "What has to be true" in response.text
+ assert "Inspect this bounty" in response.text
+ assert f'href="/api/v1/bounties/{bounty.id}"' in response.text
+ assert f'href="/api/v1/bounties/{bounty.id}/attempts"' in response.text
+ assert f'href="/api/v1/bounties/{bounty.id}/attempts?include_expired=true"' in response.text
+ assert 'href="https://github.com/ramimbo/mergework/issues/4"' in response.text
assert "Focused PR improves status, reward, issue link, and acceptance text." in response.text
missing_response = client.get("/api/v1/bounties/999")
From 1577172efa18e8435a0b2c086880ce2576dd263c Mon Sep 17 00:00:00 2001
From: adliebe <133605035+adliebe@users.noreply.github.com>
Date: Wed, 27 May 2026 16:03:56 -0400
Subject: [PATCH 2/3] Cover bounty detail missing issue link
---
tests/test_bounty_pages.py | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/tests/test_bounty_pages.py b/tests/test_bounty_pages.py
index 06744186..f0884604 100644
--- a/tests/test_bounty_pages.py
+++ b/tests/test_bounty_pages.py
@@ -5,6 +5,7 @@
from app.db import create_schema, session_scope
from app.ledger.service import close_bounty, create_bounty, ensure_genesis, pay_bounty
from app.main import create_app
+from app.models import Bounty
def test_bounties_page_renders_and_filters_by_status(sqlite_url: str) -> None:
@@ -315,6 +316,34 @@ def test_bounty_detail_highlights_action_fields(sqlite_url: str) -> None:
assert oversized_page_response.status_code == 400
+def test_bounty_detail_omits_source_issue_when_url_is_missing(sqlite_url: str) -> None:
+ create_schema(sqlite_url)
+ with session_scope(sqlite_url) as session:
+ ensure_genesis(session)
+ bounty = Bounty(
+ repo="ramimbo/mergework",
+ issue_number=5,
+ issue_url="",
+ title="Bounty without an external issue",
+ reward_microunits=50_000_000,
+ reserved_microunits=50_000_000,
+ acceptance="This bounty has no external issue link.",
+ )
+ session.add(bounty)
+ session.flush()
+ bounty_id = bounty.id
+
+ client = TestClient(create_app(database_url=sqlite_url, webhook_secret="secret"))
+
+ response = client.get(f"/bounties/{bounty_id}")
+
+ assert response.status_code == 200
+ assert "Inspect this bounty" in response.text
+ assert f'href="/api/v1/bounties/{bounty_id}"' in response.text
+ assert f'href="/api/v1/bounties/{bounty_id}/attempts"' in response.text
+ assert "Source issue" not in response.text
+
+
def test_bounty_detail_shows_accepted_award_history(sqlite_url: str) -> None:
create_schema(sqlite_url)
with session_scope(sqlite_url) as session:
From 8d75b41c4ed5637d4e6026fbe451eec6932017a1 Mon Sep 17 00:00:00 2001
From: adliebe <133605035+adliebe@users.noreply.github.com>
Date: Wed, 27 May 2026 16:14:59 -0400
Subject: [PATCH 3/3] Cover all bounty detail contributor links
---
tests/test_bounty_pages.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/test_bounty_pages.py b/tests/test_bounty_pages.py
index f0884604..ebca74d7 100644
--- a/tests/test_bounty_pages.py
+++ b/tests/test_bounty_pages.py
@@ -341,6 +341,7 @@ def test_bounty_detail_omits_source_issue_when_url_is_missing(sqlite_url: str) -
assert "Inspect this bounty" in response.text
assert f'href="/api/v1/bounties/{bounty_id}"' in response.text
assert f'href="/api/v1/bounties/{bounty_id}/attempts"' in response.text
+ assert f'href="/api/v1/bounties/{bounty_id}/attempts?include_expired=true"' in response.text
assert "Source issue" not in response.text