Description
When changing the repository in an action's Property Inspector settings (e.g. Repo Stats, PR Counter), the button continues to display the previous repository's data instead of fetching and showing the new repository's data.
Steps to reproduce
- Add any repo-scoped action (e.g. Repo Stats or PR Counter) to a button
- Configure it with Repository A — wait for the count/stat to appear
- Open the action's settings and switch to Repository B
- Observe: The button briefly (or permanently, until the next poll cycle) shows Repository A's data
Expected behavior
After switching to Repository B, the button should immediately show a loading spinner, then display Repository B's fresh data.
Root cause
Two issues contribute to this bug:
1. No cache invalidation on re-subscribe
GraphQLQueryCoordinator.subscribe() simply overwrites the subscription map entry without checking whether the repo or params changed. The old repo's cached data is never invalidated, and the new repo may return stale cached data from a previous subscription.
The repo-stats action had a manual workaround (unsubscribe before subscribe), but pr-counter and other actions did not — making this a systemic issue that would affect any new action added.
2. Marquee timer overwrites loading spinner
All actions with marquee text animation have a setInterval timer firing every 500ms. When settings change, the spinner is correctly shown, but the still-running marquee timer re-renders the button with the old cached display data within 0–500ms, overwriting the spinner with stale content.
Environment
- Plugin version: 2.3.0
- Stream Deck: XL (new release)
- macOS
Description
When changing the repository in an action's Property Inspector settings (e.g. Repo Stats, PR Counter), the button continues to display the previous repository's data instead of fetching and showing the new repository's data.
Steps to reproduce
Expected behavior
After switching to Repository B, the button should immediately show a loading spinner, then display Repository B's fresh data.
Root cause
Two issues contribute to this bug:
1. No cache invalidation on re-subscribe
GraphQLQueryCoordinator.subscribe()simply overwrites the subscription map entry without checking whether the repo or params changed. The old repo's cached data is never invalidated, and the new repo may return stale cached data from a previous subscription.The
repo-statsaction had a manual workaround (unsubscribebeforesubscribe), butpr-counterand other actions did not — making this a systemic issue that would affect any new action added.2. Marquee timer overwrites loading spinner
All actions with marquee text animation have a
setIntervaltimer firing every 500ms. When settings change, the spinner is correctly shown, but the still-running marquee timer re-renders the button with the old cached display data within 0–500ms, overwriting the spinner with stale content.Environment