Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@davelopez
Copy link
Contributor

This pull request adds test coverage for the useResourceWatcher composable and fixes an edge case detected by @jmchilton (Thank you!) while working on #20592

I have included the isWatchingResource reactive flag for convenience in the composable.

How to test the changes?

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@jmchilton
Copy link
Member

Amazing - thank you so much for doing this so quickly! Follow up question - any chance you can use the new boolean to allow repeated calls to start/stop - because I have a similar boolean in my code to keep track if I've called those in from a watch - it would be easier if I could just recall them and use that same boolean you're adding here to do that. If you want to keep start/stop "pure" - can I add a startIfNeeded / stopIfNeeded on this composable that checks the new boolean to see if the corresponding action is needed?

@jmchilton jmchilton merged commit 63f0d25 into galaxyproject:dev Jul 23, 2025
31 of 32 checks passed
@davelopez davelopez deleted the fix_resource_watcher branch July 24, 2025 08:04
@davelopez
Copy link
Contributor Author

can I add a startIfNeeded / stopIfNeeded on this composable that checks the new boolean to see if the corresponding action is needed?

Of course! Please, add whatever you need to the composable to make it more useful. I would keep start/stop pure because, if I recall correctly, existing code depends on the start function to trigger a fetch request right away for immediate updates. But please feel free to add or change whatever you need!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants