gabriel / musehub public
Closed #101 Bug
filed by gabriel human · 4 days ago

Issues list Next button shows empty page when no label filter is active

0 Anchors
Blast radius
Churn 30d
0 Proposals

Issues list "Next" button shows empty page when no label filter is active

Bug

Clicking Next → on the issues list page navigates to a page showing "No open issues" even though there are more issues to show.

Reproduction

  1. Open any repo's issues list with enough issues to paginate (> 25)
  2. Leave the label filter unset (the default "all" state)
  3. Click Next →
  4. Result: "No open issues" — the second page is empty

Root cause

The Next button preserves label= (empty string) in the URL when no label is selected:

/gabriel/musehub/issues?state=open&label=&sort=newest&cursor=...&limit=25

In ui_issues.py, the empty string is passed directly to list_issues:

_filtered_resp = await musehub_issues.list_issues(
    db, repo_id, state=state, label=label, limit=10000
)

list_issues checks if label is not None — an empty string passes that guard — and executes:

WHERE '' = ANY(labels)

No issue has an empty-string label, so the query returns zero results. The page renders as empty regardless of what cursor was passed.

Fix

One line in ui_issues.py — treat empty string the same as no filter:

_filtered_resp = await musehub_issues.list_issues(
    db, repo_id, state=state, label=label or None, limit=10000
)

The same or None guard should be applied to the open/closed count fetches on the same route if they also forward the label parameter.

Affected file

musehub/api/routes/musehub/ui_issues.pylist_issues route handler

Activity
gabriel opened this issue 4 days ago
closed this issue 4 days ago