Skip to content

feat(webui/shard): redesign shard page #325

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

Merged
merged 1 commit into from
Jul 14, 2025

Conversation

Jitmisra
Copy link
Contributor

@Jitmisra Jitmisra commented Jul 13, 2025

redesigned shard page. If you have any feedback or want to add anything, feel free to tell.

Monosnap.screencast.2025-07-14.03-46-04.mp4

@PragmaTwice PragmaTwice requested a review from Copilot July 14, 2025 01:18
Copy link

@Copilot 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 redesigns the shard page with a complete UI overhaul, featuring improved mobile responsiveness, enhanced filtering and sorting capabilities, and a more modern dashboard-style interface.

  • Transforms the shard listing from a simple grid to a sophisticated table with search, filter, and sort functionality
  • Adds comprehensive resource statistics dashboard with visual metrics for shards, nodes, slots, and migration status
  • Implements responsive design improvements for the sidebar with mobile-specific toggle behavior

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
webui/src/app/ui/sidebar.tsx Adds mobile responsiveness with dynamic width control and toggle functionality
webui/src/app/ui/formCreation.tsx Extends ShardCreation component to support children prop for flexible button rendering
webui/src/app/namespaces/[namespace]/clusters/[cluster]/page.tsx Complete redesign with dashboard metrics, advanced filtering/sorting, and responsive layout

Comment on lines +1217 to +1226
onClick: () => {},
}}
/>
</Box>
<div className="hidden">
<ShardCreation
position="card"
namespace={namespace}
cluster={cluster}
/>
</div>
Copy link
Preview

Copilot AI Jul 14, 2025

Choose a reason for hiding this comment

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

The EmptyState action onClick handler is defined as an empty function () => {}, which means clicking the 'Create Shard' button will do nothing. This should either trigger the ShardCreation dialog or be removed if not functional.

Copilot uses AI. Check for mistakes.

Comment on lines +1217 to +1226
onClick: () => {},
}}
/>
</Box>
<div className="hidden">
<ShardCreation
position="card"
namespace={namespace}
cluster={cluster}
/>
</div>
Copy link
Preview

Copilot AI Jul 14, 2025

Choose a reason for hiding this comment

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

The ShardCreation component is rendered with className="hidden" which suggests it's not being used properly. If this is meant to be triggered by the EmptyState action, it should be implemented correctly rather than hidden.

Copilot uses AI. Check for mistakes.

setSortAnchorEl(null);
};

const filteredAndSortedShards = shardsData
Copy link
Preview

Copilot AI Jul 14, 2025

Choose a reason for hiding this comment

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

The filtering and sorting logic runs on every render without memoization. Consider using useMemo to optimize performance, especially with large datasets: const filteredAndSortedShards = useMemo(() => shardsData.filter(...).sort(...), [shardsData, searchTerm, filterOption, sortOption])

Copilot uses AI. Check for mistakes.

>
Cluster in namespace: {namespace}
Manage shards in this cluster
Copy link
Preview

Copilot AI Jul 14, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider using more descriptive text. 'Manage shards in this cluster' could be 'View and manage cluster shards' or 'Monitor cluster shard distribution' for better clarity.

Suggested change
Manage shards in this cluster
View and manage cluster shards

Copilot uses AI. Check for mistakes.

@codecov-commenter
Copy link

codecov-commenter commented Jul 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.01%. Comparing base (6c56470) to head (e72171d).
Report is 71 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #325      +/-   ##
============================================
+ Coverage     43.38%   47.01%   +3.62%     
============================================
  Files            37       45       +8     
  Lines          2971     4401    +1430     
============================================
+ Hits           1289     2069     +780     
- Misses         1544     2124     +580     
- Partials        138      208      +70     
Flag Coverage Δ
unittests 47.01% <ø> (+3.62%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@PragmaTwice PragmaTwice requested a review from git-hulk July 14, 2025 06:20
@git-hulk git-hulk merged commit 6bac9a4 into apache:unstable Jul 14, 2025
4 checks passed
@git-hulk
Copy link
Member

@Jitmisra Thanks for your great improvement.

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.

4 participants