Repository navigation
Closed
Labels
Description
Parent Epic: #154 - Presentation Layer Reorganization
Proposal: #5 - Integrate Progress into Views
Related:
- Proposal 4 (Create Views Layer) - ✅ Completed
- Refactor Plan
- Specification: docs/issues/integrate-progress-into-views.md
Overview
Move the orphaned src/presentation/progress.rs module into the views layer as src/presentation/views/progress/ module to establish clear ownership and complete the four-layer presentation architecture.
Goals
- Move
src/presentation/progress.rstosrc/presentation/views/progress/module structure - Update all import statements to use
presentation::views::progress - Integrate progress module into views layer documentation
- Maintain all existing functionality and API
- Establish clear ownership of progress indicators within the Views layer
🏗️ Architecture Requirements
DDD Layer: Presentation
Module Path: src/presentation/views/progress/
Pattern: Views Layer Integration
Architectural Rationale
Progress indicators are UI/output concerns that logically belong in the Views layer:
- Progress reporting is presentation logic for user feedback
- Builds on top of
UserOutput(already in Views layer) - No business logic - purely presentational
- Follows MVC pattern where progress bars/indicators are view components
Implementation Plan
Phase 1: Directory Structure (15 minutes)
- Create
src/presentation/views/progress/directory - Move
src/presentation/progress.rstosrc/presentation/views/progress/mod.rs - Update
src/presentation/views/mod.rsto include and re-export progress module - Update
src/presentation/mod.rsto remove progress module (no longer at root)
Phase 2: Import Statement Updates (30 minutes)
Update import statements in 17 dependent files:
- Controller handlers (create, destroy)
- Controller error types
- Test modules
Phase 3: Documentation Updates (15 minutes)
- Update documentation examples to use new import path
- Update views layer documentation to mention progress
- Verify all doctests compile with new import paths
Phase 4: Verification (15 minutes)
- Run full test suite to verify functionality preserved
- Run linting to ensure no unused imports or dead code
- Verify compilation and all doctests pass
Acceptance Criteria
Functional Requirements
- Progress module moved from
src/presentation/progress.rstosrc/presentation/views/progress/mod.rs - All import statements updated to use
presentation::views::progresspath - Progress module properly integrated into views layer module structure
- All existing functionality and API preserved (no breaking changes)
- Documentation examples updated to use new import path
Technical Requirements
- All compilation errors resolved from import path changes
- All tests pass including updated imports
- All doctests compile and pass with new import paths
- No dead code or unused imports introduced
- Module exports properly structured in
views/mod.rs
Quality Checks
- Pre-commit checks pass:
./scripts/pre-commit.sh - No circular dependencies introduced
- Code follows project module organization conventions
Risk Assessment
Low Risk: This is a simple module relocation with import path updates. The progress module is well-isolated, has clear dependencies, and a stable API.
Potential Issues:
- Import path updates might be missed in some files
- Documentation examples may reference old paths
Mitigation:
- Systematic grep search for all references
- Comprehensive testing after changes
- Verification of doctest compilation
Related Documentation
Estimated Time: 1-2 hours
Activity
[-]Integrate Progress into Views Layer[/-][+]Proposal 5: Integrate Progress into Views Layer[/+]docs: create proposal 5 issue specification and update refactor plan
refactor: [#168] integrate progress module into views layer