Fix import error stack traces not visible when modal opens#67597
Open
shashbha14 wants to merge 5 commits into
Open
Fix import error stack traces not visible when modal opens#67597shashbha14 wants to merge 5 commits into
shashbha14 wants to merge 5 commits into
Conversation
Pedrinhonitz
suggested changes
May 27, 2026
bbovenzi
requested changes
May 27, 2026
Comment on lines
+67
to
+70
| useEffect(() => { | ||
| setOpenItems(filteredErrors.slice((page - 1) * PAGE_LIMIT, page * PAGE_LIMIT).map((err) => err.source)); | ||
| }, [filteredErrors, page]); | ||
|
|
Contributor
There was a problem hiding this comment.
Again, we should always try to avoid mixing useState and useEffect https://react.dev/learn/you-might-not-need-an-effect
And if it really is necessary then we should leave a comment justifying it.
Comment on lines
+89
to
+92
| <Accordion.Root | ||
| collapsible | ||
| multiple | ||
| onValueChange={(details) => setOpenItems(details.value)} |
Contributor
There was a problem hiding this comment.
We can use key and defaultValue in order to manage the openIds
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.
Closes #67456
Problem- The import errors modals (DAG and Plugin) rendered accordion items collapsed by default. Users had to manually expand each item to see the stack trace ,making the error information effectively hidden.
Fix-
Added controlled 'value'/'onValueChange' accordion state to both 'DAGImportErrorsModal' and 'PluginImportErrorsModal.' A 'useEffect' auto-expands all visible items whenever data loads or the page changes, so stack traces are immediately visible when the modal opens.