Refactor: cleanup unused prompt and ui components#5
Conversation
Upgrade icon generation model to flux/dev for higher quality. Add AI-generated backgrounds for OG images with fallback to CSS gradients. Support negative prompts for AI generation. Expand i18n coverage and fix security bugs (email API auth, timing-safe HMAC). Add URL base utilities. - Remove unused PasswordInput component and translations - Migrate FAL models (icons: flux/schnell → flux/dev, OG: new flux/dev background generation) - Hybrid OG rendering with AI backgrounds and sharp compositing - Negative prompt support via icon_ai_negative_prompt preset field - i18n extraction for dashboard nav, plan status, projects, password, plan gate, wizard - Security: fix email API auth logic and use timing-safe HMAC comparison - Add getBaseUrl() utility for environment-aware redirect origins - Database migration: add og_ai_style_modifier and icon_ai_negative_prompt to style_presets
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8e85c57233
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const colorSchemeMap: Record<ColorMode, IconColorScheme> = { | ||
| mono: 'monochrome', | ||
| duotone: 'duotone', | ||
| gradient: 'gradient-linear', | ||
| vibrant: 'vibrant-multi', |
There was a problem hiding this comment.
Preserve brand colors in derived icon prompts
When generateIcon takes the brandProfile path, deriveIconPromptConfig maps every colorMode to generic schemes (monochrome, duotone, etc.) rather than brand-colors. In composeIconPrompt (lib/prompts/composer.ts), the passed brandColors are only injected when colorScheme === 'brand-colors', so the primary brand color is effectively dropped for most icon generations. This is a regression from the previous prompt builder and causes icons to drift from the user's selected brand palette.
Useful? React with 👍 / 👎.
| proMonthlyVariantId: process.env.LEMONSQUEEZY_PRO_VARIANT_ID!, | ||
| proYearlyVariantId: process.env.LEMONSQUEEZY_PRO_YEARLY_VARIANT_ID || process.env.LEMONSQUEEZY_PRO_VARIANT_ID!, | ||
| appUrl: process.env.NEXT_PUBLIC_APP_URL || 'http://localhost:3000', | ||
| appUrl: process.env.NEXT_PUBLIC_APP_URL || (process.env.NODE_ENV === 'development' ? 'http://localhost:3000' : ''), |
There was a problem hiding this comment.
Enforce non-empty production app URL for checkout redirects
This fallback now sets appUrl to an empty string in production when NEXT_PUBLIC_APP_URL is unset, which makes checkout redirects become "/settings/billing?success=true" when interpolated in the checkout route. In that configuration, users can be redirected incorrectly (or checkout creation can fail depending on provider validation), turning a missing env var into a production billing outage. This should fail fast like getBaseUrl() does instead of emitting a malformed base URL.
Useful? React with 👍 / 👎.
Integrate main's quality tier support, seed tracking, image validation, compression options, and logging with our branch's AI background generation, negative prompts, warnings propagation, and i18n changes.
개요
empty-state통합을 마쳤습니다.주요 변경
lib/ai/fal.tsgenerateIconWithPromptConfig제거getStyleModifier,getIconStyleModifier,getCornerStyleModifier,getColorInstruction제거promptTemplate) 처리 경로 반영 및 negative prompt 병합lib/prompts/composer.tscomposeOgPrompt,composeFullPrompt제거lib/prompts/index.tscomponents/ui/empty-state.tsxaction타입 확장, inline 유틸) 통합components/shared/empty-state.tsxcomponents/shared/skeleton.tsxcomponents/shared/loading-spinner.tsxcomponents/ui/tooltip.tsxcomponents/ui/toast.tsxcomponents/ui/notification-center.tsxcomponents/ui/cookie-consent.tsxcomponents/ui/confirm-dialog.tsxcomponents/ui/copy-button.tsxsupabase/migrations/011_icon_ai_prompt_template.sqlstyle_presets.icon_ai_prompt_template컬럼 추가 + 프리셋별 기본 템플릿 업데이트검증
npx tsc --noEmitnpm run build