Repository navigation
fix: catch unstable merged refs - #5429
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsAvatar (@astryxdesign/core) · View in Storybook
Button (@astryxdesign/core) · View in Storybook
SideNav (@astryxdesign/core) · View in Storybook
TabList (@astryxdesign/core) · View in Storybook
TopNav (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
nynexman4464
force-pushed
the
fix/detect-hoisted-merge-refs
branch
from
August 24, 2026 15:47
b6f4847 to
abb4212
Compare
nynexman4464
marked this pull request as ready for review
August 24, 2026 15:47
cixzhang
added a commit
that referenced
this pull request
Aug 24, 2026
#5429 landed while this PR was open.
cixzhang
added a commit
that referenced
this pull request
Aug 24, 2026
* docs: consolidate + credit changesets for v0.5.0 - add the PR reference to all 45 pending changesets, in prose rather than on the handle line (a bare @handle line is what check-changesets requires) - credit @rubyycheung, not @RubyCheung, for the Dialog responsive work in #5352; those are two different real GitHub accounts - add two missing changesets for merged work that changes published behaviour: #4605 (Breadcrumbs current-item weight) and #5259 (CLI unified search includes integration components) * docs: add the PR reference to the PowerSearch operator-menu changeset #5242 landed while this PR was open. * docs: add the PR reference to the merged-refs stability changeset #5429 landed while this PR was open.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@astryx/no-unstable-merged-refsnow that it covers more than inline expressionsconstinitialized by the importedmergeRefsinto a JSXrefuseMergedRefscan remain stable without losing status-label updatesThis is a separate follow-up to #5269 and is based directly on the commit that merged it to
main.Why
Assigning
mergeRefs(...)to a local constant does not stabilize it: the component still creates a new callback on every render, so React detaches and reattaches the ref during unrelated updates. The original rule only walked upward from amergeRefscall to a JSXref, so a variable declaration and laterref={mergedRef}lived in disconnected AST subtrees and escaped detection.The extension resolves only same-file, same-function variable bindings whose initializer is a direct call to the imported
mergeRefs. It intentionally does not chase assignments, alias chains, imported values, or stable module-scope refs.Fail-first evidence
Should have 1 error but had 0for a localconst mergedRef = mergeRefs(...)used as a JSX ref.null, then the same element).Test plan
pnpm lint:strict(0 errors; pre-existing warnings only)pnpm test(569 files, 11,821 tests on the functional change; the rule-only rename is also covered by CI)pnpm buildno-unstable-merged-refsRuleTester suite (16 tests)