Skip to content

Refactor: Clean up unused chart and navigation imports, and make sidebar skeleton width deterministic.#2

Merged
ilramdhan merged 1 commit intomutugading:mainfrom
ilramdhan:feat/integration-with-proto-uom-service
Feb 2, 2026
Merged

Refactor: Clean up unused chart and navigation imports, and make sidebar skeleton width deterministic.#2
ilramdhan merged 1 commit intomutugading:mainfrom
ilramdhan:feat/integration-with-proto-uom-service

Conversation

@ilramdhan
Copy link
Member

No description provided.

@ilramdhan ilramdhan requested a review from Copilot February 2, 2026 03:57
@ilramdhan ilramdhan self-assigned this Feb 2, 2026
@ilramdhan ilramdhan added the bug Something isn't working label Feb 2, 2026
@ilramdhan ilramdhan merged commit 3219aad into mutugading:main Feb 2, 2026
7 checks passed
Copy link

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 refactors the codebase by removing unused imports and fixing a potential hydration issue with the sidebar skeleton component. The changes improve code cleanliness by eliminating dead imports while making the sidebar skeleton width deterministic to prevent React hydration mismatches.

Changes:

  • Removed unused Lucide icon imports (Ruler, Calculator) from navigation configuration
  • Removed unused recharts imports (ResponsiveContainer, Tooltip) from chart components
  • Changed sidebar skeleton width from random to fixed value to avoid hydration warnings

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/config/navigation.ts Removed unused Ruler and Calculator icon imports
src/components/ui/sidebar.tsx Changed skeleton width from random to deterministic fixed value; minor formatting cleanup
src/components/layout/sidebar/app-sidebar.tsx Removed unused LucideIcon and NavGroup type imports
src/components/charts/pie-chart.tsx Removed unused ResponsiveContainer import
src/components/charts/bar-chart.tsx Removed unused ResponsiveContainer import
src/components/charts/area-chart.tsx Removed unused Tooltip and ResponsiveContainer imports

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +609 to +611
// Deterministic width to avoid impure function warning
// Using a fixed pattern that provides visual variety
const width = "70%"
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

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

The fixed width solution solves the hydration mismatch issue, but removes visual variety. Consider making the width configurable via an optional prop (e.g., width?: string) that defaults to "70%". This would allow consumers to provide different widths for multiple skeleton instances while maintaining deterministic behavior.

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

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant