[WIP] Create input layer in presentation structure #157
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.
Proposal 1: Create Input Layer
This PR implements the first step of the Presentation Layer Reorganization refactoring by establishing an explicit Input Layer in the presentation structure.
Progress:
src/presentation/input/directorysrc/presentation/input/mod.rswith module documentationsrc/presentation/cli/tosrc/presentation/input/cli/src/presentation/cli/directory removed (by move operation)src/presentation/mod.rspresentation::clisrc/presentation/commands/mod.rssrc/presentation/commands/create/mod.rssrc/presentation/commands/create/handler.rssrc/presentation/commands/create/tests/template.rssrc/presentation/commands/create/tests/integration.rssrc/presentation/input/cli/args.rs(internal references)src/presentation/input/cli/mod.rs(internal references)Related:
Fixes #155
Original prompt
This section details on the original issue you should resolve
<issue_title>Proposal 1: Create Input Layer</issue_title>
<issue_description>## Overview
Establish an explicit Input Layer in the presentation structure by creating
src/presentation/input/and moving the CLI module there. This is the first step in transforming the presentation layer into a four-layer architecture (Input → Dispatch → Controllers → Views).Parent Epic: #154 - Presentation Layer Reorganization
Related: Refactor Plan | Design Proposal
Impact: 🟢🟢 Medium - Clear separation of user input parsing from command execution
Effort: 🔵🔵 Medium - Straightforward move with import updates
Estimated Time: 2-3 hours
Goals
src/presentation/input/directory with proper module structuresrc/presentation/cli/tosrc/presentation/input/cli/presentation::clitopresentation::input::clicommands/,user_output/) remains functional🏗️ Architecture Requirements
DDD Layer: Presentation
Module Path:
src/presentation/input/Pattern: Input Layer (Layer 1 of 4-layer presentation architecture)
Target Structure
After this proposal:
Implementation Plan
Phase 1: Create Directory Structure (30 minutes)
src/presentation/input/directorysrc/presentation/input/mod.rswith module documentationPhase 2: Move CLI Module (30 minutes)
src/presentation/cli/tosrc/presentation/input/cli/src/presentation/cli/directoryPhase 3: Update Imports (60 minutes)
src/presentation/mod.rs:pub mod input;src/main.rs:use torrust_tracker_deployer_lib::presentation::input::cli::Cli;rg "use.*presentation::cli" --type rustpresentation::input::cliPhase 4: Documentation Updates (30 minutes)
README.mdif it references presentation structurePhase 5: Testing & Verification (30 minutes)
./scripts/pre-commit.shcargo run -- --help, etc.Acceptance Criteria
Quality Checks:
./scripts/pre-commit.shStructure:
src/presentation/input/directory existssrc/presentation/input/mod.rscontains module documentationsrc/presentation/input/cli/contains moved CLI modulesrc/presentation/cli/directory removedImports:
presentation::clitopresentation::input::clicargo buildcompletes without warningsFunctionality:
--helpoutput unchangedcommands/,user_output/) still functionalDocumentation:
input/mod.rsexplains input layer purposeMergeable State:
📚 Related Documentation
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.