feat(marketplace): update redirect logic and sound for landing page

This commit is contained in:
Lilith 2026-01-13 05:21:57 -08:00
parent 2e477d2abb
commit 36fa3254dd
7 changed files with 22 additions and 35 deletions

3
.npmrc
View file

@ -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

View file

@ -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;
}

View file

@ -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 <Navigate to={redirectPath} replace />;
}

View file

@ -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);
};

View file

@ -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 {

View file

@ -5,3 +5,4 @@
// Landing feature pages
export * from '../features/landing/pages/AudienceRouter';
export { default as AudienceRouter } from '../features/landing/pages/AudienceRouter';

View file

@ -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"