feat: [#242] enhance provision command output with connection details#244
Merged
josecelano merged 2 commits intomainfrom Dec 17, 2025
Merged
feat: [#242] enhance provision command output with connection details#244josecelano merged 2 commits intomainfrom
josecelano merged 2 commits intomainfrom
Conversation
Improved documentation to emphasize functional pipeline pattern and MVC architecture. The rustdoc now clearly shows the data flow transformation: Environment<Provisioned> → ConnectionDetailsData → String → stdout. Detailed the MVC pattern components (Model, DTO, View, Controller, Output) to make the architectural design explicit. Updated error documentation to specify return type.
Created draft refactoring plan for removing unnecessary CreateCommandHandler progress steps from all presentation layer controllers. Handler creation is instantaneous (just object construction) and doesn't warrant user-visible progress reporting. Key improvements: - Better encapsulation: Move handler creation inside methods that use it - Cleaner progress: Remove non-meaningful steps from user output - Simpler code: Fewer methods, simpler signatures, clearer intent - Consistent pattern: Apply same simplification across all controllers Expected impact: ~70-95 lines removed across 5+ controllers Status: Planning - discovered during #242 implementation Target: provision, configure, register, release, run controllers
Member
Author
|
ACK 24c7c97 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enhances the
provisioncommand to display SSH connection details after successful infrastructure provisioning. This provides users with immediate, actionable information to connect to their newly provisioned instances.Closes #242
Changes
New Features
Architecture
Implements a clean MVC pattern with proper DDD layering:
View Layer (
src/presentation/views/commands/provision/):ConnectionDetailsView: Renders formatted outputConnectionDetailsData: DTO for connection informationController (
src/presentation/controllers/provision/handler.rs):Environment<Provisioned>→ConnectionDetailsData→String→ stdoutFromtrait for clean DTO conversion?operatorCode Quality
ssh_port(),ssh_username())format!macro for efficient renderingResultpropagation throughout the stackTesting
5 unit tests for view rendering:
4 controller tests (existing):
All tests passing ✅
Output Example
Technical Decisions
From Trait Placement: Implemented in presentation layer (not domain) to maintain DDD - domain should not depend on presentation DTOs
Output Channel: Uses
ProgressReporter::result()to route to stdout (not stderr) since connection details are final command results, not progress informationView Separation: Created new
commands/directory structure for command-specific views, maintaining clear organizationFunctional Pipeline: Used functional composition for clarity and to eliminate intermediate variables
Quality Checks
All pre-commit checks passed:
Related Documentation