Skip to content
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

Better Clusters/Contracts List #76

Merged
merged 11 commits into from
Feb 19, 2025

Conversation

JohnPhamous
Copy link
Contributor

No description provided.

Copy link

semanticdiff-com bot commented Feb 19, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  src/lib/contracts/ContractDisplay.tsx  19% smaller
  src/lib/clusters/clusters.tsx  18% smaller
  src/schema.ts  2% smaller
  package.json  1% smaller
  .cursor/rules/cli.mdc Unsupported file format
  deno.lock Unsupported file format
  src/lib/clusters/mock.ts  0% smaller
  src/lib/clusters/types.ts  0% smaller
  src/lib/contracts/mock.ts  0% smaller

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 enhances cluster and contract display functionality with improved UI components and comprehensive mock data for testing.

  • Added /src/lib/clusters/mock.ts and /src/lib/contracts/mock.ts with test data covering various states (upcoming, active, expired) and configurations
  • Enhanced /src/lib/clusters/clusters.tsx with new color-coded status badges and better interval data visualization
  • Introduced /src/lib/clusters/types.ts with UserFacingCluster interface for consistent typing
  • Refactored /src/lib/contracts/ContractDisplay.tsx to use little-date and improved status indicators
  • Added VM-related endpoints and contract fields in /src/schema.ts

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

@@ -22,8 +23,10 @@
"ink": "^5.0.1",
"ink-confirm-input": "^2.0.0",
"ink-spinner": "^5.0.0",
"ink-testing-library": "^4.0.0",
Copy link

Choose a reason for hiding this comment

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

style: ink-testing-library should be in devDependencies since it's only used for testing

Suggested change
"ink-testing-library": "^4.0.0",
"ink-testing-library": "^4.0.0",

{intervalData.map((data, index) => {
return (
<Box
key={`${index}-${data.quantity}`}
Copy link

Choose a reason for hiding this comment

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

logic: key should use interval start time instead of quantity since quantity could be duplicated within the same contract

@JohnPhamous JohnPhamous merged commit a22283a into main Feb 19, 2025
1 check passed
@JohnPhamous JohnPhamous deleted the johnphamous/eng-1338-cli-better-clusters-list branch February 19, 2025 00:33
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