diff --git a/ENVIRONMENT.md b/ENVIRONMENT.md index cf56279507..58d045f0c6 100644 --- a/ENVIRONMENT.md +++ b/ENVIRONMENT.md @@ -46,7 +46,7 @@ This document lists all environment variables used in the Kilo Code cloud monore ### Vercel & Build Info - `VERCEL_ENV` - Vercel environment (`development`, `preview`, `production`); used in `apps/web/next.config.mjs`, `apps/web/src/lib/constants.ts`, and `apps/web/.env.test`. [SERVER] -- `VERCEL_TARGET_ENV` - Vercel system or custom target environment; `apps/web/src/lib/constants.ts` uses the `staging` target to select `https://staging-app.kilo.ai`. [SERVER] +- `VERCEL_TARGET_ENV` - Vercel system or custom deployment environment (`development`, `preview`, `production`, `staging`, etc.); used in `apps/web/src/app/layout.tsx` to identify staging UI. [SERVER] - `VERCEL_URL` - Auto-injected by Vercel; current deployment URL. Used in `apps/web/src/lib/buildInfo.ts`. [SERVER] - `VERCEL_GIT_COMMIT_SHA` - Auto-injected by Vercel; Git commit SHA of the current deployment. Used in `apps/web/src/lib/buildInfo.ts`. [SERVER] - `NEXT_PUBLIC_VERCEL_URL` - Client-exposed Vercel deployment URL from build info. [PUBLIC] diff --git a/apps/web/public/kilo-v1-STAGING.svg b/apps/web/public/kilo-v1-STAGING.svg new file mode 100644 index 0000000000..6420fc7815 --- /dev/null +++ b/apps/web/public/kilo-v1-STAGING.svg @@ -0,0 +1,13 @@ + + diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx index 2943ba3092..48416235bf 100644 --- a/apps/web/src/app/layout.tsx +++ b/apps/web/src/app/layout.tsx @@ -6,6 +6,7 @@ import { PostHogProvider } from '../components/PostHogProvider'; import { Providers } from '../components/Providers'; import { DataLayerProvider } from '../components/DataLayerProvider'; import { ImpactIdentify } from '@/components/ImpactIdentify'; +import { StagingEnvironmentBanner } from '@/components/shared/StagingEnvironmentBanner'; import { APP_URL } from '@/lib/constants'; const inter = Inter({ @@ -26,6 +27,9 @@ const jetbrainsMono = JetBrains_Mono({ variable: '--font-jetbrains', }); +const isStagingEnvironment = process.env.VERCEL_TARGET_ENV === 'staging'; +const stagingFavicon = '/kilo-v1-STAGING.svg'; + export const metadata: Metadata = { title: 'Kilo Code - Open source AI agent VS Code extension', description: @@ -47,8 +51,9 @@ export const metadata: Metadata = { 'Write code more efficiently by generating code, automating tasks, and providing suggestions', }, icons: { - icon: - process.env.NODE_ENV !== 'production' + icon: isStagingEnvironment + ? [{ url: stagingFavicon, type: 'image/svg+xml' }] + : process.env.NODE_ENV !== 'production' ? [{ url: '/kilo-v1-DEV.svg', type: 'image/svg+xml' }] : [ { url: '/favicon.ico', sizes: '48x48', type: 'image/x-icon' }, @@ -59,24 +64,28 @@ export const metadata: Metadata = { sizes: '180x180', type: 'image/png', }, - shortcut: { url: '/favicon.ico' }, + shortcut: { url: isStagingEnvironment ? stagingFavicon : '/favicon.ico' }, other: [ { rel: 'manifest', url: '/site.webmanifest', }, - { - rel: 'icon', - type: 'image/png', - sizes: '192x192', - url: '/favicon/android-chrome-192x192.png', - }, - { - rel: 'icon', - type: 'image/png', - sizes: '512x512', - url: '/favicon/android-chrome-512x512.png', - }, + ...(isStagingEnvironment + ? [] + : [ + { + rel: 'icon', + type: 'image/png', + sizes: '192x192', + url: '/favicon/android-chrome-192x192.png', + }, + { + rel: 'icon', + type: 'image/png', + sizes: '512x512', + url: '/favicon/android-chrome-512x512.png', + }, + ]), ], }, other: { @@ -107,6 +116,7 @@ export default function RootLayout({ >
+ {isStagingEnvironment ?