From 59491c7803dd912d29ec8cd525b7694eb791a406 Mon Sep 17 00:00:00 2001 From: jlightner Date: Tue, 31 Mar 2026 05:26:18 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20Replaced=20meaningless=20'0=20views'=20?= =?UTF-8?q?display=20with=20topic-category=20counts=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - "frontend/src/pages/CreatorDetail.tsx" GSD-Task: S03/T02 --- .gsd/milestones/M008/slices/S03/S03-PLAN.md | 2 +- .../M008/slices/S03/tasks/T01-VERIFY.json | 30 +++++++ .../M008/slices/S03/tasks/T02-SUMMARY.md | 78 +++++++++++++++++++ 3 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 .gsd/milestones/M008/slices/S03/tasks/T01-VERIFY.json create mode 100644 .gsd/milestones/M008/slices/S03/tasks/T02-SUMMARY.md diff --git a/.gsd/milestones/M008/slices/S03/S03-PLAN.md b/.gsd/milestones/M008/slices/S03/S03-PLAN.md index 1eda69c..c81c6c2 100644 --- a/.gsd/milestones/M008/slices/S03/S03-PLAN.md +++ b/.gsd/milestones/M008/slices/S03/S03-PLAN.md @@ -27,7 +27,7 @@ Note on the subquery approach: The `list_techniques` endpoint currently uses `se - Estimate: 45m - Files: backend/schemas.py, backend/routers/techniques.py, frontend/src/api/public-client.ts, frontend/src/pages/Home.tsx, frontend/src/App.css - Verify: curl -s http://ub01:8096/api/v1/techniques?limit=3 | python3 -c "import sys,json; items=json.load(sys.stdin)['items']; assert all('key_moment_count' in i for i in items), 'missing key_moment_count'; print('API OK')" && cd frontend && npx tsc --noEmit && npm run build -- [ ] **T02: Replace 'views' stat with topic-category breakdown on creator detail page** — Replace the meaningless '0 views' display on the creator detail page with a compact topic-category breakdown derived from the already-fetched techniques array. +- [x] **T02: Replaced meaningless '0 views' display with topic-category counts derived from techniques array on creator detail page** — Replace the meaningless '0 views' display on the creator detail page with a compact topic-category breakdown derived from the already-fetched techniques array. Steps: 1. In `frontend/src/pages/CreatorDetail.tsx`, find the stats span showing `{creator.view_count.toLocaleString()} views` (around line 110) diff --git a/.gsd/milestones/M008/slices/S03/tasks/T01-VERIFY.json b/.gsd/milestones/M008/slices/S03/tasks/T01-VERIFY.json new file mode 100644 index 0000000..7e5339e --- /dev/null +++ b/.gsd/milestones/M008/slices/S03/tasks/T01-VERIFY.json @@ -0,0 +1,30 @@ +{ + "schemaVersion": 1, + "taskId": "T01", + "unitId": "M008/S03/T01", + "timestamp": 1774934617293, + "passed": false, + "discoverySource": "task-plan", + "checks": [ + { + "command": "cd frontend", + "exitCode": 0, + "durationMs": 6, + "verdict": "pass" + }, + { + "command": "npx tsc --noEmit", + "exitCode": 1, + "durationMs": 835, + "verdict": "fail" + }, + { + "command": "npm run build", + "exitCode": 254, + "durationMs": 86, + "verdict": "fail" + } + ], + "retryAttempt": 1, + "maxRetries": 2 +} diff --git a/.gsd/milestones/M008/slices/S03/tasks/T02-SUMMARY.md b/.gsd/milestones/M008/slices/S03/tasks/T02-SUMMARY.md new file mode 100644 index 0000000..be26474 --- /dev/null +++ b/.gsd/milestones/M008/slices/S03/tasks/T02-SUMMARY.md @@ -0,0 +1,78 @@ +--- +id: T02 +parent: S03 +milestone: M008 +provides: [] +requires: [] +affects: [] +key_files: ["frontend/src/pages/CreatorDetail.tsx"] +key_decisions: ["Computed topic counts client-side from existing techniques array rather than adding a new API endpoint", "Sorted categories by count descending for readability"] +patterns_established: [] +drill_down_paths: [] +observability_surfaces: [] +duration: "" +verification_result: "TypeScript compilation passes, production build succeeds, grep confirms topic_category usage and view_count removal. Browser verification on ub01:8096 shows topic categories rendering correctly on creator detail page." +completed_at: 2026-03-31T05:26:00.400Z +blocker_discovered: false +--- + +# T02: Replaced meaningless '0 views' display with topic-category counts derived from techniques array on creator detail page + +> Replaced meaningless '0 views' display with topic-category counts derived from techniques array on creator detail page + +## What Happened +--- +id: T02 +parent: S03 +milestone: M008 +key_files: + - frontend/src/pages/CreatorDetail.tsx +key_decisions: + - Computed topic counts client-side from existing techniques array rather than adding a new API endpoint + - Sorted categories by count descending for readability +duration: "" +verification_result: passed +completed_at: 2026-03-31T05:26:00.400Z +blocker_discovered: false +--- + +# T02: Replaced meaningless '0 views' display with topic-category counts derived from techniques array on creator detail page + +**Replaced meaningless '0 views' display with topic-category counts derived from techniques array on creator detail page** + +## What Happened + +Removed the view_count reference from CreatorDetail.tsx and replaced it with a computed topic-category breakdown. The implementation reduces the techniques array into a Record of category counts, sorts by count descending, and renders inline with dot separators matching the existing UI pattern. When no techniques are loaded, the category section is hidden. No CSS changes needed. + +## Verification + +TypeScript compilation passes, production build succeeds, grep confirms topic_category usage and view_count removal. Browser verification on ub01:8096 shows topic categories rendering correctly on creator detail page. + +## Verification Evidence + +| # | Command | Exit Code | Verdict | Duration | +|---|---------|-----------|---------|----------| +| 1 | `cd frontend && npx tsc --noEmit` | 0 | ✅ pass | 2800ms | +| 2 | `cd frontend && npm run build` | 0 | ✅ pass | 2700ms | +| 3 | `grep -q 'topic' frontend/src/pages/CreatorDetail.tsx` | 0 | ✅ pass | 10ms | +| 4 | `! grep -q 'view_count' frontend/src/pages/CreatorDetail.tsx` | 0 | ✅ pass | 10ms | + + +## Deviations + +None. + +## Known Issues + +Data has case-inconsistent topic categories ('Sound design' vs 'Sound Design') appearing as separate entries — upstream data quality issue. + +## Files Created/Modified + +- `frontend/src/pages/CreatorDetail.tsx` + + +## Deviations +None. + +## Known Issues +Data has case-inconsistent topic categories ('Sound design' vs 'Sound Design') appearing as separate entries — upstream data quality issue.