Skip to content

Fixed some frontend issues #1

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fixed some frontend issues #1

wants to merge 1 commit into from

Conversation

lizard-boy
Copy link

No description provided.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR introduces both a critical logical error in API key migration handling and adds new node graph interaction capabilities.

  • Critical bug in /public/app/features/api-keys/ApiKeysPage.tsx: Changed condition failedApikeyIDs.length !== 0 to >= 0 causing failed migration details to always display
  • Added double-click support in /public/app/plugins/panel/nodeGraph/Node.tsx through new optional handler prop
  • Modified mainStatValue index calculation in Node.tsx to use index + 1 which may affect data display
  • Removed redundant x/y coordinate check in NodeContents component
  • Improved error messaging for API key migration failures with more detailed status information

2 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile

@@ -189,7 +189,7 @@ export const MigrationSummary: React.FC<MigrationSummaryProps> = ({ visible, dat
</p>
</div>
)}
{data.failedApikeyIDs.length !== 0 && (
{data.failedApikeyIDs.length >= 0 && (
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: This condition will always be true since array lengths cannot be negative. Should remain !== 0 to only show failure details when there are actual failures.

if (!(node.x !== undefined && node.y !== undefined)) {
return null;
}
const mainStatValue = node.mainStat?.values[node.dataFrameRowIndex + 1];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Accessing index + 1 could cause array bounds issues if mainStat.values array length matches dataFrameRowIndex

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.

1 participant