Skip to content

Conversation

@DJJones66
Copy link
Contributor

✨ Pull Request: Dashboard Plugin Update Panel

Summary

This PR introduces a new Plugin Updates Panel to the dashboard, enabling users to view, refresh, and apply available plugin updates directly within the UI. It also adds a supporting hook (usePluginUpdateFeed) with local caching, batch update logic, and error handling.

Key Changes

New Components & Hooks

  • PluginUpdatesPanel.tsx

    • UI card that lists plugins with available updates.
    • Provides update, update-all, refresh, dismiss, and retry actions.
    • Shows progress indicators, error messages, and empty/skeleton states.
  • usePluginUpdateFeed.ts

    • Custom hook for managing plugin update state.
    • Features localStorage caching with TTL, dismissed update persistence, and refresh/retry logic.
    • Supports batch update progress tracking and single plugin update operations.
  • Unit Tests (usePluginUpdateFeed.test.ts)

    • Validates fetching, dismissing, updating, and refresh flows.
    • Uses mocks for AuthContext and moduleService.

Updated Files

  • Dashboard.tsx

    • Integrated PluginUpdatesPanel into the dashboard layout.
    • Uses usePluginUpdateFeed to connect the panel to live update data.
    • Adjusted layout spacing and updated card title (“Page Builder”).
  • plugin-manager/index.ts

    • Exported new panel, hook, and related types.
  • moduleService.ts

    • Added debug logging for update checks.

Why This Change?

  • Users need a clear and centralized way to see when plugins have updates available.
  • Adds automation for bulk updates, reducing manual effort.
  • Improves UX by handling empty, loading, and error states gracefully.
  • Provides test coverage for reliability.

Testing & Verification

  • ✅ Loaded dashboard with no updates → panel shows “No plugins need updates”.
  • ✅ Simulated available updates → panel lists items with update and later actions.
  • ✅ Verified “Update All” runs batch updates with progress tracking.
  • ✅ Confirmed dismissed items persist in cache but reappear after refresh.
  • ✅ Unit tests pass for fetch, dismiss, update, and refresh flows.

Next Steps / Future Considerations

  • Extend panel to support rollback/downgrade actions.
  • Add notifications (e.g., snackbar) for completed updates.
  • Explore integration with backend events for real-time update availability.

@DJJones66 DJJones66 self-assigned this Sep 19, 2025
@DJJones66 DJJones66 merged commit 6d39490 into main Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants