Skip to content

Proposal 4: Create Views Layer #165

Description

@josecelano

Overview

Rename src/presentation/user_output/ to src/presentation/views/ to follow standard MVC terminology and complete the four-layer presentation architecture. This proposal establishes the final layer in our Input → Dispatch → Controllers → Views pattern.

📋 Specification

Full Specification: docs/issues/create-views-layer.md

Goals

  • Rename user_output/ directory to views/ following MVC conventions
  • Update all import statements across the codebase to use presentation::views
  • Update module documentation to reflect Views layer terminology
  • Maintain all existing functionality and organization within the renamed directory
  • Complete the four-layer presentation architecture

Implementation Plan

Phase 1: Directory Rename and Basic Updates (30 minutes)

  • Rename src/presentation/user_output/ to src/presentation/views/
  • Update src/presentation/mod.rs to export views instead of user_output
  • Update main module documentation in src/presentation/views/mod.rs

Phase 2: Import Statement Updates (60 minutes)

  • Update all import statements in src/presentation/ modules
  • Update all import statements in src/application/ layer
  • Update all import statements in src/infrastructure/ layer
  • Update all import statements in src/bin/ executables
  • Update import statements in src/main.rs and src/lib.rs

Phase 3: Test Updates (30 minutes)

  • Update import statements in all test files
  • Update test helper imports and utilities
  • Verify all tests pass after import changes

Phase 4: Documentation and Integration (30 minutes)

  • Update src/presentation/mod.rs architecture documentation
  • Update any remaining documentation references
  • Run full linting and testing suite
  • Verify compilation and functionality

Acceptance Criteria

Functional Requirements

  • Directory renamed from user_output/ to views/ with all files preserved
  • All import statements updated to use presentation::views path
  • Module documentation updated to reflect Views layer terminology
  • All existing functionality preserved (no behavior changes)
  • Four-layer presentation architecture completed (Input → Dispatch → Controllers → Views)

Technical Requirements

  • All compilation errors resolved from import path changes
  • All tests pass with updated import paths
  • No dead code or unused imports introduced
  • Module exports properly structured in new views/mod.rs

Quality Checks

  • Pre-commit checks pass: ./scripts/pre-commit.sh

Related Issues

Risk Assessment

Low Risk: This is a pure rename operation with no functional changes. The existing user_output/ structure is well-organized and follows Views layer best practices.

Estimated Time: ~2.5 hours


Note for Contributors: These criteria define what the PR reviewer will check. Use this as your pre-review checklist before submitting the PR to minimize back-and-forth iterations.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions