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 <[email protected]>
This commit is contained in:
@@ -234,12 +234,14 @@ def _render_tools(category_override: Optional[str] = None):
|
||||
|
||||
meta = payload.get("meta", {})
|
||||
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(
|
||||
"pages/tools.html",
|
||||
tools=payload.get("data", []),
|
||||
categories=categories,
|
||||
current_category=category,
|
||||
total_count=meta.get("total", 0),
|
||||
total_count=all_tools_total,
|
||||
sort=sort,
|
||||
query=query,
|
||||
pagination=_build_pagination(meta),
|
||||
|
||||
Reference in New Issue
Block a user