feat: add CLI presentation layer for create command with Figment integration#45
Merged
Merged
Conversation
…gration Co-authored-by: josecelano <58816+josecelano@users.noreply.github.com>
Co-authored-by: josecelano <58816+josecelano@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement CLI presentation layer for create command
feat: add CLI presentation layer for create command with Figment integration
Oct 25, 2025
josecelano
approved these changes
Oct 25, 2025
Member
|
@copilot fix "testing" workflow failures: Workflow execution: https://github.com/torrust/torrust-tracker-deployer/actions/runs/18806928179/job/53669010936?pr=45 |
- Add working_dir field to GlobalArgs doctest example - Update execute() doctest to pass working_dir parameter Co-authored-by: josecelano <58816+josecelano@users.noreply.github.com>
Contributor
Author
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.
Implementation Plan: CLI Presentation Layer for Create Command
Based on the issue requirements and codebase exploration, here's the minimal-change implementation plan:
Understanding
Implementation Tasks
src/presentation/commands/create/mod.rs- module exportssubcommand.rs- main command handlerconfig_loader.rs- Figment integrationerrors.rs- presentation error types with .help()tests/directory with integration testsKey Design Decisions
Test Results
All 953 tests passing, including:
Linter Results
All linters passing:
Manual Verification Results ✅
Successfully tested:
torrust-tracker-deployer create --help--working-dircorrectly changes storage locationAll error messages include actionable troubleshooting guidance with
.help()methods as specified.Original prompt
This section details on the original issue you should resolve
<issue_title>[Subissue 3/7] CLI Presentation Layer</issue_title>
<issue_description>## Overview
Implement the CLI presentation layer for the create command, handling Figment integration for configuration file parsing, argument processing, and user interaction.
Parent EPIC: #34 - Implement Create Environment Command
Depends On: #36 (Application Layer CreateCommand)
Related: Full Specification
Key Points
--working-dirflag to main CLI for production use (not just tests).help()methodsGoals
Create
createsubcommand in presentation layer--env-file,--working-dir)Add explicit presentation error enums
CreateSubcommandErrorfor CLI-specific errors.help()methodsCommand help documentation
Tests
Module Structure
CLI Arguments
Configuration Loader (Figment)
Error Types with .help()
Usage Examples
Acceptance Criteria
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.