mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
feat(external-pr): surface in-flight reviews in the panel, not just completed
The PR-review queue only listed COMPLETED reviews and hid when empty, so while a review was in_progress the panel showed nothing — no sign a review was happening or where its findings go (the reviewer posts its change-request on the PR itself). Add TaskService.list_external_pr_reviews (active reviews + awaiting-decision, minus cancelled/decided/dismissed); the route uses it. The panel card now shows active reviews with a 'Reviewing' badge and a link to the PR where the change-request lands, and the Supersede/Dismiss actions only once the review completes.
This commit is contained in:
@@ -76,6 +76,17 @@ async def test_list_awaiting_decision_excludes_dismissed() -> None:
|
||||
assert out == [pending]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_list_external_pr_reviews_excludes_dismissed() -> None:
|
||||
# The panel queue surfaces in-flight reviews too (the status filter lives in
|
||||
# SQL); here we pin the post-query behavior: dismissed reviews drop out.
|
||||
reviewing = MagicMock(quick_context="external_pr_head=abc")
|
||||
dismissed = MagicMock(quick_context="external_pr_head=def dismissed=1")
|
||||
svc = _service([reviewing, dismissed])
|
||||
out = await svc.list_external_pr_reviews()
|
||||
assert out == [reviewing]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_dismiss_marks_and_is_idempotent() -> None:
|
||||
task = MagicMock(source="external_pr", quick_context="external_pr_head=abc")
|
||||
|
||||
Reference in New Issue
Block a user