3 Commits
Author SHA1 Message Date
gurix 0ce55123bb Mark all tasks complete for Feature 002 (product selection landing page) 2025-10-17 14:55:08 +02:00
gurixandClaude f7f225ad09 Implement product selection landing page (Feature 002)
Adds landing page at root URL (/) that displays all active products with links to feedback submission forms. This replaces the requirement for users to know direct product URLs.

Changes:
- Added Product.load_active() method to filter and sort active products alphabetically
- Created landing route blueprint with error handling and structured logging
- Registered landing blueprint in app factory, replacing old index route
- Created landing page template with product list and empty state
- Added comprehensive contract tests (6 tests) covering active products, filtering, sorting, XSS prevention
- Added integration test for complete user flow from landing page to submission form

All 7 tests pass. User Story 1 (P1 - MVP) complete.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 14:54:51 +02:00
gurixandClaude 8640d803a6 Generate task breakdown for product selection landing page (Feature 002)
Created dependency-ordered task list organized by user story priority.

## Task Organization:

**Total: 25 tasks** across 6 phases

### Phase 1: Setup
- Empty (reuses existing Flask infrastructure)

### Phase 2: Foundational (1 task)
- T001: Extend Product model with load_active() method
- BLOCKS User Story 1

### Phase 3: User Story 1 - Browse and Select Product (12 tasks) 🎯 MVP
**Tests (7 tasks - write FIRST per TDD)**:
- T002-T007: Contract tests for GET / route (6 scenarios)
- T008: Integration test for complete user flow

**Implementation (5 tasks)**:
- T009: Create landing route blueprint
- T010: Register blueprint
- T011: Create landing template
- T012: Add logging
- T013: Verify all tests pass

**Independent Test**: Visit `/`, see products, click product, verify redirect

### Phase 4: User Story 2 - Product Availability Status (0 tasks)
- Already implemented in US1 (Product.load_active() filtering)
- Verified by T004 contract test

### Phase 5: User Story 3 - Direct Navigation (2 tasks)
- T014-T015: Manual backwards compatibility verification
- Ensures `/submit/{slug}` URLs still work

### Phase 6: Polish & Cross-Cutting (10 tasks)
- T016-T024: Manual verification checklist (9 checks)
- T025: Final commit

## Task Dependencies:

**Critical Path**:
1. T001 (extend model) → BLOCKS US1
2. T002-T008 (write tests, verify FAIL) → TDD
3. T009-T012 (implement) → tests should PASS
4. T013 (verify) → MVP complete

**Parallel Opportunities**:
- Tests T002-T007 can be written in parallel (same file, different functions)
- Manual checks T016-T024 can run in parallel (independent validations)

## Implementation Strategy:

**MVP First** (T001-T013):
1. Extend Product model (T001)
2. Write all tests, verify FAIL (T002-T008)
3. Implement feature (T009-T012)
4. Verify tests PASS (T013)
5. STOP → Deploy MVP (User Story 1 complete)

**Incremental Delivery**:
- Foundation (T001) → US1 (T002-T013) → US3 verification (T014-T015) → Polish (T016-T025)
- Each checkpoint delivers independently testable value

**TDD Compliance** (Constitution Principle II):
- All contract/integration tests written BEFORE implementation
- Tests MUST fail initially (proves they test something)
- Implementation makes tests pass
- Follows established pattern from feature 001

## File Structure:

**New Files** (6):
- app/routes/landing.py - Landing route
- app/templates/landing/index.html - Product list template
- tests/contract/test_landing_routes.py - Contract tests
- tests/integration/test_landing_flow.py - Integration test

**Modified Files** (2):
- app/models/product.py - Add load_active() method
- app/__init__.py - Register landing blueprint

## Next Steps:

Run `/speckit.implement` to execute tasks following TDD discipline

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 14:31:28 +02:00