Skip to content

fix: support late-mounted Pacer Devtools - #239

Draft
beaussan wants to merge 2 commits into
TanStack:mainfrom
beaussan:codex/fix-devtools-late-mount
Draft

fix: support late-mounted Pacer Devtools#239
beaussan wants to merge 2 commits into
TanStack:mainfrom
beaussan:codex/fix-devtools-late-mount

Conversation

@beaussan

Copy link
Copy Markdown

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

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

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.

@nx-cloud

nx-cloud Bot commented Jul 29, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit df17e6f

Command Status Duration Result
nx affected --targets=test:eslint,test:sherif,t... ✅ Succeeded 6m 57s View ↗
nx run-many --targets=build --exclude=examples/** ✅ Succeeded 17s View ↗

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

@pkg-pr-new

pkg-pr-new Bot commented Jul 29, 2026

Copy link
Copy Markdown
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 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.

1 participant