Fix 'All Tools' count showing filtered category count

total_count was using the API response meta.total which reflects
the current filter. Now sums all category counts for consistent display.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
rob 2026-01-01 07:04:12 -04:00
parent 9699717443
commit e2d1002d2e
1 changed files with 3 additions and 1 deletions

View File

@ -234,12 +234,14 @@ def _render_tools(category_override: Optional[str] = None):
meta = payload.get("meta", {}) meta = payload.get("meta", {})
categories = _load_categories() categories = _load_categories()
# Sum all category counts for the "All Tools" total
all_tools_total = sum(c.count for c in categories)
return render_template( return render_template(
"pages/tools.html", "pages/tools.html",
tools=payload.get("data", []), tools=payload.get("data", []),
categories=categories, categories=categories,
current_category=category, current_category=category,
total_count=meta.get("total", 0), total_count=all_tools_total,
sort=sort, sort=sort,
query=query, query=query,
pagination=_build_pagination(meta), pagination=_build_pagination(meta),