chore(src): 🔧 Update TypeScript files in src directory to maintain consistency

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Lilith 2026-02-22 08:07:12 -08:00
parent a380f6cfe2
commit a7573b0b98
6 changed files with 34 additions and 14 deletions

View file

@ -80,6 +80,19 @@ export const defaultFeatureFlags: FeatureFlagRegistry = {
tags: ['trustedmeet', 'messaging'],
},
// ============================================
// Landing Content Features
// ============================================
'content-pages': {
id: 'content-pages',
name: 'Content Pages',
description: 'Blog posts, manifestos, and editorial content on the landing site',
defaultEnabled: false,
enabledEnvironments: [],
tags: ['landing', 'content'],
},
// ============================================
// Admin Features
// ============================================

View file

@ -15,7 +15,11 @@ import { authHandlers } from '../../../sso/shared/msw'
// Blog
import { blogHandlers } from '../../../blog/shared/msw'
// Merchant (subscription tiers)
import { tiersHandlers } from '../../../merchant/shared/msw'
export const allHandlers = [
...authHandlers,
...blogHandlers,
...tiersHandlers,
]

View file

@ -3,3 +3,4 @@ export { allHandlers } from './handlers'
// Re-export individual handler groups for selective use
export { authHandlers } from '../../../sso/shared/msw'
export { blogHandlers } from '../../../blog/shared/msw'
export { tiersHandlers, MOCK_TIERS } from '../../../merchant/shared/msw'

View file

@ -15,6 +15,7 @@ import { Suspense, lazy } from 'react'
// TODO: Fix missing package - @lilith/vite-version-plugin doesn't exist
import { AgeGateWrapper } from './providers/AgeGateWrapper'
import { FeatureFlagProvider } from '@platform/feature-flags/react'
import { usePageViewTracking } from '@lilith/analytics-client/react'
import { AuthProviderWithDevBridge } from '@lilith/auth-provider'
import { ProfileProviderWithDevBridge } from '@lilith/profile-client'
@ -25,6 +26,7 @@ import { ToastProvider } from '@lilith/ui-feedback'
import { BrowserRouter, Routes, Route, Navigate } from '@lilith/ui-router'
import { createBlogRoutes } from '@features/blog/frontend-public/src'
import { useFeatureFlag } from '@platform/feature-flags/react'
import { useOptionalDeploymentConfig } from '@/config'
// Core pages - load immediately
@ -144,6 +146,7 @@ const LazyRoute = ({ children }: { children: ReactNode }) => <Suspense fallback=
const AppRoutes = () => {
usePageViewTracking()
const config = useOptionalDeploymentConfig()
const contentPagesEnabled = useFeatureFlag('content-pages')
return (
<Routes>
@ -231,7 +234,7 @@ const AppRoutes = () => {
path={RoutePatterns.companyValues}
element={<LazyRoute><CompanyValuesPage /></LazyRoute>}
/>
{config?.features.contentPagesEnabled && (
{contentPagesEnabled && (
<Route
path={RoutePatterns.companyValuesManifesto}
element={<LazyRoute><ManifestoPage /></LazyRoute>}
@ -263,7 +266,7 @@ const AppRoutes = () => {
/>
{/* Compare → Blog redirects (permanent, gated with content pages) */}
{config?.features.contentPagesEnabled && (
{contentPagesEnabled && (
<>
<Route path="/compare/privacy/report" element={<Navigate to="/blog/privacy-audit-2026-full-report" replace />} />
<Route path="/compare/privacy" element={<Navigate to="/blog/privacy-audit-2026" replace />} />
@ -315,7 +318,7 @@ const AppRoutes = () => {
/>
{/* Blog (gated behind contentPagesEnabled) */}
{config?.features.contentPagesEnabled && createBlogRoutes({
{contentPagesEnabled && createBlogRoutes({
basePath: '/blog',
apiUrl: '/api/blog',
domain: config.brand.domain ?? 'atlilith.com',
@ -369,11 +372,13 @@ export default function App() {
mapDevUserToProfiles={mapLandingDevUserToProfiles}
>
<DevContentOverlay hideToggle>
<BrowserRouter>
<ToastProvider>
<AppRoutes />
</ToastProvider>
</BrowserRouter>
<FeatureFlagProvider environment={import.meta.env.MODE as 'development' | 'staging' | 'production'}>
<BrowserRouter>
<ToastProvider>
<AppRoutes />
</ToastProvider>
</BrowserRouter>
</FeatureFlagProvider>
</DevContentOverlay>
</ProfileProviderWithDevBridge>
</AgeGateWrapper>

View file

@ -25,7 +25,7 @@ import { useNavigate } from '@lilith/ui-router'
import { ExternalLinkIcon } from '@lilith/ui-icons'
import { useTranslation } from 'react-i18next'
import { useOptionalDeploymentConfig } from '@/config'
import { useFeatureFlag } from '@platform/feature-flags/react'
import { getRealmUrl } from '@/config/realms'
import { useDevUser } from '@/contexts'
import { Routes } from '@/routes'
@ -46,8 +46,7 @@ export default function Header({ pageType }: HeaderProps) {
const prefetchAboutPage = usePrefetchAboutPage()
const { t } = useTranslation('common')
const { isAuthenticated } = useDevUser()
const deploymentConfig = useOptionalDeploymentConfig()
const features = deploymentConfig?.features ?? { contentPagesEnabled: false }
const contentPagesEnabled = useFeatureFlag('content-pages')
const handleNavClick = (path: string, aboutPage?: AboutPageType) => {
playSound('button-click')
@ -199,7 +198,7 @@ export default function Header({ pageType }: HeaderProps) {
],
},
// Lane 6: Blog — content-focused, surfaces phase-1 manifestos (gated)
...(features.contentPagesEnabled ? [{
...(contentPagesEnabled ? [{
label: t('navigation.blog'),
children: [
{

View file

@ -117,8 +117,6 @@ export interface LandingFeaturesConfig {
/** Whether age verification gate is enabled (always true for adult content sites) */
ageVerification?: boolean;
/** Whether content pages (blog, manifestos) are visible in nav and routable */
contentPagesEnabled: boolean;
}
/**