fix: hide empty-state copy on queue credential fail-closed (Closes #458)
When fetch_error is set, render only the unavailable banner and an explicit not-fetched inventory note. Suppress queue tables, pagination proof, and "No open items." copy that implied a successful empty fetch. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
+12
-1
@@ -72,6 +72,18 @@ def render_queue_page(snapshot: QueueSnapshot) -> str:
|
||||
f'<div class="stub"><p><strong>Queue unavailable:</strong> '
|
||||
f"{html.escape(snapshot.fetch_error)}</p></div>"
|
||||
)
|
||||
inventory_block = (
|
||||
"<p class='muted'><strong>Inventory:</strong> not fetched "
|
||||
"(fail closed — queue tables omitted).</p>"
|
||||
)
|
||||
return (
|
||||
"<h2>Live queue</h2>"
|
||||
f"<p class='meta'>Repository: <code>{html.escape(snapshot.repo_label)}</code> "
|
||||
f"· project <code>{html.escape(snapshot.project_id)}</code></p>"
|
||||
f"{error_block}"
|
||||
f"{inventory_block}"
|
||||
"<p class='muted'>Read-only MVP — claims, reviews, and merges stay in Gitea/MCP tools.</p>"
|
||||
)
|
||||
|
||||
pr_section = _queue_table(
|
||||
title="Open pull requests",
|
||||
@@ -101,7 +113,6 @@ def render_queue_page(snapshot: QueueSnapshot) -> str:
|
||||
"<h2>Live queue</h2>"
|
||||
f"<p class='meta'>Repository: <code>{html.escape(snapshot.repo_label)}</code> "
|
||||
f"· project <code>{html.escape(snapshot.project_id)}</code></p>"
|
||||
f"{error_block}"
|
||||
f"{_pagination_html('PR', snapshot.pr_pagination)}"
|
||||
f"{pr_section}"
|
||||
f"{_pagination_html('Issue', snapshot.issue_pagination)}"
|
||||
|
||||
Reference in New Issue
Block a user