Skip to content

Refactor: cleanup unused prompt and ui components#5

Merged
jadru merged 5 commits into
mainfrom
improve-asset-quality
Mar 2, 2026
Merged

Refactor: cleanup unused prompt and ui components#5
jadru merged 5 commits into
mainfrom
improve-asset-quality

Conversation

@jadru

@jadru jadru commented Feb 18, 2026

Copy link
Copy Markdown
Owner

개요

  • AI 아이콘 생성 플로우의 데드 코드를 정리하고, 프롬프트 템플릿 기반 경로를 반영했습니다.
  • 공통 UI 컴포넌트 중복/미사용 항목을 삭제하고 empty-state 통합을 마쳤습니다.
  • 빌드/타입 체크와 관련 조치(테스트 픽스처 타입 보정)까지 반영했습니다.

주요 변경

  • lib/ai/fal.ts
    • generateIconWithPromptConfig 제거
    • getStyleModifier, getIconStyleModifier, getCornerStyleModifier, getColorInstruction 제거
    • 프롬프트 템플릿(promptTemplate) 처리 경로 반영 및 negative prompt 병합
  • lib/prompts/composer.ts
    • composeOgPrompt, composeFullPrompt 제거
  • lib/prompts/index.ts
    • 제거된 함수 export 정리
  • components/ui/empty-state.tsx
    • shared 버전의 동작(action 타입 확장, inline 유틸) 통합
  • 삭제
    • components/shared/empty-state.tsx
    • components/shared/skeleton.tsx
    • components/shared/loading-spinner.tsx
    • components/ui/tooltip.tsx
    • components/ui/toast.tsx
    • components/ui/notification-center.tsx
    • components/ui/cookie-consent.tsx
    • components/ui/confirm-dialog.tsx
    • components/ui/copy-button.tsx
  • supabase/migrations/011_icon_ai_prompt_template.sql
    • style_presets.icon_ai_prompt_template 컬럼 추가 + 프리셋별 기본 템플릿 업데이트

검증

  • npx tsc --noEmit
  • npm run build

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

vercel Bot commented Feb 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
brand-kit Ready Ready Preview, Comment Mar 2, 2026 3:26pm

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread lib/ai/fal.ts Outdated
Comment on lines +197 to +201
const colorSchemeMap: Record<ColorMode, IconColorScheme> = {
mono: 'monochrome',
duotone: 'duotone',
gradient: 'gradient-linear',
vibrant: 'vibrant-multi',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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' : ''),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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.
@jadru jadru changed the title feat: StylePreset-aware asset generation with multi-layout OG Refactor: cleanup unused prompt and ui components Mar 2, 2026
@jadru
jadru merged commit 7854468 into main Mar 2, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant