Skip to content

Conversation

@nshestakov
Copy link
Contributor

По всей видимости, обновление gravity ui сломало отображение информации на странице трансфера и ассинхронной репликации.

@nshestakov nshestakov changed the title Fixed transfer page fix: fixed transfer page Aug 6, 2025
@artemmufazalov artemmufazalov added this pull request to the merge queue Aug 7, 2025
Merged via the queue into ydb-platform:main with commit 0c05cc3 Aug 7, 2025
6 of 7 checks passed
@astandrik astandrik requested a review from Copilot August 7, 2025 10:18
Copy link
Contributor

Copilot AI left a 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

Comment on lines +23 to +26
return connection.OAuthToken !== undefined &&
('Token' in connection.OAuthToken || 'TokenSecretName' in connection.OAuthToken)
? 'OAuth'
: '';
Copy link

Copilot AI Aug 7, 2025

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.

Suggested change
return connection.OAuthToken !== undefined &&
('Token' in connection.OAuthToken || 'TokenSecretName' in connection.OAuthToken)
? 'OAuth'
: '';
return hasValidOAuthToken(connection.OAuthToken) ? 'OAuth' : '';

Copilot uses AI. Check for mistakes.
>
{items.map((item) => (
<DefinitionList.Item key={item.name} {...item} />
<DefinitionList.Item key={item.name} children={item.content} {...item} />
Copy link

Copilot AI Aug 7, 2025

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.

Suggested change
<DefinitionList.Item key={item.name} children={item.content} {...item} />
<DefinitionList.Item key={item.name} name={item.name} copyText={item.copyText}>
{item.content}
</DefinitionList.Item>

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants