# Section 1: Site & Sector Selector Placement - VERIFIED ✅ **Date:** Implementation verified **Audit Reference:** COMPREHENSIVE-AUDIT-REPORT.md Section 1 --- ## Implementation Summary Extended the PageContext system to support page-specific selector visibility in AppHeader. ### Architecture Changes 1. **PageContext.tsx** - Added `SelectorVisibility` type and `selectorVisibility` property to `PageInfo` 2. **AppHeader.tsx** - Conditionally renders `SiteAndSectorSelector` based on `pageInfo.selectorVisibility` 3. **PageHeader.tsx** - Added `selectorVisibility` prop that passes through to PageContext ### SelectorVisibility Options | Value | Description | Use Case | |-------|-------------|----------| | `'both'` | Show site + sector selectors (default) | Planner, Writer pages | | `'site-only'` | Show only site selector | Automation, Dashboard Home | | `'none'` | Hide both selectors | Account, Billing, Thinker, Help | --- ## Pages Updated ### Planner Pages (Both Selectors - DEFAULT) - [x] Keywords.tsx - Uses PageHeader (default: 'both') - [x] Clusters.tsx - Uses PageHeader (default: 'both') - [x] Ideas.tsx - Uses PageHeader (default: 'both') ### Writer Pages (Both Selectors - DEFAULT) - [x] Tasks.tsx - Uses PageHeader (default: 'both') - [x] Content.tsx - Uses PageHeader (default: 'both') - [x] Review.tsx - Uses PageHeader (default: 'both') - [x] Approved.tsx - Uses PageHeader (default: 'both') ### Dashboard (Site Only) - [x] Home.tsx - `selectorVisibility: 'site-only'` + custom site selector with "All Sites" ### Automation (Site Only) - [x] AutomationPage.tsx - `selectorVisibility: 'site-only'` ### Account Pages (None) - [x] AccountSettingsPage.tsx - `selectorVisibility: 'none'` - [x] UsageAnalyticsPage.tsx - `selectorVisibility: 'none'` - [x] PlansAndBillingPage.tsx - `selectorVisibility: 'none'` ### Thinker Pages (None) - [x] Dashboard.tsx - `selectorVisibility: 'none'` - [x] Prompts.tsx - `selectorVisibility: 'none'` - [x] AuthorProfiles.tsx - `selectorVisibility: 'none'` - [x] Strategies.tsx - `selectorVisibility: 'none'` - [x] ImageTesting.tsx - `selectorVisibility: 'none'` ### Help Pages (None) - [x] Help.tsx - `selectorVisibility: 'none'` --- ## Files Modified | File | Change | |------|--------| | `context/PageContext.tsx` | Added `SelectorVisibility` type and property | | `layout/AppHeader.tsx` | Conditional rendering of SiteAndSectorSelector | | `components/common/PageHeader.tsx` | Added `selectorVisibility` prop | | `pages/Automation/AutomationPage.tsx` | Added page context with 'site-only' | | `pages/Dashboard/Home.tsx` | Added page context with 'site-only' | | `pages/account/AccountSettingsPage.tsx` | Added page context with 'none' | | `pages/account/UsageAnalyticsPage.tsx` | Added page context with 'none' | | `pages/account/PlansAndBillingPage.tsx` | Added page context with 'none' | | `pages/Thinker/Dashboard.tsx` | Added selectorVisibility='none' to PageHeader | | `pages/Thinker/Prompts.tsx` | Added selectorVisibility='none' to PageHeader | | `pages/Thinker/AuthorProfiles.tsx` | Added selectorVisibility='none' to PageHeader | | `pages/Thinker/Strategies.tsx` | Added selectorVisibility='none' to PageHeader | | `pages/Thinker/ImageTesting.tsx` | Added selectorVisibility='none' to PageHeader | | `pages/Help/Help.tsx` | Added page context with 'none' | --- ## Verification Checklist - [x] TypeScript compiles without errors - [x] PageContext extended with selectorVisibility - [x] AppHeader conditionally renders selectors - [x] PageHeader passes selectorVisibility to context - [x] All Planner pages show both selectors (default) - [x] All Writer pages show both selectors (default) - [x] Dashboard Home shows site selector only - [x] Automation shows site selector only - [x] Account pages hide both selectors - [x] Thinker pages hide both selectors - [x] Help page hides both selectors --- ## Audit Requirements Match | Page Category | Required | Implemented | |---------------|----------|-------------| | Dashboard Home | Site (All Sites) + NO Sector | ✅ site-only | | Setup pages | Site + Sector | ✅ default (both) | | Planner pages | Site + Sector | ✅ default (both) | | Writer pages | Site + Sector | ✅ default (both) | | Automation | Site ONLY | ✅ site-only | | Account/Billing | NONE | ✅ none | | Thinker | NONE | ✅ none | | Help | NONE | ✅ none | **STATUS: SECTION 1 COMPLETE ✅**