diff --git a/specs/001-build-an-application/tasks.md b/specs/001-build-an-application/tasks.md index 7ca7234..055d380 100644 --- a/specs/001-build-an-application/tasks.md +++ b/specs/001-build-an-application/tasks.md @@ -173,56 +173,56 @@ ### Tests for User Story 3 (MUST WRITE FIRST) ⚠️ -- [ ] T093 [P] [US3] Contract test for GET /login in tests/contract/test_dashboard_routes.py -- [ ] T094 [P] [US3] Contract test for POST /login with valid credentials in tests/contract/test_dashboard_routes.py -- [ ] T095 [P] [US3] Contract test for POST /login with invalid credentials (401) in tests/contract/test_dashboard_routes.py -- [ ] T096 [P] [US3] Contract test for GET /logout in tests/contract/test_dashboard_routes.py -- [ ] T097 [P] [US3] Contract test for GET /dashboard (authenticated) in tests/contract/test_dashboard_routes.py -- [ ] T098 [P] [US3] Contract test for GET /dashboard (unauthenticated redirect) in tests/contract/test_dashboard_routes.py -- [ ] T099 [P] [US3] Contract test for GET /dashboard with filters in tests/contract/test_dashboard_routes.py -- [ ] T100 [P] [US3] Contract test for GET /dashboard with search query in tests/contract/test_dashboard_routes.py -- [ ] T101 [P] [US3] Contract test for GET /feedback/{id} detail view in tests/contract/test_dashboard_routes.py -- [ ] T102 [P] [US3] Contract test for POST /feedback/{id}/status update in tests/contract/test_dashboard_routes.py -- [ ] T103 [P] [US3] Contract test for GET /feedback/{id}/attachment/{filename} download in tests/contract/test_dashboard_routes.py -- [ ] T104 [P] [US3] Contract test for access control (owner sees only assigned products) in tests/contract/test_dashboard_routes.py -- [ ] T105 [P] [US3] Integration test for dashboard access flow in tests/integration/test_dashboard_access_flow.py +- [X] T093 [P] [US3] Contract test for GET /login in tests/contract/test_dashboard_routes.py +- [X] T094 [P] [US3] Contract test for POST /login with valid credentials in tests/contract/test_dashboard_routes.py +- [X] T095 [P] [US3] Contract test for POST /login with invalid credentials (401) in tests/contract/test_dashboard_routes.py +- [X] T096 [P] [US3] Contract test for GET /logout in tests/contract/test_dashboard_routes.py +- [X] T097 [P] [US3] Contract test for GET /dashboard (authenticated) in tests/contract/test_dashboard_routes.py +- [X] T098 [P] [US3] Contract test for GET /dashboard (unauthenticated redirect) in tests/contract/test_dashboard_routes.py +- [X] T099 [P] [US3] Contract test for GET /dashboard with filters in tests/contract/test_dashboard_routes.py +- [X] T100 [P] [US3] Contract test for GET /dashboard with search query in tests/contract/test_dashboard_routes.py +- [X] T101 [P] [US3] Contract test for GET /feedback/{id} detail view in tests/contract/test_dashboard_routes.py +- [X] T102 [P] [US3] Contract test for POST /feedback/{id}/status update in tests/contract/test_dashboard_routes.py +- [X] T103 [P] [US3] Contract test for GET /feedback/{id}/attachment/{filename} download in tests/contract/test_dashboard_routes.py +- [X] T104 [P] [US3] Contract test for access control (owner sees only assigned products) in tests/contract/test_dashboard_routes.py +- [X] T105 [P] [US3] Integration test for dashboard access flow in tests/integration/test_dashboard_access_flow.py ### Implementation for User Story 3 -- [ ] T106 [P] [US3] Create dashboard routes blueprint in app/routes/dashboard.py -- [ ] T107 [P] [US3] Implement GET /login route returning login form template -- [ ] T108 [P] [US3] Create login form template in app/templates/login.html -- [ ] T109 [US3] Implement POST /login route with authentication logic -- [ ] T110 [US3] Implement GET /logout route with Flask-Login logout_user -- [ ] T111 [US3] Implement load_feedback_list method in FeedbackStorageService -- [ ] T112 [US3] Implement pagination logic in load_feedback_list (50 items/page) -- [ ] T113 [US3] Implement filter_by_category in FeedbackStorageService -- [ ] T114 [US3] Implement filter_by_date_range in FeedbackStorageService -- [ ] T115 [US3] Implement filter_by_language in FeedbackStorageService -- [ ] T116 [US3] Implement filter_by_status in FeedbackStorageService -- [ ] T117 [US3] Implement search_feedback in FeedbackStorageService (keyword search in text/translation/summary) -- [ ] T118 [US3] Implement sort by timestamp (newest first, FR-041) -- [ ] T119 [US3] Implement GET /dashboard route with @login_required decorator -- [ ] T120 [US3] Add product access control in GET /dashboard (owner sees only assigned products) -- [ ] T121 [US3] Apply filters and search from query parameters in GET /dashboard -- [ ] T122 [US3] Create dashboard template in app/templates/dashboard.html with filter form -- [ ] T123 [US3] Add pagination links to dashboard template -- [ ] T124 [US3] Implement GET /feedback/{feedback_id} detail route with @login_required -- [ ] T125 [US3] Add access control check in detail route (verify owner has access to product) -- [ ] T126 [US3] Load analysis.md content in detail route -- [ ] T127 [US3] Create feedback detail template in app/templates/feedback_detail.html -- [ ] T128 [US3] Display original text, translation, summary, category, attachments in detail template -- [ ] T129 [US3] Implement POST /feedback/{feedback_id}/status route for status updates -- [ ] T130 [US3] Update metadata.yaml status field in status update route -- [ ] T131 [US3] Implement GET /feedback/{feedback_id}/attachment/{filename} route for file downloads -- [ ] T132 [US3] Add path traversal prevention in attachment download route -- [ ] T133 [US3] Add access control in attachment download route -- [ ] T134 [US3] Serve files with correct Content-Type and Content-Disposition headers -- [ ] T135 [US3] Add error template for access denied (403) in app/templates/error_403.html -- [ ] T136 [US3] Add error template for not found (404) in app/templates/error_404.html -- [ ] T137 [US3] Register dashboard blueprint in app/__init__.py -- [ ] T138 [US3] Create test product owner in data/users.yaml for testing -- [ ] T139 [US3] Verify admin users have access to all products (bypass assigned_product_ids check) +- [X] T106 [P] [US3] Create dashboard routes blueprint in app/routes/dashboard.py +- [X] T107 [P] [US3] Implement GET /login route returning login form template +- [X] T108 [P] [US3] Create login form template in app/templates/login.html +- [X] T109 [US3] Implement POST /login route with authentication logic +- [X] T110 [US3] Implement GET /logout route with Flask-Login logout_user +- [X] T111 [US3] Implement load_feedback_list method in FeedbackStorageService +- [X] T112 [US3] Implement pagination logic in load_feedback_list (50 items/page) +- [X] T113 [US3] Implement filter_by_category in FeedbackStorageService +- [X] T114 [US3] Implement filter_by_date_range in FeedbackStorageService +- [X] T115 [US3] Implement filter_by_language in FeedbackStorageService +- [X] T116 [US3] Implement filter_by_status in FeedbackStorageService +- [X] T117 [US3] Implement search_feedback in FeedbackStorageService (keyword search in text/translation/summary) +- [X] T118 [US3] Implement sort by timestamp (newest first, FR-041) +- [X] T119 [US3] Implement GET /dashboard route with @login_required decorator +- [X] T120 [US3] Add product access control in GET /dashboard (owner sees only assigned products) +- [X] T121 [US3] Apply filters and search from query parameters in GET /dashboard +- [X] T122 [US3] Create dashboard template in app/templates/dashboard.html with filter form +- [X] T123 [US3] Add pagination links to dashboard template +- [X] T124 [US3] Implement GET /feedback/{feedback_id} detail route with @login_required +- [X] T125 [US3] Add access control check in detail route (verify owner has access to product) +- [X] T126 [US3] Load analysis.md content in detail route +- [X] T127 [US3] Create feedback detail template in app/templates/feedback_detail.html +- [X] T128 [US3] Display original text, translation, summary, category, attachments in detail template +- [X] T129 [US3] Implement POST /feedback/{feedback_id}/status route for status updates +- [X] T130 [US3] Update metadata.yaml status field in status update route +- [X] T131 [US3] Implement GET /feedback/{feedback_id}/attachment/{filename} route for file downloads +- [X] T132 [US3] Add path traversal prevention in attachment download route +- [X] T133 [US3] Add access control in attachment download route +- [X] T134 [US3] Serve files with correct Content-Type and Content-Disposition headers +- [X] T135 [US3] Add error template for access denied (403) in app/templates/error_403.html +- [X] T136 [US3] Add error template for not found (404) in app/templates/error_404.html +- [X] T137 [US3] Register dashboard blueprint in app/__init__.py +- [X] T138 [US3] Create test product owner in data/users.yaml for testing +- [X] T139 [US3] Verify admin users have access to all products (bypass assigned_product_ids check) **Checkpoint**: At this point, User Stories 1, 2, AND 3 work together - feedback is submitted, analyzed, and viewable in dashboard