182 lines
5.5 KiB
Markdown
182 lines
5.5 KiB
Markdown
# Plan: Site & Sector Selector Configuration
|
|
|
|
**Source:** COMPREHENSIVE-AUDIT-REPORT.md - Section 1
|
|
**Priority:** High for Planner & Writer pages
|
|
**Estimated Effort:** 4-6 hours
|
|
|
|
---
|
|
|
|
## Objective
|
|
|
|
Ensure correct placement of Site Selector and Sector Selector across all pages based on data scope requirements.
|
|
|
|
---
|
|
|
|
## Configuration Rules
|
|
|
|
| Condition | Site Selector | Sector Selector |
|
|
|-----------|:-------------:|:---------------:|
|
|
| Data scoped to specific site | ✅ | ❌ |
|
|
| Data can be filtered by content category | ✅ | ✅ |
|
|
| Page is not site-specific (account-level) | ❌ | ❌ |
|
|
| Already in specific context (detail page) | ❌ | ❌ |
|
|
|
|
---
|
|
|
|
## Implementation Checklist
|
|
|
|
### DASHBOARD Module
|
|
- [ ] **Home** - Site Selector: ✅ (with "All Sites" option) | Sector: ❌
|
|
- Overview across sites - sector too granular for dashboard
|
|
|
|
### SETUP Module
|
|
- [ ] **Add Keywords** - Site: ✅ | Sector: ✅
|
|
- Keywords are site+sector specific
|
|
- [ ] **Content Settings** - Site: ✅ | Sector: ❌
|
|
- Settings are site-level, not sector-level
|
|
- [ ] **Sites List** - Site: ❌ | Sector: ❌
|
|
- Managing sites themselves
|
|
- [ ] **Site Dashboard** - Site: ❌ (context) | Sector: ❌
|
|
- Already in specific site context
|
|
- [ ] **Site Settings tabs** - Site: ❌ (context) | Sector: ❌
|
|
- Already in specific site context
|
|
|
|
### PLANNER Module
|
|
- [ ] **Keywords** - Site: ✅ | Sector: ✅
|
|
- Keywords organized by site+sector
|
|
- [ ] **Clusters** - Site: ✅ | Sector: ✅
|
|
- Clusters organized by site+sector
|
|
- [ ] **Cluster Detail** - Site: ❌ (context) | Sector: ❌ (context)
|
|
- Already in cluster context
|
|
- [ ] **Ideas** - Site: ✅ | Sector: ✅
|
|
- Ideas organized by site+sector
|
|
|
|
### WRITER Module
|
|
- [ ] **Tasks/Queue** - Site: ✅ | Sector: ✅
|
|
- Tasks organized by site+sector
|
|
- [ ] **Content/Drafts** - Site: ✅ | Sector: ✅
|
|
- Content organized by site+sector
|
|
- [ ] **Content View** - Site: ❌ (context) | Sector: ❌ (context)
|
|
- Viewing specific content
|
|
- [ ] **Images** - Site: ✅ | Sector: ✅
|
|
- Images tied to content by site+sector
|
|
- [ ] **Review** - Site: ✅ | Sector: ✅
|
|
- Review queue by site+sector
|
|
- [ ] **Published** - Site: ✅ | Sector: ✅
|
|
- Published content by site+sector
|
|
|
|
### AUTOMATION Module
|
|
- [ ] **Automation** - Site: ✅ | Sector: ❌
|
|
- Automation runs at site level
|
|
|
|
### LINKER Module (if enabled)
|
|
- [ ] **Content List** - Site: ✅ | Sector: ✅
|
|
- Linking is content-specific
|
|
|
|
### OPTIMIZER Module (if enabled)
|
|
- [ ] **Content Selector** - Site: ✅ | Sector: ✅
|
|
- Optimization is content-specific
|
|
- [ ] **Analysis Preview** - Site: ❌ (context) | Sector: ❌ (context)
|
|
- Already in analysis context
|
|
|
|
### THINKER Module (Admin)
|
|
- [ ] **All Thinker pages** - Site: ❌ | Sector: ❌
|
|
- System-wide prompts/profiles
|
|
|
|
### BILLING Module
|
|
- [ ] **All Billing pages** - Site: ❌ | Sector: ❌
|
|
- Account-level billing data
|
|
|
|
### ACCOUNT Module
|
|
- [ ] **Account Settings** - Site: ❌ | Sector: ❌
|
|
- [ ] **Profile** - Site: ❌ | Sector: ❌
|
|
- [ ] **Team** - Site: ❌ | Sector: ❌
|
|
- [ ] **Plans** - Site: ❌ | Sector: ❌
|
|
- [ ] **Usage** - Site: ❌ | Sector: ❌
|
|
|
|
### HELP Module
|
|
- [ ] **Help Page** - Site: ❌ | Sector: ❌
|
|
|
|
---
|
|
|
|
## Site Setup Checklist on Site Cards
|
|
|
|
**Source:** Section 6 of Audit Report
|
|
|
|
### Current Status
|
|
- ✅ `SiteSetupChecklist.tsx` component EXISTS
|
|
- ✅ Integrated in Site Dashboard (full mode)
|
|
- ❌ **NOT integrated in SiteCard.tsx** (compact mode)
|
|
|
|
### Implementation Task
|
|
|
|
**File:** `frontend/src/components/sites/SiteCard.tsx`
|
|
|
|
Add compact checklist after status badges:
|
|
|
|
```tsx
|
|
<SiteSetupChecklist
|
|
siteId={site.id}
|
|
siteName={site.name}
|
|
hasIndustry={!!site.industry}
|
|
hasSectors={site.sectors_count > 0}
|
|
hasWordPressIntegration={!!site.wordpress_site_url}
|
|
hasKeywords={site.keywords_count > 0}
|
|
compact={true}
|
|
/>
|
|
```
|
|
|
|
**Expected Visual:**
|
|
```
|
|
┌─────────────────────────────────────────┐
|
|
│ My Website [Active] │
|
|
│ example.com │
|
|
│ Industry: Tech │ 3 Sectors │
|
|
│ ●●●○ 3/4 Setup Steps Complete │ ← compact checklist
|
|
│ [Manage →] │
|
|
└─────────────────────────────────────────┘
|
|
```
|
|
|
|
---
|
|
|
|
## Backend Requirements
|
|
|
|
Ensure `SiteSerializer` returns these fields for checklist:
|
|
- `keywords_count` - number of keywords
|
|
- `has_integration` - boolean for WordPress integration
|
|
- `active_sectors_count` - number of active sectors
|
|
- `industry_name` - industry name or null
|
|
|
|
**Status:** ✅ Already verified these fields are returned
|
|
|
|
---
|
|
|
|
## Files to Modify
|
|
|
|
### Frontend
|
|
1. `frontend/src/components/sites/SiteCard.tsx` - Add compact SiteSetupChecklist
|
|
2. Various page files to verify/add selector configuration
|
|
|
|
### Selector Components
|
|
- `frontend/src/components/common/SiteSelector.tsx`
|
|
- `frontend/src/components/common/SectorSelector.tsx`
|
|
|
|
---
|
|
|
|
## Testing Checklist
|
|
|
|
- [ ] Site selector shows on all required pages
|
|
- [ ] Sector selector shows only where data is sector-specific
|
|
- [ ] Detail pages (Cluster Detail, Content View) have no selectors
|
|
- [ ] Account/Billing pages have no selectors
|
|
- [ ] SiteCard shows compact setup checklist
|
|
- [ ] Checklist updates when site configuration changes
|
|
|
|
---
|
|
|
|
## Notes
|
|
|
|
- The "All Sites" option on Dashboard should aggregate data across all user's sites
|
|
- Context pages (detail views) inherit site/sector from parent navigation
|
|
- Selector state should persist in URL params or store for deep linking
|