Forensic render-issue audit (post §4 / §16) — report only, no code changes#321
Closed
Copilot wants to merge 1 commit into
Closed
Forensic render-issue audit (post §4 / §16) — report only, no code changes#321Copilot wants to merge 1 commit into
Copilot wants to merge 1 commit into
Conversation
Copilot
AI
changed the title
[WIP] Run forensic analysis for React rendering issues
Forensic render-issue audit (post §4 / §16) — report only, no code changes
Jun 4, 2026
Owner
|
Out of date after #330 |
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.
Static survey of the post-§4 / §16 codebase against the 10 anti-patterns in the issue. No code changes; per the issue instructions this PR is the report.
Summary
Codebase is largely clean. The §16 discipline (refs-to-latest,
useSyncExternalStoreselectors, version-keyed broadcast,EMPTY_*sentinels) is applied consistently. One real cleanup hazard and one edge-case timer found; everything else flagged by a casual scan is intentional and documented inPERF-ARCHITECTURE.md.HIGH — likely real bug
showErrorschedules an uncancelledsetTimeout—src/hooks/useCommon.ts:78–84jest.useFakeTimers(), fire two errors, assertgetTimerCount() === 2(current) → fix → flip to=== 1. Plus: error → unmount →runAllTimers()→ assert no React warning.MEDIUM — worth pinning behaviourally
setTimeouton<input onFocus>—src/ValueNodes.tsx:225.select()on a detached node.userEvent.tab()across N number inputs while toggling filter; no errors, no leftover timers post-blur.LOW / intentional (do not touch)
useKeyboardListenerre-attach pattern — balanced add/remove, ref-to-latest absorbs identity churn (ValueNodes.tsx:295–350).useAppliedBroadcastdeps[version, commands]— deliberate, documented (CollapseProvider.tsx:221–248).() => setX(...)callbacks on non-memo'd leaves (StringDisplay, raw<input>,EditButtons) — no memoisation defeated.Provider value={...}sites are stable:EditingProviderusesstoreRef.current;CollapseProvider,ThemeProvider,DragSourceProviderareuseMemo'd;JsonEditordefaults via module-scopedEMPTY_*constants.useStatelazy-init audit clean. No index-based keys in mutable hot-path lists.useEditingSelectorconstrains return to primitive.Cleanup hazards
src/hooks/useCommon.ts:81setTimeoutsrc/ValueNodes.tsx:225setTimeoutsrc/JsonEditor.tsx:170–182setTimeout(search debounce)src/ValueNodes.tsx:320–327setTimeout+addEventListenerNo
setInterval/MutationObserver/ResizeObserver/IntersectionObserverusage insrc/— nothing to leak in those categories.Recommended next steps
showErrorbehaviour, then fix in a follow-up PR.NumberValuefocus-timeout edge case; fix opportunistically when the file is next touched.showErroronce fixed, referencing the cancellation requirement.Out of scope (per the issue): large-fixture wall-clock benchmarks.