Skip to content

Conversation

sareyu
Copy link
Collaborator

@sareyu sareyu commented Aug 20, 2025

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
378 371 0 5 2
Test Changes Summary ⏭️2

⏭️ Skipped Tests (2)

  1. Scroll to row, get shareable link, navigate to URL and verify row is scrolled into view (tenant/diagnostics/tabs/queries.test.ts)
  2. Copy result button copies to clipboard (tenant/queryEditor/queryEditor.test.ts)

Bundle Size: 🔽

Current: 84.41 MB | Main: 85.61 MB
Diff: 1.20 MB (-1.40%)

✅ Bundle size decreased.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

@sareyu sareyu linked an issue Aug 20, 2025 that may be closed by this pull request
greptile-apps[bot]

This comment was marked as outdated.

"@gravity-ui/components": "^4.4.0",
"@gravity-ui/date-components": "^3.2.3",
"@gravity-ui/date-utils": "^2.5.6",
"@gravity-ui/graph": "^1.1.4",
Copy link
Contributor

Choose a reason for hiding this comment

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

lets also remove paranoid

};

export const QueryBlockComponent = ({className}: Props) => {
return <div className={className} />;
Copy link
Contributor

Choose a reason for hiding this comment

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

should there really be no content here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, it's just an empty circle on schema

const content = useTooltipContent(block);

return (
<Popover
Copy link
Contributor

Choose a reason for hiding this comment

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

If content is big enough, it is impossible to see all of it

Screen.Recording.2025-09-29.at.17.50.01.mov

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

do we need actually? in this case for large graph block size will become too small for reading. I can implement simply canvas component but it's a bit complicated and I'm not sure there will be real user need

Copy link
Contributor

Choose a reason for hiding this comment

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

do we need actually? in this case for large graph block size will become too small for reading. I can implement simply canvas component but it's a bit complicated and I'm not sure there will be real user need

What if we set maximum height to popup? Let it be scroll inside it. I think it's rare case, and no problem if it won't be beautiful enough...

return (
<div className={b('canvas-container')}>
<YDBGraph key={theme} data={data} />
{true ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

lets remove it and get rid of @gravity-ui/paranoid

<div className={b('canvas-container')}>
<YDBGraph key={theme} data={data} />
{true ? (
<GravityGraph data={data} theme={theme} key={theme} />
Copy link
Contributor

Choose a reason for hiding this comment

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

Light theme is blinking when toggle tabs

Screen.Recording.2025-09-29.at.17.45.14.mov

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

this.levels = [];
}

// Построение структуры дерева
Copy link
Contributor

Choose a reason for hiding this comment

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

lets or remove comments at all either translate it to english

Copy link
Contributor

@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.

16 files reviewed, 6 comments

Edit Code Review Agent Settings | Greptile

return (
<div className={b('canvas-container')}>
<YDBGraph key={theme} data={data} />
{true ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

style: hardcoded true condition for feature flag - consider using a configuration constant or feature flag instead

Suggested change
{true ? (
{useGravityGraph ? (
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/containers/Tenant/Query/QueryResult/components/Graph/Graph.tsx
Line: 36:36

Comment:
style: hardcoded `true` condition for feature flag - consider using a configuration constant or feature flag instead

```suggestion
{useGravityGraph ? (
```

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines 18 to 30
const onZoomInClick = () => {
const cameraScale = graph.cameraService.getCameraScale();
graph.zoom({scale: cameraScale * ZOOM_STEP});
};

const onZoomOutClick = () => {
const cameraScale = graph.cameraService.getCameraScale();
graph.zoom({scale: cameraScale / ZOOM_STEP});
};

const onResetZoomClick = () => {
graph.zoom({scale: 1});
};
Copy link
Contributor

Choose a reason for hiding this comment

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

style: event handlers should be wrapped with useCallback to prevent unnecessary re-renders

Suggested change
const onZoomInClick = () => {
const cameraScale = graph.cameraService.getCameraScale();
graph.zoom({scale: cameraScale * ZOOM_STEP});
};
const onZoomOutClick = () => {
const cameraScale = graph.cameraService.getCameraScale();
graph.zoom({scale: cameraScale / ZOOM_STEP});
};
const onResetZoomClick = () => {
graph.zoom({scale: 1});
};
const onZoomInClick = useCallback(() => {
const cameraScale = graph.cameraService.getCameraScale();
graph.zoom({scale: cameraScale * ZOOM_STEP});
}, [graph]);
const onZoomOutClick = useCallback(() => {
const cameraScale = graph.cameraService.getCameraScale();
graph.zoom({scale: cameraScale / ZOOM_STEP});
}, [graph]);
const onResetZoomClick = useCallback(() => {
graph.zoom({scale: 1});
}, [graph]);
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/components/Graph/GraphControls.tsx
Line: 18:30

Comment:
style: event handlers should be wrapped with `useCallback` to prevent unnecessary re-renders

```suggestion
    const onZoomInClick = useCallback(() => {
        const cameraScale = graph.cameraService.getCameraScale();
        graph.zoom({scale: cameraScale * ZOOM_STEP});
    }, [graph]);

    const onZoomOutClick = useCallback(() => {
        const cameraScale = graph.cameraService.getCameraScale();
        graph.zoom({scale: cameraScale / ZOOM_STEP});
    }, [graph]);

    const onResetZoomClick = useCallback(() => {
        graph.zoom({scale: 1});
    }, [graph]);
```

How can I resolve this? If you propose a fix, please make it concise.

const {graph, start} = useGraph(config);

React.useEffect(() => {
// на всякий случай, хотя маунт больше времени занимает, чем расчёт
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Russian comment should be translated to English for consistency with project standards

Suggested change
// на всякий случай, хотя маунт больше времени занимает, чем расчёт
// Just in case, although mounting takes more time than calculation
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/components/Graph/GravityGraph.tsx
Line: 69:69

Comment:
style: Russian comment should be translated to English for consistency with project standards

```suggestion
        // Just in case, although mounting takes more time than calculation
```

How can I resolve this? If you propose a fix, please make it concise.

: block.name}
{block.tables ? (
<div>
<Text color="secondary">Tables: </Text>
Copy link
Contributor

Choose a reason for hiding this comment

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

style: hardcoded text 'Tables: ' should use i18n for internationalization

Suggested change
<Text color="secondary">Tables: </Text>
<Text color="secondary">{i18n('label_tables')}: </Text>
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/components/Graph/BlockComponents/StageBlockComponent.tsx
Line: 19:19

Comment:
style: hardcoded text 'Tables: ' should use i18n for internationalization

```suggestion
                    <Text color="secondary">{i18n('label_tables')}: </Text>
```

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines 42 to 62
const useTooltipContent = (block: ExtendedTBlock) => {
const firstTab = block?.stats?.[0]?.group || '';
const [activeTab, setActiveTab] = useState(firstTab);

return (
<TabProvider value={activeTab} onUpdate={setActiveTab}>
<TabList className={b('tooltip-tabs')}>
{block?.stats?.map((item) => (
<Tab value={item.group} key={item.group}>
{item.group}
</Tab>
))}
</TabList>
{block?.stats?.map((item) => (
<TabPanel value={item.group} key={item.group}>
{item.stats?.map(getStatsContent)}
</TabPanel>
))}
</TabProvider>
);
};
Copy link
Contributor

Choose a reason for hiding this comment

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

style: useTooltipContent hook creates new JSX on every render - should be memoized for performance

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/components/Graph/TooltipComponent.tsx
Line: 42:62

Comment:
style: `useTooltipContent` hook creates new JSX on every render - should be memoized for performance

How can I resolve this? If you propose a fix, please make it concise.

this.blocks = new Map(blocks.map((block: any) => [block.id, {...block}]));
this.connections = connections;

// Настройки отступов
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Russian comment should be translated to English for consistency

Suggested change
// Настройки отступов
// Layout settings
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/components/Graph/treeLayout.ts
Line: 17:17

Comment:
style: Russian comment should be translated to English for consistency

```suggestion
        // Layout settings
```

How can I resolve this? If you propose a fix, please make it concise.

@sareyu sareyu marked this pull request as ready for review September 30, 2025 14:41
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.

Migrate from @gravity-ui/paranoid to @gravity-ui/graph
2 participants