[PR #51] [MERGED] fix: category counts resetting to 0 and unstable artifact ordering #51

Closed
opened 2026-08-12 19:09:18 +02:00 by zaph0d · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/niels-emmer/myace/pull/51
Author: @niels-emmer
Created: 8/11/2026
Status: Merged
Merged: 8/11/2026
Merged by: @niels-emmer

Base: mainHead: fix/collection-detail-filter-sort


📝 Commits (1)

  • 99e82d7 fix: category counts resetting to 0 and unstable artifact ordering

📊 Changes

1 file changed (+56 additions, -21 deletions)

View changed files

📝 frontend/src/pages/CollectionDetail.tsx (+56 -21)

📄 Description

Summary

  • Fixes two UI bugs on the collection detail page: selecting a category tab (e.g. "Skills") made every other tab show (0), because the artifact list query was already filtered server-side by the active type and the per-category counts were derived from that same filtered result.
  • Fixes unstable/"jumping" artifact ordering — the backend has no explicit ORDER BY on the artifacts list endpoint, so row order wasn't guaranteed across refetches.
  • Adds explicit sort controls (A→Z, Z→A, Category) to the filter bar, defaulting to A→Z, which also makes ordering deterministic.

Test plan

  • tsc -b and eslint clean
  • Verified locally against a real backend with a 22-artifact collection ("Software Engineer" starter pack): switching categories keeps all counts correct, all three sort modes work as expected

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/niels-emmer/myace/pull/51 **Author:** [@niels-emmer](https://github.com/niels-emmer) **Created:** 8/11/2026 **Status:** ✅ Merged **Merged:** 8/11/2026 **Merged by:** [@niels-emmer](https://github.com/niels-emmer) **Base:** `main` ← **Head:** `fix/collection-detail-filter-sort` --- ### 📝 Commits (1) - [`99e82d7`](https://github.com/niels-emmer/myace/commit/99e82d74a24ae4acd5601a14df07877cfa372136) fix: category counts resetting to 0 and unstable artifact ordering ### 📊 Changes **1 file changed** (+56 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/pages/CollectionDetail.tsx` (+56 -21) </details> ### 📄 Description ## Summary - Fixes two UI bugs on the collection detail page: selecting a category tab (e.g. "Skills") made every *other* tab show (0), because the artifact list query was already filtered server-side by the active type and the per-category counts were derived from that same filtered result. - Fixes unstable/"jumping" artifact ordering — the backend has no explicit `ORDER BY` on the artifacts list endpoint, so row order wasn't guaranteed across refetches. - Adds explicit sort controls (A→Z, Z→A, Category) to the filter bar, defaulting to A→Z, which also makes ordering deterministic. ## Test plan - [x] `tsc -b` and `eslint` clean - [x] Verified locally against a real backend with a 22-artifact collection ("Software Engineer" starter pack): switching categories keeps all counts correct, all three sort modes work as expected 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
zaph0d 2026-08-12 19:09:18 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
github-mirrors/myace#51
No description provided.