5 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
gurixandClaude 0f71ba969f Add implementation plan for product selection landing page (Feature 002)
Completed planning phases 0 and 1 for simple landing page feature.

## Plan Overview:

**Approach**: Minimal addition to existing Flask app - reuse Product model,
add one route, one template. No new dependencies or complexity.

**Constitution Check**:  All 5 principles satisfied
- Specification-first development (spec.md complete)
- Test-first discipline (TDD workflow defined)
- Independent user stories (3 stories, all independently testable)
- Simplicity (reuses existing Flask/Jinja2/Product architecture)
- Documentation as code (all artifacts in specs/002-product-list/)

## Artifacts Created:

### Phase 0: Research (research.md)
- Reuses infrastructure from feature 001 (Flask, Jinja2, file storage)
- Single new decision: Product.load_active() method for filtering/sorting
- Performance analysis: <100ms for 100 products (well under 1s target)

### Phase 1: Design & Contracts
- **data-model.md**: Documents Product model extension (load_active method)
- **contracts/landing-page.yaml**: OpenAPI contract for GET / route
- **quickstart.md**: Developer implementation guide with:
  - Step-by-step implementation checklist
  - Code snippets for route, template, tests
  - TDD workflow (write tests → verify fail → implement → pass)
  - Manual verification checklist

### Agent Context
- Updated CLAUDE.md with feature technologies (no new tech added)

## Implementation Summary:

**New Files** (to be created):
- app/routes/landing.py - Landing page route handler
- app/templates/landing/index.html - Product list template
- tests/contract/test_landing_routes.py - Contract tests (6 scenarios)
- tests/integration/test_landing_flow.py - User journey test

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

## Key Technical Decisions:

1. **Filtering**: status=='active' AND submission_url_slug exists
2. **Sorting**: Alphabetical by name (case-insensitive), then product_id
3. **Empty State**: "No products are currently accepting feedback" message
4. **XSS Prevention**: Jinja2 auto-escaping (no manual escaping needed)
5. **Performance**: File I/O sufficient (<1s for 100 products, no caching)

## Next Steps:

1. Run /speckit.tasks to generate tasks.md
2. Run /speckit.implement to execute TDD workflow
3. Verify all tests pass
4. Manual verification checklist
5. Create pull request

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 14:26:47 +02:00
gurixandClaude fb418bac65 Rename feature branch from 002-at-the-moment to 002-product-list
Changed branch name and updated all references:
- Git branch: 002-at-the-moment → 002-product-list
- Specs directory: specs/002-at-the-moment/ → specs/002-product-list/
- spec.md: Updated feature branch reference
- requirements.md: Updated feature references

Reason: More descriptive name that better reflects the feature purpose
(product selection landing page).

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

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