-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix: avoid error validate nested DOM #6426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
qnixsynapse
approved these changes
Sep 12, 2025
dinhlongviolin1
approved these changes
Sep 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caution
Changes requested ❌
Reviewed everything up to 4293fe7 in 2 minutes and 20 seconds. Click for details.
- Reviewed
142lines of code in5files - Skipped
0files when reviewing. - Skipped posting
3draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. web-app/src/containers/dialogs/DeleteMessageDialog.tsx:44
- Draft comment:
The interactive div replacing the button only has an onKeyDown handler. Ensure that mouse click events are also handled (either via an explicit onClick or by confirming that DialogTrigger injects the click behavior) so that pointer users aren’t affected. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% The comment raises a valid accessibility concern about the div's click handling. However, the div is wrapped in DialogTrigger which likely handles click events automatically. UI component libraries typically handle this. Without seeing the DialogTrigger implementation though, I can't be 100% certain. I'm making assumptions about DialogTrigger's behavior without seeing its implementation. The comment author may have knowledge about DialogTrigger that I don't. While true, UI component libraries almost universally handle click events on their trigger elements. The presence of DialogTrigger and the fact this is a UI component strongly suggests click handling is covered. Given the presence of DialogTrigger and that this is clearly a UI component, we should err on the side of assuming click handling is properly implemented by the component library.
2. web-app/src/containers/dialogs/EditMessageDialog.tsx:67
- Draft comment:
This div used as a trigger has an onKeyDown handler for Enter and Space but no onClick. Verify that mouse clicks trigger the dialog (either via DialogTrigger or by adding an onClick) to maintain full interactivity. - Reason this comment was not posted:
Comment looked like it was already resolved.
3. web-app/src/containers/dialogs/DeleteMessageDialog.tsx:48
- Draft comment:
The inline onKeyDown logic (checking for 'Enter' or space) is repeated across multiple dialogs. Consider extracting this handler into a shared function or component to reduce duplication and improve maintainability. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% While the comment identifies potential duplication, I don't have evidence that this exact pattern is repeated "across multiple dialogs" as claimed. The two handlers in this file serve different purposes (open vs confirm). Without seeing other dialog files, I can't verify if this pattern truly needs extraction. The current inline implementation is clear and simple. I could be undervaluing the benefit of consistency in keyboard handling across the app. Maybe there are many other dialogs with similar patterns. Without concrete evidence of duplication across files, suggesting extraction could lead to premature abstraction. The current implementation is straightforward and localized. Delete the comment since we lack evidence of widespread duplication that would justify extraction, and the current implementation is clear and maintainable.
Workflow ID: wflow_h5EDnyBiW6wuOGfV
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Barecheck - Code coverage reportTotal: 29.38%Your code coverage diff: -0.05% ▾ Uncovered files and lines |
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.
Describe Your Changes
Fixes Issues
Make sure the issue not show on console
Self Checklist
Important
Replace
buttonelements withdivelements havingrole="button"andtabIndex=0to improve accessibility and prevent nested DOM errors in dialog components.buttonwithdivhavingrole="button"andtabIndex=0inDeleteMessageDialog.tsx,EditMessageDialog.tsx, andMessageMetadataDialog.tsx.onKeyDownhandlers to handleEnterandSpacekeys for opening dialogs.ErrorDialog.tsxandLoadModelErrorDialog.tsx.onKeyDownhandlers forEnterandSpacekeys to toggle error details.This description was created by
for 4293fe7. You can customize this summary. It will automatically update as commits are pushed.