4.3 KiB
4.3 KiB
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
- PageContext.tsx - Added
SelectorVisibilitytype andselectorVisibilityproperty toPageInfo - AppHeader.tsx - Conditionally renders
SiteAndSectorSelectorbased onpageInfo.selectorVisibility - PageHeader.tsx - Added
selectorVisibilityprop 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)
- Keywords.tsx - Uses PageHeader (default: 'both')
- Clusters.tsx - Uses PageHeader (default: 'both')
- Ideas.tsx - Uses PageHeader (default: 'both')
Writer Pages (Both Selectors - DEFAULT)
- Tasks.tsx - Uses PageHeader (default: 'both')
- Content.tsx - Uses PageHeader (default: 'both')
- Review.tsx - Uses PageHeader (default: 'both')
- Approved.tsx - Uses PageHeader (default: 'both')
Dashboard (Site Only)
- Home.tsx -
selectorVisibility: 'site-only'+ custom site selector with "All Sites"
Automation (Site Only)
- AutomationPage.tsx -
selectorVisibility: 'site-only'
Account Pages (None)
- AccountSettingsPage.tsx -
selectorVisibility: 'none' - UsageAnalyticsPage.tsx -
selectorVisibility: 'none' - PlansAndBillingPage.tsx -
selectorVisibility: 'none'
Thinker Pages (None)
- Dashboard.tsx -
selectorVisibility: 'none' - Prompts.tsx -
selectorVisibility: 'none' - AuthorProfiles.tsx -
selectorVisibility: 'none' - Strategies.tsx -
selectorVisibility: 'none' - ImageTesting.tsx -
selectorVisibility: 'none'
Help Pages (None)
- 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
- TypeScript compiles without errors
- PageContext extended with selectorVisibility
- AppHeader conditionally renders selectors
- PageHeader passes selectorVisibility to context
- All Planner pages show both selectors (default)
- All Writer pages show both selectors (default)
- Dashboard Home shows site selector only
- Automation shows site selector only
- Account pages hide both selectors
- Thinker pages hide both selectors
- 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 ✅