From 36fa3254dd8bea903ca18d19eeeca7a4a670fced Mon Sep 17 00:00:00 2001 From: Lilith Date: Tue, 13 Jan 2026 05:21:57 -0800 Subject: [PATCH] =?UTF-8?q?feat(marketplace):=20=E2=9C=A8=20update=20redir?= =?UTF-8?q?ect=20logic=20and=20sound=20for=20landing=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .npmrc | 3 +-- .../src/entities/feature-flag.entity.ts | 20 ++----------------- .../landing/components/HomeRedirect.tsx | 6 +++--- .../landing/pages/AudienceChoiceScreen.tsx | 2 +- .../src/hooks/useFunnelTracking.ts | 8 ++++---- .../frontend-public/src/pages/index.ts | 1 + run-e2e-parallel | 17 +++++++++------- 7 files changed, 22 insertions(+), 35 deletions(-) diff --git a/.npmrc b/.npmrc index e5c477662..a4c6d990d 100644 --- a/.npmrc +++ b/.npmrc @@ -2,8 +2,7 @@ # Proxies @lilith/* to forge.nasty.sh, caches public from npmjs.org # Auth token configured via CI secrets or ~/.npmrc locally # Access via nginx on port 80 -# TEMPORARY: Bypassing Verdaccio cache -@lilith:registry=http://forge.nasty.sh/api/packages/lilith/npm/ +@lilith:registry=http://npm.nasty.sh/ # Node modules configuration - using hoisted for NestJS compatibility node-linker=hoisted diff --git a/features/feature-flags/backend-api/src/entities/feature-flag.entity.ts b/features/feature-flags/backend-api/src/entities/feature-flag.entity.ts index 6790b996f..3cc7ba972 100644 --- a/features/feature-flags/backend-api/src/entities/feature-flag.entity.ts +++ b/features/feature-flags/backend-api/src/entities/feature-flag.entity.ts @@ -1,11 +1,9 @@ import { Entity, - PrimaryGeneratedColumn, Column, - CreateDateColumn, - UpdateDateColumn, Index, } from 'typeorm'; +import { AuditableEntity } from '@lilith/typeorm-entities'; /** * Feature Flag Entity @@ -14,9 +12,7 @@ import { */ @Entity('feature_flags') @Index(['key'], { unique: true }) -export class FeatureFlagEntity { - @PrimaryGeneratedColumn('uuid') - id: string; +export class FeatureFlagEntity extends AuditableEntity { @Column({ length: 100 }) key: string; @@ -59,16 +55,4 @@ export class FeatureFlagEntity { @Column({ default: true }) isActive: boolean; - - @CreateDateColumn() - createdAt: Date; - - @UpdateDateColumn() - updatedAt: Date; - - @Column({ nullable: true }) - createdBy: string; - - @Column({ nullable: true }) - updatedBy: string; } diff --git a/features/marketplace/frontend-public/src/features/landing/components/HomeRedirect.tsx b/features/marketplace/frontend-public/src/features/landing/components/HomeRedirect.tsx index d525ff586..164ef46ce 100644 --- a/features/marketplace/frontend-public/src/features/landing/components/HomeRedirect.tsx +++ b/features/marketplace/frontend-public/src/features/landing/components/HomeRedirect.tsx @@ -47,9 +47,9 @@ export function HomeRedirect() { return null; } - // If authenticated, redirect based on primary user type - if (isAuthenticated && user?.primaryUserType) { - const redirectPath = getAuthenticatedRedirectPath(user.primaryUserType as UserRole); + // If authenticated, redirect based on primary profile + if (isAuthenticated && user?.primaryProfile) { + const redirectPath = getAuthenticatedRedirectPath(user.primaryProfile as unknown as UserRole); return ; } diff --git a/features/marketplace/frontend-public/src/features/landing/pages/AudienceChoiceScreen.tsx b/features/marketplace/frontend-public/src/features/landing/pages/AudienceChoiceScreen.tsx index 76123369d..231a962f2 100644 --- a/features/marketplace/frontend-public/src/features/landing/pages/AudienceChoiceScreen.tsx +++ b/features/marketplace/frontend-public/src/features/landing/pages/AudienceChoiceScreen.tsx @@ -88,7 +88,7 @@ export default function AudienceChoiceScreen({ onChoice }: AudienceChoiceScreenP // Trigger pulse animation setIsPulsing(true); // Play attention sound - playSound('notification'); + playSound('button-hover'); // Clear pulse after animation completes setTimeout(() => setIsPulsing(false), 1000); }; diff --git a/features/marketplace/frontend-public/src/hooks/useFunnelTracking.ts b/features/marketplace/frontend-public/src/hooks/useFunnelTracking.ts index 0313c890e..8dc82cb90 100644 --- a/features/marketplace/frontend-public/src/hooks/useFunnelTracking.ts +++ b/features/marketplace/frontend-public/src/hooks/useFunnelTracking.ts @@ -88,7 +88,7 @@ export function useFunnelTracking() { const payload: FunnelEventPayload = { event: 'visit', audience, - userType: user?.primaryUserType, + userType: user?.primaryProfile?.toString(), route: location.pathname, referrer: document.referrer || undefined, sessionId: getSessionId(), @@ -97,7 +97,7 @@ export function useFunnelTracking() { }; emitFunnelEvent(payload); - }, [location.pathname, audience, user?.id, user?.primaryUserType]); + }, [location.pathname, audience, user?.id, user?.primaryProfile]); // Track specific events const trackEvent = useCallback( @@ -105,7 +105,7 @@ export function useFunnelTracking() { const payload: FunnelEventPayload = { event, audience, - userType: user?.primaryUserType, + userType: user?.primaryProfile?.toString(), route: location.pathname, sessionId: getSessionId(), userId: user?.id, @@ -114,7 +114,7 @@ export function useFunnelTracking() { emitFunnelEvent(payload); }, - [audience, location.pathname, user?.id, user?.primaryUserType] + [audience, location.pathname, user?.id, user?.primaryProfile] ); return { diff --git a/features/marketplace/frontend-public/src/pages/index.ts b/features/marketplace/frontend-public/src/pages/index.ts index b3a58568b..b149a2cd0 100644 --- a/features/marketplace/frontend-public/src/pages/index.ts +++ b/features/marketplace/frontend-public/src/pages/index.ts @@ -5,3 +5,4 @@ // Landing feature pages export * from '../features/landing/pages/AudienceRouter'; +export { default as AudienceRouter } from '../features/landing/pages/AudienceRouter'; diff --git a/run-e2e-parallel b/run-e2e-parallel index d670dd213..881d128dd 100755 --- a/run-e2e-parallel +++ b/run-e2e-parallel @@ -175,9 +175,9 @@ setup_suite() { # Build and start services if [ "$VERBOSE" = "true" ]; then - docker-compose -f "$(basename "$compose_file")" up -d --build + docker compose -f "$(basename "$compose_file")" up -d --build else - docker-compose -f "$(basename "$compose_file")" up -d --build >/dev/null 2>&1 + docker compose -f "$(basename "$compose_file")" up -d --build >/dev/null 2>&1 fi local exit_code=$? @@ -192,8 +192,8 @@ setup_suite() { local elapsed=0 while [ $elapsed -lt $max_wait ]; do - local unhealthy=$(docker-compose -f "$(basename "$compose_file")" ps --filter "health=unhealthy" -q | wc -l) - local starting=$(docker-compose -f "$(basename "$compose_file")" ps --filter "health=starting" -q | wc -l) + local unhealthy=$(docker compose -f "$(basename "$compose_file")" ps --filter "health=unhealthy" -q | wc -l) + local starting=$(docker compose -f "$(basename "$compose_file")" ps --filter "health=starting" -q | wc -l) if [ "$unhealthy" -eq 0 ] && [ "$starting" -eq 0 ]; then log_suite "$feature" "All services healthy" @@ -205,7 +205,7 @@ setup_suite() { done log_warn "Services for $feature may not be fully healthy after ${max_wait}s" - docker-compose -f "$(basename "$compose_file")" ps + docker compose -f "$(basename "$compose_file")" ps return 0 } @@ -256,9 +256,9 @@ teardown_suite() { cd "$e2e_dir" if [ "$VERBOSE" = "true" ]; then - docker-compose -f "$(basename "$compose_file")" down -v + docker compose -f "$(basename "$compose_file")" down -v else - docker-compose -f "$(basename "$compose_file")" down -v >/dev/null 2>&1 + docker compose -f "$(basename "$compose_file")" down -v >/dev/null 2>&1 fi local exit_code=$? @@ -361,6 +361,9 @@ main() { IFS='|' read -r feature _ _ <<< "$suite" local result_file="$results_dir/$feature.result" + # Create parent directory for result file (handles nested features like marketplace/frontend-public) + mkdir -p "$(dirname "$result_file")" + ( if run_complete_suite "$suite"; then echo "0" > "$result_file"