Skip to content

CLI Rework#979

Merged
haixuanTao merged 11 commits intodora-rs:mainfrom
sjfhsjfh:cli-refactor
Jul 9, 2025
Merged

CLI Rework#979
haixuanTao merged 11 commits intodora-rs:mainfrom
sjfhsjfh:cli-refactor

Conversation

@sjfhsjfh
Copy link
Copy Markdown
Contributor

This pull request initiates a series of CLI rework efforts aimed at improving maintainability, consistency, and user experience.

@sjfhsjfh
Copy link
Copy Markdown
Contributor Author

CLI Rework TODO List

Code Refactoring

  • Split CLI commands into separate submodules under commands/
  • Centralize shared utilities in common.rs
  • Consistent user interface for different operations (e.g. coordinator addr & port specification)

Documentation

  • Write a tutorial guide for typical workflows and beginner onboarding
  • Write a reference manual covering all commands, options, and usage examples

Node Hub Design & Architecture

  • Discuss and define the role of a centralized Node Hub
  • Design Node Hub related commands

Testing

  • Add unit and integration tests for CLI components
    • Set up a mock CLI environment to validate behavior and user experience

Migration

  • Ensure compatibility with existing CLI usage patterns

@sjfhsjfh sjfhsjfh changed the title refactor: cli commands CLI Rework Apr 23, 2025
@sjfhsjfh
Copy link
Copy Markdown
Contributor Author

Related: #551

@haixuanTao
Copy link
Copy Markdown
Collaborator

So I feel like you want to make a lot of changes on the structure of the CI.

Could we try to make as small PR as possible as it might be very hard to debug the CLI if something breaks.

And I feel like this PR is already pretty good and might be conlicting with Philipps #901

@sjfhsjfh
Copy link
Copy Markdown
Contributor Author

So I feel like you want to make a lot of changes on the structure of the CI.

Not exactly, I'm mentioning the CI just for tests (which is not presented yet) to make sure this PR does not break anything.

Could we try to make as small PR as possible as it might be very hard to debug the CLI if something breaks.

Totally agree, I think I should put the TODO list in an issue or discussion for tracking, instead of leaving it here. This PR should only change the CLI crate file structure.

And I feel like this PR is already pretty good and might be conflicting with Philipp's #901.

Sorry for not investigating the existing work in advance but I actually started working on this earlier than the first commit. I don't think it's fully tested to be OK (as I stated before), so I kept it as drafted.

I can do some compatibility fixes for #901 once it has been merged. 😊

@haixuanTao
Copy link
Copy Markdown
Collaborator

Sorry I meant CLI :D

But okay sounds good!

@phil-opp phil-opp added the waiting-for-review Pull request is waiting for a review from maintainers. label May 21, 2025
@sjfhsjfh sjfhsjfh marked this pull request as ready for review June 11, 2025 13:30
@sjfhsjfh
Copy link
Copy Markdown
Contributor Author

@phil-opp @haixuanTao Would it be possible for someone to review this PR when convenient?

@haixuanTao
Copy link
Copy Markdown
Collaborator

I looked into it and it looks good to me.

@sjfhsjfh
Copy link
Copy Markdown
Contributor Author

I’ve just merged the latest main into this refactor branch after #901 was merged.
That PR introduced extensive renames/moves, so I resolved several non-trivial merge conflicts locally and pushed the result. I’ve reviewed the diff, but I’m not 100 % certain every new feature made it through intact, so a quick sanity-check would be great. Thanks!

@phil-opp
Copy link
Copy Markdown
Collaborator

I pushed a commit to your branch to rename the commands module to command, in order to reduce the number of changes in the diff.

Copy link
Copy Markdown
Collaborator

@phil-opp phil-opp left a comment

Choose a reason for hiding this comment

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

Looks like the recent build module changes didn't survive the merge. Could you fix that?

Otherwise it looks good to me! Thanks!

@sjfhsjfh
Copy link
Copy Markdown
Contributor Author

sjfhsjfh commented Jul 3, 2025

@phil-opp Please review

Copy link
Copy Markdown
Collaborator

@phil-opp phil-opp left a comment

Choose a reason for hiding this comment

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

Thanks for the updates! Looks good to me overall, but we need to fix the CI errors before merging.

@sjfhsjfh
Copy link
Copy Markdown
Contributor Author

sjfhsjfh commented Jul 8, 2025

@phil-opp I modified the related part, plz review

@haixuanTao haixuanTao merged commit 135a451 into dora-rs:main Jul 9, 2025
174 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-for-review Pull request is waiting for a review from maintainers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants