fix(webui): suppress misleading empty queue copy on fail-closed fetch (#458) #459

Merged
sysadmin merged 1 commits from feat/issue-458-queue-fail-closed-ux into master 2026-07-07 15:19:13 -05:00
Owner

Summary

Fixes post-merge UX defect from #445 audit (#458): /queue no longer shows "No open items." when credentials are missing or the fetch fails closed.

Changes

  • webui/queue_views.py — when fetch_error is set, sections show "Not loaded — queue fetch did not complete." instead of empty-queue copy; pagination remains unavailable
  • tests/test_webui_queue_dashboard.py — 3 regression tests for fail-closed vs successful-empty paths

Verification

python -m unittest tests.test_webui_queue_dashboard tests.test_webui_skeleton -q
# 21 tests OK

Acceptance criteria

  • Credential-missing path shows fail-closed error
  • Credential-missing path does not show "No open items."
  • Credential-missing path does not imply inventory was fetched
  • Successful empty inventory still shows "No open items." with pagination proof
  • Existing queue-dashboard tests remain green

Closes #458

## Summary Fixes post-merge UX defect from #445 audit (#458): `/queue` no longer shows "No open items." when credentials are missing or the fetch fails closed. ## Changes - `webui/queue_views.py` — when `fetch_error` is set, sections show "Not loaded — queue fetch did not complete." instead of empty-queue copy; pagination remains unavailable - `tests/test_webui_queue_dashboard.py` — 3 regression tests for fail-closed vs successful-empty paths ## Verification ```bash python -m unittest tests.test_webui_queue_dashboard tests.test_webui_skeleton -q # 21 tests OK ``` ## Acceptance criteria - [x] Credential-missing path shows fail-closed error - [x] Credential-missing path does not show "No open items." - [x] Credential-missing path does not imply inventory was fetched - [x] Successful empty inventory still shows "No open items." with pagination proof - [x] Existing queue-dashboard tests remain green Closes #458
jcwalker3 added 1 commit 2026-07-07 14:53:18 -05:00
When Gitea credentials are missing or the queue fetch fails closed,
show "Not loaded" instead of "No open items." and keep pagination
marked unavailable. Successful empty inventories still show the empty
state with complete pagination proof.

Closes #458
sysadmin approved these changes 2026-07-07 15:18:14 -05:00
sysadmin left a comment
Owner

APPROVED — reviewer: sysadmin/prgs-reviewer (not author). Reviewed canonical PR #459 head 22a1c4c in isolated worktree branches/review-pr459 (clean before + after; no local edits).

Scope: webui/queue_views.py (+9), tests/test_webui_queue_dashboard.py (+74) — tight, #458-only.

Fix verified: _queue_table gains fetch_failed gate; render_queue_page sets fetch_failed = bool(snapshot.fetch_error) and threads it into both PR and issue sections, so the credential-missing / fetch_error path renders "Not loaded — queue fetch did not complete." (plus the pre-existing "Queue unavailable" banner and unavailable pagination) and never the misleading "No open items.". Successful-empty inventory still shows "No open items." with pagination-complete proof; non-empty path unchanged.

Tests (required set) in worktree: pytest tests/test_webui_skeleton.py tests/test_webui_project_registry.py tests/test_webui_prompt_library.py tests/test_webui_queue_dashboard.py -q → 37 passed, 10 subtests. New regression tests use stubbed fetchers + mock.patch — no live network, no token exposure.

Duplicate branch feat/issue-458-queue-fail-closed-copy (@ e6a0603) ignored as superseded by #459. Approving; not merging from this review session.

APPROVED — reviewer: sysadmin/prgs-reviewer (not author). Reviewed canonical PR #459 head `22a1c4c` in isolated worktree `branches/review-pr459` (clean before + after; no local edits). Scope: `webui/queue_views.py` (+9), `tests/test_webui_queue_dashboard.py` (+74) — tight, #458-only. Fix verified: `_queue_table` gains `fetch_failed` gate; `render_queue_page` sets `fetch_failed = bool(snapshot.fetch_error)` and threads it into both PR and issue sections, so the credential-missing / fetch_error path renders "Not loaded — queue fetch did not complete." (plus the pre-existing "Queue unavailable" banner and unavailable pagination) and never the misleading "No open items.". Successful-empty inventory still shows "No open items." with pagination-complete proof; non-empty path unchanged. Tests (required set) in worktree: `pytest tests/test_webui_skeleton.py tests/test_webui_project_registry.py tests/test_webui_prompt_library.py tests/test_webui_queue_dashboard.py -q` → 37 passed, 10 subtests. New regression tests use stubbed fetchers + mock.patch — no live network, no token exposure. Duplicate branch `feat/issue-458-queue-fail-closed-copy` (@ e6a0603) ignored as superseded by #459. Approving; not merging from this review session.
sysadmin merged commit 89a7d4dbfc into master 2026-07-07 15:19:13 -05:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#459