Replace undefined input-field CSS class with explicit Tailwind dark theme
classes (bg-slate-800, border-slate-700, text-slate-200) to prevent white
background on form fields.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the basic CRUD experiment tracker with a scientifically rigorous A/B testing system:
- Add DiD analysis engine (services/experimentAnalysis.ts) that computes treatment vs control
group comparisons across 7 metrics (units, sessions, CVR, CTR, ROAS, revenue, ACOS)
- Implement Bayesian verdict system (Winner/Loser/Inconclusive) using posterior probability
with normal CDF approximation (Abramowitz & Stegun erf, no external deps)
- Build counterfactual time series for trend charts (actual vs estimated without change)
- Rewrite ExperimentsView as single component with 3 inline sub-views (list, detail, create)
replacing the previous modal-based ExperimentDetail and ExperimentForm
- Add control group support, change annotations (before→after diffs), and SEO experiment type
- New types: ExperimentChangeAnnotation, DiDMetricResult, DifferenceInDifferencesResult,
ExperimentVerdict
- Simplify App.tsx by removing experiment modal state (5 useState hooks eliminated)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Performance improvements:
- Fetch traffic, stock, vendor stock, buybox, and experiments data in parallel using Promise.all
- Reduces initial loading time significantly
- Non-blocking background fetches after sales data loads
Bug fixes:
- Pass availableLines from App.tsx to ExperimentForm as prop
- Remove localStorage dependency for product lines
- Product lines now correctly populated from rawData
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add option to target entire product line instead of specific ASINs
- Support pasting multiple ASINs separated by spaces OR commas
- Add ASIN format validation (9-10 alphanumeric characters)
- Load available product lines from cached sales data
- Add handleCreateExperimentForLine function in App.tsx
- Update ExperimentForm with target type selector (ASIN vs Line)
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Reduced modal max-width and padding
- Changed from buttons to select dropdowns for Type/Marketplace
- Smaller text sizes and spacing throughout
- Shorter placeholder texts
- More compact ASIN tags with max-height scroll
- Reduced textarea rows
- Smaller button labels
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Create /api/experiments endpoint for server-side Supabase access
- Update experiments service to use fetch instead of direct Supabase client
- Fixes 'Supabase credentials not configured' error in browser
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add experimentMap/onOpenExperiment props to WeeklyRow component
- Export VendorDailyRow type from supabase.ts
- Fix type errors in experiments.ts (unknown[] to string[])
- Add type annotation for allAsins in App.tsx
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
New Features:
- Experiments tab with full CRUD operations
- Create experiments by ASIN or product line groups
- Track pricing, advertising, content, and promotion experiments
- Performance analytics with baseline vs experiment comparison
- Visual experiment badges in Weekly Sales grid
- Experiment detail view with metrics and learnings
Technical Changes:
- Add Supabase experiments table migration
- New services/experiments.ts for CRUD + calculations
- New components: ExperimentsView, ExperimentDetail, ExperimentForm, ExperimentBadge
- Integrate experiment indicators in WeeklyGrid
- Add navigation tab (desktop + mobile)
- Type definitions in types.ts
Usage:
1. Run SQL migration in Supabase
2. Navigate to Experiments tab
3. Create experiments with ASINs, dates, hypothesis
4. View performance lift after completion
5. See active experiments marked in Weekly Sales
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add year filter with multi-select dropdown
- Add date range pickers (from/to)
- Fix tags filter using ilike for partial matching
- Add clear filters button
- Update supabase service with proper year filtering
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Create vendor_daily_data table schema and Supabase client service
- Add upload API route for Vendor Central CSV parsing and upsert
- Add VendorDataView with BSR trend, ratings, and buy box charts
- Integrate new Vendor tab into app navigation (desktop + mobile)
- Add vendor CSV upload card to FileUpload modal
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use a hardcoded ALL_MARKETPLACES list instead of deriving from current
filtered data, so Amazon UK is always available even when viewing PAN-EU.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Each experiment now tracks which marketplace (Amazon DE, UK, etc.) it
applies to. The form defaults to the currently active marketplace filter,
and the delta % calculation filters by both product line and marketplace.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Log weekly actions (SEO, pricing, ads, etc.) per product line and visualize
their impact with a Recharts line chart showing experiment markers. Includes
a collapsible experiments panel with auto-computed delta % (3-week before vs
after comparison) and editable status tracking. Data persisted in localStorage.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>