Skip to content

Conversation

@DaryaVorontsova
Copy link
Contributor

@DaryaVorontsova DaryaVorontsova commented Nov 27, 2025

Stand: https://nda.ya.ru/t/msLLFRr57PEHGX

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
378 375 0 1 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: 62.50 MB | Main: 62.48 MB
Diff: +0.01 MB (0.02%)

⚠️ Bundle size increased. Please review.

ℹ️ 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.
## Key Changes
  • Visual Design Updates: Updated border radii, spacing, font sizes, and colors to use modern design tokens (var(--g-border-radius-m), var(--g-spacing-*), etc.)
  • Interactive Hover States: Implemented a sophisticated hover system where hovering over a disk highlights it and dims other disks in the same column, improving visual focus and user experience
  • Hover Popup Improvements: Refactored HoverPopup component to use useEffect for callback timing, preventing stale closures and improving debounce behavior when moving between adjacent disks
  • State Management: Lifted highlight state management to parent components (useStorageGroupsSelectedColumns, useStorageNodesSelectedColumns) enabling coordinated highlighting across disk collections
  • Context-Aware Highlighting: Added isTopLevelStorageContext helper to only enable hover highlighting on storage overview pages, not on detail pages focused on specific nodes/disks
  • Donor Disk Visual Treatment: Simplified donor disk logic to show striped pattern and icon for all donor disks, not just replicating ones
  • CSS Architecture: Added hover-dim-column-class mixin that uses :has() selector to dim non-highlighted disks when any disk in the column is hovered

Design System Improvements

The PR consistently migrates from hardcoded values to design tokens, improving maintainability and visual consistency across the console.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk - it's a well-structured visual design update
  • The changes are primarily visual design updates with a clear, systematic approach. The hover interaction system is well-architected with proper state management, debouncing, and context-awareness. The refactoring of HoverPopup to use useEffect for callbacks is a correct fix for potential stale closure issues. Code follows existing patterns and uses TypeScript properly throughout.
  • No files require special attention - one minor style suggestion in VDisks.scss about using design tokens consistently

Important Files Changed

File Analysis

Filename Score Overview
src/styles/mixins.scss 5/5 Updated entity-state-colors mixin to support highlighted states with hover colors, added hover-dim-column-class mixin for hover interactions
src/components/DiskStateProgressBar/DiskStateProgressBar.tsx 5/5 Added highlighted and darkened props for interactive hover states
src/components/DiskStateProgressBar/DiskStateProgressBar.scss 5/5 Updated design tokens, border radii, font sizes, spacing, and added darkened state for hover effects
src/components/HoverPopup/HoverPopup.tsx 5/5 Improved popup hover interactions with better debounce handling and fixed callback timing using useEffect
src/containers/Storage/Disks/Disks.tsx 5/5 Moved highlighted state management to parent, updated styling with highlight/darken logic
src/containers/Storage/VDisks/VDisks.tsx 5/5 Added highlight state props propagation and progress bar class name
src/containers/Storage/PaginatedStorageGroupsTable/columns/columns.tsx 5/5 Implemented highlight state management for VDisks and Disks columns with width adjustments

Sequence Diagram

sequenceDiagram
    participant User
    participant Table as Storage Table
    participant Column as Column Component
    participant Disks as Disks/VDisks Component
    participant Item as VDisk/PDisk Item
    participant HoverPopup
    participant ProgressBar as DiskStateProgressBar

    User->>Item: Hover over disk
    Item->>HoverPopup: onMouseEnter
    HoverPopup->>HoverPopup: debouncedHandleShowPopup
    Note over HoverPopup: Delay (delayOpen)
    HoverPopup->>HoverPopup: setIsPopupVisible(true)
    HoverPopup->>HoverPopup: useEffect detects internalOpen change
    HoverPopup->>Item: onShowPopup callback
    Item->>Column: setHighlightedVDisk(id)
    Column->>Disks: highlightedVDisk={id}
    Disks->>Item: highlighted={true}
    Disks->>Item: darkened={false} (for current disk)
    Disks->>Item: darkened={true} (for other disks)
    Item->>ProgressBar: highlighted={true/false}, darkened={true/false}
    ProgressBar->>ProgressBar: Apply CSS classes with hover colors
    Note over Table,ProgressBar: CSS hover-dim-column-class mixin<br/>dims non-highlighted disks
    HoverPopup->>User: Show popup content

    User->>Item: Mouse leaves disk
    Item->>HoverPopup: onMouseLeave
    HoverPopup->>HoverPopup: debouncedHandleHidePopup
    Note over HoverPopup: Delay (delayClose)
    HoverPopup->>HoverPopup: setIsPopupVisible(false)
    HoverPopup->>HoverPopup: useEffect detects internalOpen change
    HoverPopup->>Item: onHidePopup callback
    Item->>Column: setHighlightedVDisk(undefined)
    Column->>Disks: highlightedVDisk={undefined}
    Disks->>Item: highlighted={false}, darkened={false}
    Item->>ProgressBar: highlighted={false}, darkened={false}
    ProgressBar->>ProgressBar: Remove highlight CSS classes
Loading

Greptile Overview

Greptile Summary

This PR updates the visual design of disk indicators across the storage console with modern design tokens and implements an interactive hover system for better user experience.

Key Improvements:

  • Design System Migration: Consistently migrated from hardcoded values to design tokens (var(--g-border-radius-m), var(--g-spacing-*), etc.) for better maintainability
  • Interactive Hover Experience: Implemented sophisticated hover highlighting where hovering over a disk highlights it and dims other disks in the same column, improving visual focus
  • Better State Management: Lifted highlight state to parent components enabling coordinated highlighting across disk collections
  • Context-Aware Highlighting: Added isTopLevelStorageContext helper to only enable hover effects on overview pages, not on detail pages
  • Improved HoverPopup: Fixed potential stale closure issues by moving callbacks to useEffect, preventing timing bugs when moving between adjacent disks
  • Donor Disk Visual Update: Simplified donor disk logic to show striped pattern and icon for all donor disks (not just replicating ones)
  • VDisk Severity Update: Changed unavailable VDisks from grey to red to better indicate error state

Technical Architecture:
The hover system uses a hover-dim-column-class mixin with CSS :has() selector to dim non-highlighted disks when any disk in the column is hovered. State is managed at the column level and propagated down to individual disk components.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk - it's a well-structured visual design update
  • The changes are primarily visual design updates with a clear, systematic approach. The hover interaction system is well-architected with proper state management, debouncing, and context-awareness. The refactoring of HoverPopup to use useEffect for callbacks is a correct fix for potential stale closure issues. Code follows existing patterns, uses TypeScript properly throughout, and all tests have been updated to reflect the new behavior.
  • No files require special attention - the implementation is solid throughout

Important Files Changed

File Analysis

Filename Score Overview
src/styles/mixins.scss 5/5 Updated entity-state-colors mixin to support highlighted states with hover colors, added hover-dim-column-class mixin for hover interactions
src/components/HoverPopup/HoverPopup.tsx 5/5 Improved popup hover interactions with better debounce handling and fixed callback timing using useEffect
src/components/DiskStateProgressBar/DiskStateProgressBar.tsx 5/5 Added highlighted and darkened props for interactive hover states, improved handling of missing data with noDataPlaceholder prop
src/containers/Storage/Disks/Disks.tsx 5/5 Moved highlighted state management to parent, updated styling with highlight/darken logic for hover interactions
src/containers/Storage/PaginatedStorageGroupsTable/columns/columns.tsx 5/5 Implemented highlight state management for VDisks and Disks columns with width adjustments and context-aware highlighting
src/containers/Storage/utils/index.ts 5/5 Added isTopLevelStorageContext helper and replaced valueIsDefined with isNil for consistency
src/utils/disks/calculateVDiskSeverity.ts 5/5 Changed unavailable VDisk severity from grey to red (error) to better indicate problems

Sequence Diagram

sequenceDiagram
    participant User
    participant Table as Storage Table
    participant Column as Column Component
    participant Disks as Disks/VDisks Component
    participant Item as VDisk/PDisk Item
    participant HoverPopup
    participant ProgressBar as DiskStateProgressBar

    User->>Item: Hover over disk
    Item->>HoverPopup: onMouseEnter
    HoverPopup->>HoverPopup: debouncedHandleShowPopup
    Note over HoverPopup: Delay (delayOpen)
    HoverPopup->>HoverPopup: setIsPopupVisible(true)
    HoverPopup->>HoverPopup: useEffect detects internalOpen change
    HoverPopup->>Item: onShowPopup callback
    Item->>Column: setHighlightedVDisk(id)
    Column->>Disks: highlightedVDisk={id}
    Disks->>Item: highlighted={true}
    Disks->>Item: darkened={false} (for current disk)
    Disks->>Item: darkened={true} (for other disks)
    Item->>ProgressBar: highlighted={true/false}, darkened={true/false}
    ProgressBar->>ProgressBar: Apply CSS classes with hover colors
    Note over Table,ProgressBar: CSS hover-dim-column-class mixin<br/>dims non-highlighted disks
    HoverPopup->>User: Show popup content

    User->>Item: Mouse leaves disk
    Item->>HoverPopup: onMouseLeave
    HoverPopup->>HoverPopup: debouncedHandleHidePopup
    Note over HoverPopup: Delay (delayClose)
    HoverPopup->>HoverPopup: setIsPopupVisible(false)
    HoverPopup->>HoverPopup: useEffect detects internalOpen change
    HoverPopup->>Item: onHidePopup callback
    Item->>Column: setHighlightedVDisk(undefined)
    Column->>Disks: highlightedVDisk={undefined}
    Disks->>Item: highlighted={false}, darkened={false}
    Item->>ProgressBar: highlighted={false}, darkened={false}
    ProgressBar->>ProgressBar: Remove highlight CSS classes
Loading

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.

10 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@Raubzeug
Copy link
Contributor

Please check border-radius for vdisks column. As a see in figma, for all disks border-radius should be m size.

Screenshot 2025-11-28 at 10 53 23

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.

10 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

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.

13 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@DaryaVorontsova
Copy link
Contributor Author

ToDo: Fix pdisks page and dimming disks for one vdisk page

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.

13 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

astandrik
astandrik previously approved these changes Dec 2, 2025
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 updates the visual design of disk indicators throughout the console with improved styling, hover states, and more compact layouts. The changes modernize the appearance of PDisk and VDisk progress bars while making their interactive states more visually clear.

  • Updated entity state colors with hover/highlighted states and adjusted border colors for better visual hierarchy
  • Modified donor disk logic to display donor indicators regardless of replication state
  • Adjusted component widths and spacing for more compact, consistent layouts

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/utils/disks/helpers.ts Simplified donor icon logic to show for all donors, not just replicating ones
src/styles/mixins.scss Enhanced entity-state-colors mixin with hover/highlighted states and adjusted color values
src/containers/Storage/utils/useStorageColumnsSettings.ts Increased minimum PDisk width from 120px to 165px
src/containers/Storage/VDisks/VDisks.scss Reduced VDisk item width from 90px to 55px and updated margins
src/containers/Storage/PaginatedStorageGroupsTable/columns/columns.tsx Reduced VDisks and Disks column widths for more compact layout
src/containers/Storage/PDisk/PDisk.tsx Added highlighted state when popup is shown
src/containers/Storage/Disks/Disks.tsx Updated VDisks container width constant
src/containers/Storage/Disks/Disks.scss Updated spacing, sizing, and border-radius values
src/components/YDBDefinitionList/YDBDefinitionList.scss Removed max-width constraint from properties list
src/components/VDiskPopup/VDiskPopup.tsx Changed label logic to show donor OR replication label (not both)
src/components/VDisk/VDisk.tsx Updated donor display logic and added highlighted state
src/components/DiskStateProgressBar/DiskStateProgressBar.tsx Added highlighted prop to component interface
src/components/DiskStateProgressBar/DiskStateProgressBar.scss Added opacity states, hover effects, overflow handling, and updated typography

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.

24 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

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.

24 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

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.

24 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

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.

Additional Comments (1)

  1. src/containers/Storage/VDisks/VDisks.scss, line 10-12 (link)

    style: hardcoded 12px should use design token

24 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

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.

28 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

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.

28 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

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.

29 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

return <div className={b('title')}>{`${Math.floor(diskAllocatedPercent)}%`}</div>;
}

if (!compact && !(diskAllocatedPercent >= 0) && noDataPlaceholder) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

!(diskAllocatedPercent >= 0) is hard to read

wouldnt it be better to use diskAllocatedPercent < 0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

diskAllocatedPercent can be NaN and both of these checks (diskAllocatedPercent < 0 and diskAllocatedPercent >= 0) would be wrong(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So I wanted to use this check when diskAllocatedPercent < 0 or NaN

Copy link
Collaborator

Choose a reason for hiding this comment

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

this is even more implicit(
I suggest to make code more readable
like isNumerical(diskAllocatedPercent) && diskAllocatedPercent < 0

() => debounce(hidePopup, delayClose),
() =>
debounce(() => {
hidePopup();
Copy link
Collaborator

Choose a reason for hiding this comment

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

looks like we could just debounce(hidePopup)

NodeId: 224,

Severity: 0,
Severity: 5,
Copy link
Collaborator

Choose a reason for hiding this comment

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

How will Severity 0 be displayed?

Copy link
Contributor Author

@DaryaVorontsova DaryaVorontsova Dec 11, 2025

Choose a reason for hiding this comment

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

Severity 0 - is "grey" disks (disks with no available information).
We decided to show and consider Vdisk with no state information like error Vdisk, so I want to color such disks in red. (But this requirement is only about Vdisk, Pdisk with no state information should be grey)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I meant we changed tests here - but do we test Severity: 0 case?

Copy link
Contributor Author

@DaryaVorontsova DaryaVorontsova Dec 11, 2025

Choose a reason for hiding this comment

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

To be honest, for vdisk - no. I can explain:
If we don't have VDiskState - we consider VDisk as a wrong disk and color it in red (tests: Should display as unavailable when no VDiskState is provided)
Cases with Severity: 0 (grey) are possible for VDisks only as a fallback for unsupported vDiskState - I don't know, should we really test this behaviour (or maybe I didn't understand the question)))?

P.S. For PDisk tests include case with Severity: 0 case

}
};

const handleHidePopup = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick: would be good to wrap functions in useCallback to not be recreated on every render (and not cause possible rerenders in child components that depend on these recreated functions)

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.

29 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

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.

Update VDisk UI Components with New Design and Enhanced Tooltips

4 participants