Repository navigation
Conversation
Room detail passes an inline onClose, so every parent render re-ran the open effect and moved focus back to the close button.
This was referenced Oct 26, 2026
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.
What and why
DialogShellinCompetitionApiWorkspace.tsxran its open-time effect with[onClose]as a dependency.RoomApiDetailpasses() => setJoinOpen(false), a new function on every render, so whenever the leaderboard or "my bots" request resolved while the join dialog was open, the effect cleaned up and re-ran: focus jumped back to the close button and keystrokes landed outside the field the user was typing in.The same bug explains an intermittent failure in
submits room creation schedule and joins with a validation run: when the lobby re-renders while "새 대회" is being typed, focus jumps to "대회 만들기 닫기" and the space key presses it, closing the dialog. A throwaway probe that lands a lobby re-render mid-typing reproduces this ondevelopand passes on this branch.The effect now runs once per open.
onCloseis read through a ref that tracks the latest prop, so Escape still calls the current handler.Verified
keeps focus in the join dialog while the room detail re-rendersfails ondevelop(focus is on the close button) and passes with the fix.node --test scripts/test-github-action-pins.mjs scripts/test-real-api-integration-workflow.mjs: 2 passedpnpm typecheck: cleanpnpm exec vitest run(Node 24): 58 files, 689 tests passedpnpm build && node scripts/assert-production-bundle.mjs: passedCI=1 pnpm e2e: 26 passedChecklist