Files
igny8/to-do-s/SECTION_1_VERIFIED.md
IGNY8 VPS (Salman) 3ea7d4f933 final polish 3
2025-12-27 15:55:54 +00:00

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

  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)

  • 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