Skip to content

Conversation

@GangGreenTemperTatum
Copy link
Owner

@GangGreenTemperTatum GangGreenTemperTatum commented Aug 12, 2025

minimal current project listener for hot reload

The current implementation only refreshes when the user manually clicks "Refresh Files" or when the component first loads, which explains why you see stale data after workspace switches.

Key Changes:

  • Now, the plugin will automatically detect the change and refresh to show the files from the new workspace directory instead of staying stuck on the old one

Added:

  • minimal current project listener

Generated Summary

  • Added new "bytecap:project-changed" event in the backend to notify frontend of project changes.
  • Implemented a project change listener in the backend that logs the new project name and sends the event with project details.
  • Integrated localStorage persistence in the frontend for user settings (thresholdMB, enableWarnings, warningAt75Percent, warningAt90Percent).
  • Updated the frontend to load persisted settings on initialization.
  • Configured the frontend to listen for the "bytecap:project-changed" event and refresh workspace files upon detecting a project change.

This summary was generated with ❤️ by rigging

Generated Summary

  • Added a listener for project changes using sdk.projects.onCurrentChanged.
  • Refreshes workspace files automatically by invoking loadWorkspaceFiles when the project changes.
  • Includes a console log to aid debugging of the auto-refresh functionality.
  • Improves user experience by ensuring that workspace files are always up-to-date.

This summary was generated with ❤️ by rigging

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