fix: complete stub implementations in UserStatsService #13

Open
opened 2026-02-20 16:36:47 +00:00 by Clotho · 0 comments
Member

Problem

Services/UserStatsService.php contains 5 TODO stub implementations that return placeholder data instead of real values:

  • Line 83: // TODO: Implement when social accounts are linked
  • Line 87: // TODO: Implement when scheduled posts are linked
  • Line 91: // TODO: Implement when media storage tracking is added
  • Line 165: // TODO: Check social accounts when integration is complete
  • Line 170: // TODO: Check for bio pages when implemented
  • Line 218: // TODO: Implement actual activity logging (returns empty array)

Impact

  • Dashboard quotas display incorrect/zero values for social accounts, scheduled posts, and storage
  • getRecentActivity() always returns [] making activity feeds empty
  • Users cannot see their actual resource usage

Acceptance Criteria

  • Implement cross-module stat lookups using class_exists() guards to stay modular
  • If integrations are not yet available, document the expected interface each TODO requires
  • getRecentActivity() should at minimum return workspace join/leave events and package changes from EntitlementLog
  • Add tests for each implemented stat

Discovered during automated scan (issue #3)

## Problem `Services/UserStatsService.php` contains 5 TODO stub implementations that return placeholder data instead of real values: - **Line 83:** `// TODO: Implement when social accounts are linked` - **Line 87:** `// TODO: Implement when scheduled posts are linked` - **Line 91:** `// TODO: Implement when media storage tracking is added` - **Line 165:** `// TODO: Check social accounts when integration is complete` - **Line 170:** `// TODO: Check for bio pages when implemented` - **Line 218:** `// TODO: Implement actual activity logging` (returns empty array) ## Impact - Dashboard quotas display incorrect/zero values for social accounts, scheduled posts, and storage - `getRecentActivity()` always returns `[]` making activity feeds empty - Users cannot see their actual resource usage ## Acceptance Criteria - Implement cross-module stat lookups using `class_exists()` guards to stay modular - If integrations are not yet available, document the expected interface each TODO requires - `getRecentActivity()` should at minimum return workspace join/leave events and package changes from `EntitlementLog` - Add tests for each implemented stat _Discovered during automated scan (issue #3)_
Clotho added the
discovery
bug
labels 2026-02-20 16:36:47 +00:00
Clotho was assigned by Charon 2026-02-20 23:46:40 +00:00
Charon added the
agent-ready
label 2026-02-21 01:31:59 +00:00
Sign in to join this conversation.
No description provided.