Skip to content

Bug: Stale data displayed when switching repositories in action settings #12

@vladhadzhiyski

Description

@vladhadzhiyski

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

  1. Add any repo-scoped action (e.g. Repo Stats or PR Counter) to a button
  2. Configure it with Repository A — wait for the count/stat to appear
  3. Open the action's settings and switch to Repository B
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions