Rewire Dashboard Overview and User section to ServiceProvider traits #11
Labels
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coopcloud_code/projectmycelium_marketplace#11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The Dashboard Overview and User section handlers bypass ServiceProvider and use direct fixture instantiation. The dashboard home page shows empty charts, no activity feed, and the user section shows rentals loading forever.
Affected Handlers
Dashboard Overview
index/dashboard_home— Main dashboard page with summary cards and chartsdashboard_activity_api— Activity feed datauser_dashboard_data_api— ✅ Already fixedUser Section
user_section— User profile/rentals pageuser_rentals_api— Slice rentals listuser_bookings_api— Booking historyuser_profile_update— Profile edit handleruser_ssh_keys_api— SSH key managementCurrent Bypass Pattern
Solution
Replace all builder pattern instantiations with ServiceProvider trait calls:
Acceptance Criteria
UserService::builder()calls remain in these handlersDependencies
Rewired activities + SSH keys to ServiceProvider. Added services param to 9 handlers (commit
b28bfbc).Reopened — remaining work
Remaining bypasses in dashboard/user.rs:
CurrencyService::new()(utility, keep)UserService::builder()(get_applications, calculate_metrics)SessionManager(infrastructure, keep)UserPersistence(load/save user data, notification settings)SliceRentalService::builder()(get_user_slice_rentals)Remaining in dashboard/overview.rs:
CurrencyService::new()(utility, keep)UserService::builder()(calculate_metrics)Remaining in dashboard/mod.rs:
UserPersistence(load/create user data, get apps)SessionManager(infrastructure, keep)Depends on #26, #27