-
Notifications
You must be signed in to change notification settings - Fork 17
fix: fixed transfer page #2683
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
fix: fixed transfer page #2683
Conversation
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.
Pull Request Overview
This PR fixes display issues on the transfer and asynchronous replication pages that were caused by a Gravity UI update. The changes address two specific problems: proper OAuth token validation in credentials display and correct content rendering in definition lists.
- Improved OAuth token validation to handle cases where the token structure exists but lacks actual token data
- Fixed definition list item rendering by explicitly passing content as children prop
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/containers/Tenant/Diagnostics/Overview/TransferInfo/Credentials.tsx | Enhanced OAuth token validation to check for actual token presence |
| src/components/YDBDefinitionList/YDBDefinitionList.tsx | Fixed definition list item rendering by explicitly setting children prop |
| return connection.OAuthToken !== undefined && | ||
| ('Token' in connection.OAuthToken || 'TokenSecretName' in connection.OAuthToken) | ||
| ? 'OAuth' | ||
| : ''; |
Copilot
AI
Aug 7, 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.
[nitpick] The complex conditional logic spread across multiple lines reduces readability. Consider extracting this validation into a helper function like hasValidOAuthToken(connection.OAuthToken) to improve maintainability and make the intent clearer.
| return connection.OAuthToken !== undefined && | |
| ('Token' in connection.OAuthToken || 'TokenSecretName' in connection.OAuthToken) | |
| ? 'OAuth' | |
| : ''; | |
| return hasValidOAuthToken(connection.OAuthToken) ? 'OAuth' : ''; |
| > | ||
| {items.map((item) => ( | ||
| <DefinitionList.Item key={item.name} {...item} /> | ||
| <DefinitionList.Item key={item.name} children={item.content} {...item} /> |
Copilot
AI
Aug 7, 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.
[nitpick] Explicitly setting the children prop alongside spreading {...item} could lead to conflicts if item also contains a children property. The explicit children={item.content} will override any children in the spread, but this pattern can be confusing. Consider using content={item.content} if the component supports it, or ensure the prop precedence is intentional.
| <DefinitionList.Item key={item.name} children={item.content} {...item} /> | |
| <DefinitionList.Item key={item.name} name={item.name} copyText={item.copyText}> | |
| {item.content} | |
| </DefinitionList.Item> |
По всей видимости, обновление gravity ui сломало отображение информации на странице трансфера и ассинхронной репликации.