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

feat: enhance supersim visual cli with mprocs #257

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

wolfcito
Copy link
Contributor

Description

This PR introduces the first phase of improving the visual development experience in supersim when running multiple nodes. The initial implementation uses mprocs to run and display supersim nodes in parallel, providing a quick solution that centralizes logs in a single interface. While mprocs doesn’t support all the desired visual enhancements (such as log tagging, use of emojis and icons, and collapsible sections), it provides a useful structure for running multiple nodes in parallel and is a solid starting point.

image image

Steps implemented in this phase:

  1. Configuration of mprocs to launch supersim and multiple anvil nodes in parallel.
  2. Redirecting logs to a persistent folder (supersim-logs) for easier access and future review.

Future steps to improve the visual experience:

  1. Log tags: Categorize log messages (e.g., [TRANSACTION], [DEPOSIT], etc.) to better organize information.
  2. Log coloring: Apply different colors to parts of log messages to enhance readability.
  3. Collapsible sections: Allow developers to expand or collapse sections of long logs to view summaries.
  4. Emojis and icons: Incorporate emojis to visually represent different types of events, such as ✅ for successful transactions or 🔄 for events in progress.

This initial phase establishes a functional foundation for parallel log visualization, with the possibility of further enhancement in later steps.

Tests

  • Verified that supersim and anvil nodes launch correctly in parallel using mprocs.
  • Manually validated that logs are saved in the supersim-logs folder.
  • No automated tests were added in this phase, as the functionality of mprocs is primarily visual and focuses on developer experience. Future planned visual enhancements may include additional tests.

Additional context

This PR represents the initial step towards an improved CLI for logs in supersim, where mprocs provides a provisional solution that simplifies parallel execution of multiple nodes. This initial phase offers a basic visualization while further specific features are developed to enhance the visual experience.

Metadata

@wolfcito wolfcito requested a review from a team as a code owner November 10, 2024 06:32
Copy link
Contributor

@jakim929 jakim929 left a comment

Choose a reason for hiding this comment

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

Appreciate your contribution!

But this does not satisfy the requirements. The binary that people run is supersim and that won't bundle in the typescript tooling (node, pnpm, etc.). Also we shouldn't be adding pnpm/typescript dependencies here.

In order for people to use this, they now need to clone the supersim repo, which is not the way supersim is meant to be consumed.

I think what would be helpful is to implement a TUI directly into supersim. One framework is https://github.com/charmbracelet/bubbletea but there are others too.

@wolfcito
Copy link
Contributor Author

Appreciate your contribution!

But this does not satisfy the requirements. The binary that people run is supersim and that won't bundle in the typescript tooling (node, pnpm, etc.). Also we shouldn't be adding pnpm/typescript dependencies here.

In order for people to use this, they now need to clone the supersim repo, which is not the way supersim is meant to be consumed.

I think what would be helpful is to implement a TUI directly into supersim. One framework is https://github.com/charmbracelet/bubbletea but there are others too.

Thank you for your feedback; let me review it to propose an implementation.

@fainashalts
Copy link
Collaborator

Hi @wolfcito! I'm reviewing open PRs for repo maintenance and wanted to check in. Are you planning to make changes to this PR or can it be closed? Thanks, please let me know!

@wolfcito
Copy link
Contributor Author

Hi @wolfcito! I'm reviewing open PRs for repo maintenance and wanted to check in. Are you planning to make changes to this PR or can it be closed? Thanks, please let me know!

Hi @fainashalts , I’d really like to work on this. I’ll be working on it over the weekend. If I find the time is too tight, I’ll let you know to close it.

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.

3 participants