plan(web_v2): Update task list

Generated by: Planning Agent
Timestamp: 2025-11-21T11:54:22.816329+00:00
Component: web_v2
This commit is contained in:
AI Agent 2025-11-21 11:54:22 +00:00
parent baaa08e98e
commit 8802344197

View file

@ -1,50 +1,25 @@
{ {
"project": "mnemo_cards_web_v2", "project": "mnemo_cards_web_v2",
"component": "web_v2", "component": "web_v2",
"version": "1.0", "version": "1.1",
"generated_at": "2025-01-21T07:20:03.537898+00:00", "generated_at": "2025-11-21T11:51:47.671045+00:00",
"generated_by": "planning_agent", "generated_by": "planning_agent",
"tasks": [ "tasks": [
{ {
"id": "WEB-002", "id": "WEB-001",
"title": "Integrate Ads Reward Button into Pack Purchase Flow", "title": "Integrate AdsRewardButton into PackDetailsPage",
"priority": "high", "priority": "high",
"status": "pending", "status": "in_progress",
"estimated_hours": 2.5, "estimated_hours": 2.0,
"description": "Add AdsRewardButton to PackDetailsPage and PurchasePage to show 'Unlock by watching ad' option when a pack has an adsKey available. Ensure the button appears conditionally, shows correct states, refreshes pack access after successful reward, and handles errors gracefully.", "description": "Add AdsRewardButton to PackDetailsPage to display 'Watch Ad to Unlock' option when pack has ads reward available. The button should appear in pack controls section alongside Buy button. Service and state manager are already implemented.",
"acceptance_criteria": [ "acceptance_criteria": [
"AdsRewardButton appears on PackDetailsPage when pack has adsKey", "AdsRewardButton appears on PackDetailsPage when pack has ad reward offer",
"AdsRewardButton appears on PurchasePage when pack has adsKey", "Button is positioned correctly in pack controls section",
"Button shows correct state (loading, ready, claiming, success, error)", "Button shows all states correctly (loading, ready, claiming, success, error)",
"Successful ad reward refreshes pack access and updates UI", "Successful ad reward refreshes pack access via packsStateManager",
"Error states show helpful messages and allow retry", "Pack becomes accessible after successful reward claim",
"Button is properly styled and positioned", "Error states show helpful messages with retry option",
"5+ widget tests pass covering button integration" "5+ widget tests pass covering button visibility, states, and reward flow"
],
"dependencies": [
"WEB-001"
],
"files_to_modify": [
"mnemo_cards_web_v2/lib/presentation/pages/pack_details/pack_details_page.dart",
"mnemo_cards_web_v2/lib/presentation/pages/purchase/purchase_page.dart",
"mnemo_cards_web_v2/test/presentation/pages/pack_details/pack_details_page_test.dart"
],
"component": "web_v2"
},
{
"id": "WEB-003",
"title": "Verify and Complete Buy Pack Button Implementation",
"priority": "high",
"status": "pending",
"estimated_hours": 1.5,
"description": "Verify that the Buy Pack button in PackDetailsPage works correctly, navigates to PurchasePage properly, handles edge cases (pack already purchased, network errors), and has proper test coverage. Complete any missing functionality.",
"acceptance_criteria": [
"Buy Pack button appears when pack requires purchase",
"Button navigates to PurchasePage with correct packId",
"Button handles edge cases (already purchased, network errors)",
"Button shows loading state during navigation",
"Button is properly styled and positioned",
"5+ widget tests pass covering all button functionality and edge cases"
], ],
"dependencies": [], "dependencies": [],
"files_to_modify": [ "files_to_modify": [
@ -54,24 +29,47 @@
"component": "web_v2" "component": "web_v2"
}, },
{ {
"id": "WEB-004", "id": "WEB-002",
"title": "Create Subscription Plans Display Widget", "title": "Integrate AdsRewardButton into PurchasePage",
"priority": "medium", "priority": "high",
"status": "pending", "status": "pending",
"estimated_hours": 3.0, "estimated_hours": 1.5,
"description": "Create a reusable SubscriptionPlansWidget that displays available subscription plans with features, pricing, and comparison. This widget will be used in SubscriptionPage. The SubscriptionService already exists and uses HttpRepositoryV2.", "description": "Add AdsRewardButton to PurchasePage as an alternative to paid purchase. Button should appear above payment options section when pack has ad reward available.",
"acceptance_criteria": [ "acceptance_criteria": [
"SubscriptionPlansWidget displays all available plans", "AdsRewardButton appears on PurchasePage when pack has ad reward",
"Each plan shows features, pricing, and duration", "Button is positioned above payment options with clear separation",
"Plan comparison highlights differences between plans", "Button shows all states correctly (loading, ready, claiming, success, error)",
"Current user subscription is highlighted", "Successful reward navigates back or shows success confirmation",
"Widget is responsive (mobile/tablet/desktop)", "Error handling works with retry functionality",
"Loading and error states are handled", "4+ widget tests pass covering button integration and flow"
"6+ widget tests pass covering plan display and selection"
], ],
"dependencies": [ "dependencies": [
"backend:API-007" "WEB-001"
], ],
"files_to_modify": [
"mnemo_cards_web_v2/lib/presentation/pages/purchase/purchase_page.dart",
"mnemo_cards_web_v2/test/presentation/pages/purchase/purchase_page_test.dart"
],
"component": "web_v2"
},
{
"id": "WEB-003",
"title": "Create SubscriptionPlansWidget",
"priority": "high",
"status": "pending",
"estimated_hours": 2.5,
"description": "Create reusable SubscriptionPlansWidget that displays available subscription plans in card layout. Widget should fetch plans from SubscriptionService, show features comparison, highlight current plan, and emit selection events. Backend endpoint GET /api/v2/subscriptions/plans is ready.",
"acceptance_criteria": [
"Widget displays all available subscription plans in responsive grid/list",
"Each plan card shows: title, price, duration, features list, CTA button",
"Current active plan is highlighted with badge/border",
"Plan comparison shows feature differences clearly",
"Widget handles loading state with skeleton loaders",
"Error state shows with retry option",
"Plan selection emits callback event",
"6+ widget tests pass covering display, selection, and states"
],
"dependencies": [],
"files_to_modify": [ "files_to_modify": [
"mnemo_cards_web_v2/lib/presentation/widgets/subscription_plans_widget.dart", "mnemo_cards_web_v2/lib/presentation/widgets/subscription_plans_widget.dart",
"mnemo_cards_web_v2/test/presentation/widgets/subscription_plans_widget_test.dart" "mnemo_cards_web_v2/test/presentation/widgets/subscription_plans_widget_test.dart"
@ -79,25 +77,73 @@
"component": "web_v2" "component": "web_v2"
}, },
{ {
"id": "WEB-005", "id": "WEB-004",
"title": "Create Subscription Management Page", "title": "Create Subscription State Manager",
"priority": "medium", "priority": "high",
"status": "pending", "status": "pending",
"estimated_hours": 3.5, "estimated_hours": 2.0,
"description": "Create SubscriptionPage UI that integrates SubscriptionPlansWidget, handles subscription purchase flow, displays current subscription status, and provides management options (cancel/renew). Use SubscriptionService for API calls.", "description": "Create SubscriptionStateManager using yx_state to manage subscription plans loading, current status, and purchase flow state. Manager should use SubscriptionService for API calls and provide computed properties for UI.",
"acceptance_criteria": [ "acceptance_criteria": [
"SubscriptionPage displays subscription plans using SubscriptionPlansWidget", "State manager created with yx_state patterns",
"Purchase flow works for subscriptions", "Manages subscription plans list with loading/loaded/error states",
"Current subscription status is displayed clearly", "Tracks current user subscription status",
"Subscription cancellation flow works", "Provides method to refresh subscription data",
"Subscription renewal flow works", "Implements proper error handling",
"Page is responsive (mobile/tablet/desktop)", "Exports computed properties for UI convenience",
"Loading states and error handling are implemented", "8+ unit tests pass covering all state transitions and API calls"
"8+ widget tests pass covering all UI interactions" ],
"dependencies": [],
"files_to_modify": [
"mnemo_cards_web_v2/lib/domain/state/subscription_state_manager.dart",
"mnemo_cards_web_v2/test/domain/state/subscription_state_manager_test.dart"
],
"component": "web_v2"
},
{
"id": "WEB-005",
"title": "Add SubscriptionModule to UserScope",
"priority": "high",
"status": "pending",
"estimated_hours": 1.0,
"description": "Create SubscriptionModule and integrate it into UserScope DI container. Module should provide SubscriptionStateManager and connect it to SubscriptionService. Follow existing module patterns in UserScope.",
"acceptance_criteria": [
"SubscriptionModule created following UserScope patterns",
"Module provides SubscriptionStateManager instance",
"Module properly wired with SubscriptionService dependency",
"Module registered in UserScope container",
"Module disposal implemented correctly",
"3+ integration tests verify module initialization and disposal"
], ],
"dependencies": [ "dependencies": [
"WEB-004", "WEB-004"
"backend:API-007" ],
"files_to_modify": [
"mnemo_cards_web_v2/lib/di/user_scope/subscription_module.dart",
"mnemo_cards_web_v2/lib/di/user_scope/user_scope.dart",
"mnemo_cards_web_v2/test/di/user_scope/subscription_module_test.dart"
],
"component": "web_v2"
},
{
"id": "WEB-006",
"title": "Create SubscriptionPage UI",
"priority": "high",
"status": "pending",
"estimated_hours": 3.0,
"description": "Create SubscriptionPage that displays subscription plans using SubscriptionPlansWidget and current subscription status. Include purchase flow initiation (note: backend purchase/cancel endpoints are TODO). Page should be responsive and follow Material Design.",
"acceptance_criteria": [
"SubscriptionPage displays plans using SubscriptionPlansWidget",
"Current subscription status shown clearly (active/inactive, dates)",
"Purchase button initiates flow (shows TODO message if backend not ready)",
"Cancel/manage subscription options visible for active subscriptions",
"Page is responsive for mobile/tablet/desktop layouts",
"Loading states use skeleton loaders",
"Error states show with retry functionality",
"8+ widget tests pass covering page layout and interactions"
],
"dependencies": [
"WEB-003",
"WEB-005"
], ],
"files_to_modify": [ "files_to_modify": [
"mnemo_cards_web_v2/lib/presentation/pages/subscription/subscription_page.dart", "mnemo_cards_web_v2/lib/presentation/pages/subscription/subscription_page.dart",
@ -107,22 +153,23 @@
"component": "web_v2" "component": "web_v2"
}, },
{ {
"id": "WEB-006", "id": "WEB-007",
"title": "Add Subscription Status to Profile Page", "title": "Add Subscription Status to ProfilePage",
"priority": "medium", "priority": "medium",
"status": "pending", "status": "pending",
"estimated_hours": 2.0, "estimated_hours": 1.5,
"description": "Display current subscription status on ProfilePage with plan name, expiry date, active status, and a link to SubscriptionPage for management. Ensure status updates when subscription changes.", "description": "Display current subscription status on ProfilePage with plan name, expiry date, active badge, and navigation link to SubscriptionPage. Use SubscriptionStateManager from UserScope for data.",
"acceptance_criteria": [ "acceptance_criteria": [
"Subscription status is displayed on ProfilePage", "Subscription status card added to ProfilePage",
"Status shows plan name, expiry date, and active status", "Shows plan name, active status badge, expiry date",
"Link to SubscriptionPage is provided", "Inactive state shows 'No active subscription' message",
"Status updates when subscription changes", "Tapping status card navigates to SubscriptionPage",
"Loading and error states are handled", "Status updates reactively when subscription changes",
"Loading state shows skeleton loader",
"4+ widget tests pass covering status display and navigation" "4+ widget tests pass covering status display and navigation"
], ],
"dependencies": [ "dependencies": [
"WEB-005" "WEB-006"
], ],
"files_to_modify": [ "files_to_modify": [
"mnemo_cards_web_v2/lib/presentation/pages/profile/profile_page.dart", "mnemo_cards_web_v2/lib/presentation/pages/profile/profile_page.dart",
@ -131,45 +178,91 @@
"component": "web_v2" "component": "web_v2"
}, },
{ {
"id": "WEB-007", "id": "WEB-008",
"title": "Create Promocode Input Widget", "title": "Create PromocodeInput Widget",
"priority": "medium", "priority": "medium",
"status": "pending", "status": "pending",
"estimated_hours": 3.0, "estimated_hours": 2.5,
"description": "Create a reusable PromocodeInput widget with text field, apply button, validation feedback, discount display, and success/error states. The widget should integrate with PromocodeService (which already uses HttpRepositoryV2) and be usable in PurchasePage and SubscriptionPage.", "description": "Create reusable PromocodeInput widget with text field, apply button, validation feedback (success/error), and discount display. Widget should use PromocodeService (already exists) for validation and application. Backend promocode API is fully implemented.",
"acceptance_criteria": [ "acceptance_criteria": [
"PromocodeInput widget is created with text field and apply button", "Widget has text field for promocode entry with validation",
"Widget validates promocode before applying", "Apply button validates and applies promocode",
"Widget displays discount amount when promocode is applied", "Success state shows discount amount and green checkmark",
"Success and error states are shown with appropriate messages", "Error state shows error message in red with retry option",
"Widget can be cleared and reset", "Loading state during validation/application",
"Widget integrates with PurchasePage", "Widget can be cleared/reset to initial state",
"Widget integrates with SubscriptionPage", "Widget properly styled with Material Design",
"8+ widget tests pass covering all functionality" "7+ widget tests pass covering all states and interactions"
], ],
"dependencies": [], "dependencies": [],
"files_to_modify": [ "files_to_modify": [
"mnemo_cards_web_v2/lib/presentation/widgets/promocode_input.dart", "mnemo_cards_web_v2/lib/presentation/widgets/promocode_input.dart",
"mnemo_cards_web_v2/lib/presentation/pages/purchase/purchase_page.dart",
"mnemo_cards_web_v2/lib/presentation/pages/subscription/subscription_page.dart",
"mnemo_cards_web_v2/test/presentation/widgets/promocode_input_test.dart" "mnemo_cards_web_v2/test/presentation/widgets/promocode_input_test.dart"
], ],
"component": "web_v2" "component": "web_v2"
}, },
{ {
"id": "WEB-008", "id": "WEB-009",
"title": "Fix Failing Tests", "title": "Integrate PromocodeInput into PurchasePage",
"priority": "medium", "priority": "medium",
"status": "pending", "status": "pending",
"estimated_hours": 3.0, "estimated_hours": 1.0,
"description": "Resolve 24 failing tests (mostly empty test files) to ensure all tests pass. Investigate each failing test, implement proper test cases or mark as skipped with clear reasons, and ensure no empty test files remain.", "description": "Add PromocodeInput widget to PurchasePage below pack information and above payment options. Integrate promocode discount into price calculation display.",
"acceptance_criteria": [ "acceptance_criteria": [
"All 24 failing tests are fixed or properly skipped with clear reasons", "PromocodeInput widget integrated into PurchasePage layout",
"All tests compile without errors", "Widget positioned below pack info, above payment section",
"All tests pass successfully", "Applied promocode discount updates displayed price",
"Test coverage is maintained or improved", "Original price shown with strikethrough when discount applied",
"No empty test files remain", "Discount badge/label shows percentage or amount saved",
"Test failures are documented with root cause analysis" "3+ widget tests pass covering promocode integration"
],
"dependencies": [
"WEB-008"
],
"files_to_modify": [
"mnemo_cards_web_v2/lib/presentation/pages/purchase/purchase_page.dart",
"mnemo_cards_web_v2/test/presentation/pages/purchase/purchase_page_test.dart"
],
"component": "web_v2"
},
{
"id": "WEB-010",
"title": "Integrate PromocodeInput into SubscriptionPage",
"priority": "medium",
"status": "pending",
"estimated_hours": 1.0,
"description": "Add PromocodeInput widget to SubscriptionPage in subscription purchase flow. Display promocode discount in plan pricing.",
"acceptance_criteria": [
"PromocodeInput widget integrated into SubscriptionPage",
"Widget appears in purchase flow section",
"Applied promocode updates subscription price display",
"Discount shown on selected plan card",
"3+ widget tests pass covering promocode integration"
],
"dependencies": [
"WEB-008",
"WEB-006"
],
"files_to_modify": [
"mnemo_cards_web_v2/lib/presentation/pages/subscription/subscription_page.dart",
"mnemo_cards_web_v2/test/presentation/pages/subscription/subscription_page_test.dart"
],
"component": "web_v2"
},
{
"id": "WEB-011",
"title": "Fix Empty Test Files",
"priority": "medium",
"status": "pending",
"estimated_hours": 2.0,
"description": "Fix 24 failing tests caused by empty test files. Identify all empty test files, either implement basic smoke tests or remove empty files. Focus on test_page_test.dart and other critical test files first.",
"acceptance_criteria": [
"All empty test files identified and documented",
"test_page_test.dart has basic smoke tests implemented",
"Empty test files either have tests or are removed",
"All remaining test files compile without errors",
"Test count increases (no test regressions)",
"Document test coverage gaps for future work"
], ],
"dependencies": [], "dependencies": [],
"files_to_modify": [ "files_to_modify": [
@ -179,22 +272,21 @@
"component": "web_v2" "component": "web_v2"
}, },
{ {
"id": "WEB-009", "id": "WEB-012",
"title": "Create Settings Page", "title": "Create Settings Page Foundation",
"priority": "low", "priority": "low",
"status": "pending", "status": "pending",
"estimated_hours": 3.0, "estimated_hours": 2.5,
"description": "Create a dedicated SettingsPage to separate settings from ProfilePage. Include theme toggle (light/dark), language selection, sound effects toggle, notifications settings, and account settings. Settings should persist using SharedPreferences.", "description": "Create SettingsPage with theme toggle (light/dark), language selection, and sound effects toggle. Settings should persist using SharedPreferences. This is foundation for more settings in future.",
"acceptance_criteria": [ "acceptance_criteria": [
"SettingsPage UI is complete with all settings options", "SettingsPage created with Material Design layout",
"Theme toggle (light/dark) works and persists", "Theme toggle (light/dark) with icon switches theme",
"Language selection works and persists", "Language selection dropdown with supported languages",
"Sound effects toggle works and persists", "Sound effects toggle with on/off state",
"Notifications settings work and persist", "All settings persist using SharedPreferences",
"Account settings are accessible", "Settings apply immediately on change",
"Settings are persisted using SharedPreferences", "Page added to app navigation/router",
"Page is responsive (mobile/tablet/desktop)", "6+ widget tests pass covering settings functionality"
"6+ widget tests pass covering all settings functionality"
], ],
"dependencies": [], "dependencies": [],
"files_to_modify": [ "files_to_modify": [
@ -206,23 +298,22 @@
"component": "web_v2" "component": "web_v2"
}, },
{ {
"id": "WEB-010", "id": "WEB-013",
"title": "Increase Test Coverage for Purchase Flow", "title": "Increase Test Coverage for Purchase Flow",
"priority": "medium", "priority": "medium",
"status": "pending", "status": "pending",
"estimated_hours": 3.5, "estimated_hours": 3.0,
"description": "Add comprehensive unit and widget tests for the purchase flow including PurchasesService, PurchaseStateManager, PurchasePage, payment verification logic, and error handling for all edge cases.", "description": "Add comprehensive unit and widget tests for purchase flow. Focus on PurchasesService, PurchaseStateManager, and PurchasePage edge cases (network errors, payment failures, success scenarios).",
"acceptance_criteria": [ "acceptance_criteria": [
"PurchasesService has 12+ unit tests with >80% coverage", "PurchasesService has 10+ unit tests with >80% coverage",
"PurchaseStateManager has 8+ unit tests covering all state transitions", "PurchaseStateManager has 8+ unit tests covering state transitions",
"PurchasePage has 10+ widget tests covering all UI interactions", "PurchasePage has 8+ widget tests covering UI interactions",
"Payment verification flow has comprehensive test coverage", "Payment verification flow has edge case tests",
"Error handling is tested for all edge cases", "Error handling tested for network failures, timeouts",
"Success flow tested end-to-end",
"All tests pass with zero flaky tests" "All tests pass with zero flaky tests"
], ],
"dependencies": [ "dependencies": [],
"WEB-003"
],
"files_to_modify": [ "files_to_modify": [
"mnemo_cards_web_v2/test/domain/services/purchases_service_test.dart", "mnemo_cards_web_v2/test/domain/services/purchases_service_test.dart",
"mnemo_cards_web_v2/test/domain/state/purchase_state_manager_test.dart", "mnemo_cards_web_v2/test/domain/state/purchase_state_manager_test.dart",
@ -231,19 +322,20 @@
"component": "web_v2" "component": "web_v2"
}, },
{ {
"id": "WEB-011", "id": "WEB-014",
"title": "Verify API v2 Migration Completeness", "title": "Verify API v2 Migration Completeness",
"priority": "medium", "priority": "medium",
"status": "pending", "status": "pending",
"estimated_hours": 2.0, "estimated_hours": 2.0,
"description": "Audit all services and verify that no v1 API dependencies remain. Ensure all services use HttpRepositoryV2, all API calls use v2 endpoints, and remove any deprecated v1 code. Create a migration audit document.", "description": "Audit all services to verify complete migration to HttpRepositoryV2. Search for any remaining v1 API usage, deprecated imports, or old endpoint references. Create migration audit report.",
"acceptance_criteria": [ "acceptance_criteria": [
"All services use HttpRepositoryV2 (no HttpRepository v1 usage)", "All services verified to use HttpRepositoryV2 exclusively",
"All API calls use v2 endpoints", "No references to old HttpRepository v1 found",
"No deprecated v1 dependencies remain", "All API endpoints use /api/v2/ paths",
"All v1 code is removed or marked as deprecated", "Deprecated v1 code removed or clearly marked",
"Migration audit document is created with findings", "Migration audit document created with findings",
"All functionality verified working with v2 API" "Grep search confirms no v1 API usage remains",
"All functionality tested with v2 API"
], ],
"dependencies": [], "dependencies": [],
"files_to_modify": [ "files_to_modify": [
@ -252,6 +344,34 @@
"mnemo_cards_web_v2/API_V2_MIGRATION_AUDIT.md" "mnemo_cards_web_v2/API_V2_MIGRATION_AUDIT.md"
], ],
"component": "web_v2" "component": "web_v2"
},
{
"id": "WEB-015",
"title": "Add Analytics Events for Ads Reward Flow",
"priority": "low",
"status": "pending",
"estimated_hours": 1.5,
"description": "Enhance ads reward flow with comprehensive analytics events tracking: ad impressions, completions, failures, reward claims. Events are already partially implemented in AdsRewardButton, verify coverage and add missing events.",
"acceptance_criteria": [
"Ad impression event fired when button shown",
"Ad start event fired when user clicks button",
"Ad completion event fired on successful ad view",
"Ad failure event fired with error details",
"Reward claim event fired with success/failure",
"Pack unlock event fired after successful reward",
"All events include relevant parameters (packId, productType)",
"5+ tests verify analytics event emissions"
],
"dependencies": [
"WEB-001",
"WEB-002"
],
"files_to_modify": [
"mnemo_cards_web_v2/lib/presentation/widgets/ads_reward_button.dart",
"mnemo_cards_web_v2/lib/domain/state/ads_reward_state_manager.dart",
"mnemo_cards_web_v2/test/presentation/widgets/ads_reward_button_test.dart"
],
"component": "web_v2"
} }
] ]
} }