Skip to content
Source
Sign inSign up
TanStack/pacer

fix: support late-mounted Pacer Devtools #239

Openbeaussan(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/239/headopened

Summary

  • replay keyed Pacer utilities when Devtools mounts after their initial events
  • keep the existing event-bus subscriptions for relayed and public client events
  • deliver future same-runtime updates independently of the EventClient retry state
  • replace the placeholder Devtools test with the production late-mount sequence

Impact

  • Architecture: augments the existing keyed instance registry with event metadata and a guarded subscription; it does not add a second registry or replace the serialized event bus
  • Performance / bundle size: adds a small in-memory listener set and registry metadata, with no new dependency
  • Risk: keyed instances remain strongly retained by the existing registry until another instance replaces the same key; this PR does not introduce an unregister lifecycle
  • Compatibility: @tanstack/pacer-devtools now requires @tanstack/pacer >=0.21.2 for the registry subscription API
  • User-facing changes: a lazily mounted Pacer Devtools panel can discover existing utilities and continue receiving updates after connection retries were exhausted

Root cause

EventClient permanently stops attempting bus delivery after five failed connection retries. The Devtools provider previously subscribed only to future bus events, so utilities created before a lazy-mounted panel could not be discovered and later events remained invisible.

Testing

  • pnpm --filter @tanstack/pacer test:lib --run — 522 tests passed
  • pnpm --filter @tanstack/pacer-devtools test:lib --run
  • typechecks and ESLint for both affected packages
  • builds for both affected packages
  • Prettier, Sherif, Knip, and git diff --check
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Draft detected.

      Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: defaults

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 6db7a729-d5b2-44b0-a95a-4602e22645a6

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    2. nx-cloud[bot](GitHub profile, opens in a new tab)commented

      View your CI Pipeline Execution ↗ for commit df17e6f51efe99e54b243293d6394a98a292e155

      CommandStatusDurationResult
      nx affected --targets=test:eslint,test:sherif,t...✅ Succeeded6m 57sView ↗
      nx run-many --targets=build --exclude=examples/**✅ Succeeded17sView ↗

      ☁️ Nx Cloud last updated this comment at 2026-07-29 23:15:41 UTC

    3. More templates

      @tanstack/angular-pacer

      npm i https://pkg.pr.new/@tanstack/angular-pacer@239

      @tanstack/pacer

      npm i https://pkg.pr.new/@tanstack/pacer@239

      @tanstack/pacer-devtools

      npm i https://pkg.pr.new/@tanstack/pacer-devtools@239

      @tanstack/pacer-lite

      npm i https://pkg.pr.new/@tanstack/pacer-lite@239

      @tanstack/preact-pacer

      npm i https://pkg.pr.new/@tanstack/preact-pacer@239

      @tanstack/preact-pacer-devtools

      npm i https://pkg.pr.new/@tanstack/preact-pacer-devtools@239

      @tanstack/react-pacer

      npm i https://pkg.pr.new/@tanstack/react-pacer@239

      @tanstack/react-pacer-devtools

      npm i https://pkg.pr.new/@tanstack/react-pacer-devtools@239

      @tanstack/solid-pacer

      npm i https://pkg.pr.new/@tanstack/solid-pacer@239

      @tanstack/solid-pacer-devtools

      npm i https://pkg.pr.new/@tanstack/solid-pacer-devtools@239

      commit: 3096a13

Sign in to join this conversation.