Repository navigation
Effects keyed on unstable identities (#66, Part 4) - #69
Merged
Merged
Conversation
… 4.1) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… 4.2) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eholder (#66, 4.3) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 18, 2026
Merged
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.
Fixes Part 4 of #66 (effects keyed on unstable identities). Each item has a test that failed before its fix.
useListingStatecomparesparamNamesby value, andonValueChangeruns only when the listing state actually changes. Before, it ran on every render with an inlineparamNames, and once on mount under StrictMode. (e86440b)SignaturePadreadstfrom a ref, so a new translator (a language switch, or an inlinemaps={{…}}onOnuProvider) no longer rebuilds the pad and wipes the drawing while the hidden input still holds the old signature. SignaturePad items from 8.5 are left alone. (5273494)_use-editor.ts): a rebuilt Tiptap editor (for example afterthaanais toggled) now starts from what the editor currently holds, not fromdefaultValue. The placeholder is read through a ref and redrawn when its text changes, so it follows the locale. A function placeholder (BlockEditor passes one inline) is compared by what it returns. (f446b09)useMergedRefreturns a React 19 ref callback with a cleanup. A ref that returns a cleanup now has it called on detach, instead of being called again withnull. (a352a06)FormandValidationSummarymerged their forwarded ref by hand in an inline callback. The forwarded ref was detached and reattached on every render, and its cleanup was dropped. Both now useuseMergedRef. Each has its own failing test. (d1c0b28, 2b14969)Skipped ([P] / device check)
LoadMoreautomode with an inlineonLoadMore([P], needs a real IntersectionObserver).Could not reproduce
Grep for the same pattern
tin hook deps:charts/format.ts,inputs/phone-input.tsx,listing/_dnd.tsx,editor/block-renderer.tsxandmedia/media-player.tsxareuseMemos that should recompute when the translation changes. The effects inlisting/data-table.tsxandlisting/filter-panel.tsxalready check a last-value ref, so a newtdoesn't make them announce again. I left these as they are.ui/carousel.tsx(itsonSelectis an internaluseCallback) andcharts/_map-chart-google.tsx(it only rebuilds the deck.gl layer). Neither showed a bug I could test.listing/load-more.tsxis 4.4 ([P]).FormandValidationSummarywere the only ones. Both are fixed above.Behaviour notes
useMergedRef's callback now returns a cleanup function. It still handles being called withnullby older ref composers.useListingStateno longer callsonValueChangewhen nothing changed. It still writes the URL whenever the state or URL options change.Verification
pnpm lint && pnpm format:check && pnpm typecheck: passpnpm --filter @javaabu/onu exec vitest run --maxWorkers=3: 197 files, 2867 passed, 1 skippednode scripts/check-docs.mjs: Docs OKpnpm build && pnpm --filter @javaabu/onu size: pass, no budget changes🤖 Generated with Claude Code