You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request introduces several improvements and fixes to the
frontend UI customization system, environment variable handling, and
document upload features. The most significant changes are the overhaul
of environment variable usage for runtime customization, updates to
theme and logo configuration, and the addition of a configurable parser
option for sitemap uploads. There are also UI improvements, including
icon updates and minor code cleanups.
**Environment Variable Handling and Customization:**
* Updated `.env.development` and `.env.production` files to use
placeholder values (e.g., `VITE_API_URL=VITE_API_URL`) instead of
hardcoded values, enabling runtime environment variable replacement in
built frontend assets. (Fef0a99bL3R3,
[[1]](diffhunk://#diff-d75aa0c448ddadae4b29e6c34aa5f7331fbacb37d08d956e9c2b23eedd46d3e7L94-R96)
[[2]](diffhunk://#diff-cb142dded0e67e187c53e2de9036d0f6c65432835579422c35ff1dad08c78473L1-R1)
* Improved `env.sh` script to robustly replace all `VITE_` variables in
built JS/CSS files, correctly handling values with spaces or `=`
characters, and added documentation comments.
* Enhanced documentation in `UI_Customization.md` with troubleshooting
steps for runtime environment variable injection, clarifying the need
for placeholders at build time and the use of `env.sh` in
Docker/Kubernetes deployments.
[[1]](diffhunk://#diff-a4d41f884f97f18943db8c18e934c6fbba2c61f180314fae2211a771d11054e4L287-R292)
[[2]](diffhunk://#diff-a4d41f884f97f18943db8c18e934c6fbba2c61f180314fae2211a771d11054e4R318)
**Theme and Logo Configuration:**
* Changed the default theme to "dark", updated theme and logo fallback
logic, and clarified the available theme options and their defaults in
both documentation and `.env` files.
[[1]](diffhunk://#diff-a4d41f884f97f18943db8c18e934c6fbba2c61f180314fae2211a771d11054e4L27-R28)
[[2]](diffhunk://#diff-a4d41f884f97f18943db8c18e934c6fbba2c61f180314fae2211a771d11054e4L96-R97)
[[3]](diffhunk://#diff-a4d41f884f97f18943db8c18e934c6fbba2c61f180314fae2211a771d11054e4L116-R117)
[[4]](diffhunk://#diff-a4d41f884f97f18943db8c18e934c6fbba2c61f180314fae2211a771d11054e4L142-R142)
[[5]](diffhunk://#diff-d75aa0c448ddadae4b29e6c34aa5f7331fbacb37d08d956e9c2b23eedd46d3e7L94-R96)
* Updated logo fallback order to use theme-specific assets
(`navigation-logo-light.svg`, `navigation-logo-dark.svg`) as defaults.
[[1]](diffhunk://#diff-a4d41f884f97f18943db8c18e934c6fbba2c61f180314fae2211a771d11054e4L96-R97)
[[2]](diffhunk://#diff-d75aa0c448ddadae4b29e6c34aa5f7331fbacb37d08d956e9c2b23eedd46d3e7L94-R96)
**Document Upload and Sitemap Parser:**
* Added support for specifying a sitemap parser (`docusaurus`, `astro`,
or `generic`) in the document upload UI and API, with validation on both
frontend and backend.
[[1]](diffhunk://#diff-0f7547155cd6592b947aae6327e72dbe57073ae43aba24e82ad7ef78fee08153R26)
[[2]](diffhunk://#diff-0f7547155cd6592b947aae6327e72dbe57073ae43aba24e82ad7ef78fee08153R94-R101)
[[3]](diffhunk://#diff-a6fc8bcaabdced0bd0b5b642bd5a4aa9cb124a5bbebd0762e76f9dcb0df884c1R35-R42)
[[4]](diffhunk://#diff-a6fc8bcaabdced0bd0b5b642bd5a4aa9cb124a5bbebd0762e76f9dcb0df884c1R93-R104)
**UI and Icon Updates:**
* Replaced Heroicons with Onyx icon components throughout the admin and
chat app navigation and document upload UI for consistency and improved
appearance.
[[1]](diffhunk://#diff-aec53716ff6c4f2c234b589983906d2ffddd1cc67eabf7cd5c676fad77ff0751L3-R5)
[[2]](diffhunk://#diff-aec53716ff6c4f2c234b589983906d2ffddd1cc67eabf7cd5c676fad77ff0751L15-R19)
[[3]](diffhunk://#diff-98ed9fb0f39bd9e26a573ebe1296e1e723eb79275bd4b4d6064c64dbf81dcefaL3-R19)
[[4]](diffhunk://#diff-a6fc8bcaabdced0bd0b5b642bd5a4aa9cb124a5bbebd0762e76f9dcb0df884c1L2-R4)
[[5]](diffhunk://#diff-a6fc8bcaabdced0bd0b5b642bd5a4aa9cb124a5bbebd0762e76f9dcb0df884c1L133-R152)
[[6]](diffhunk://#diff-a6fc8bcaabdced0bd0b5b642bd5a4aa9cb124a5bbebd0762e76f9dcb0df884c1L165-R177)
[[7]](diffhunk://#diff-a6fc8bcaabdced0bd0b5b642bd5a4aa9cb124a5bbebd0762e76f9dcb0df884c1L180-R192)
**Code Quality and Cleanup:**
* Removed unused imports and cleaned up component initialization code in
`App.vue` files.
[[1]](diffhunk://#diff-cb142dded0e67e187c53e2de9036d0f6c65432835579422c35ff1dad08c78473L1-R1)
[[2]](diffhunk://#diff-98ed9fb0f39bd9e26a573ebe1296e1e723eb79275bd4b4d6064c64dbf81dcefaL3-R19)
These changes collectively improve the flexibility, maintainability, and
user experience of the frontend application.
Copy file name to clipboardExpand all lines: docs/UI_Customization.md
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,8 +24,8 @@ All customization is done through environment variables that can be set at build
24
24
|`VITE_UI_LOGO_PATH`| Common path to the main navigation logo (fallback for both light/dark) | "/assets/navigation-logo.svg" | "/assets/my-logo.png" |
25
25
|`VITE_UI_LOGO_PATH_LIGHT`| Path to logo used in light mode (falls back to `VITE_UI_LOGO_PATH`) | — | "/assets/logo-light.svg" |
26
26
|`VITE_UI_LOGO_PATH_DARK`| Path to logo used in dark mode (falls back to `VITE_UI_LOGO_PATH`) | — | "/assets/logo-dark.svg" |
27
-
|`VITE_UI_THEME_DEFAULT`| Default theme when user first visits | "light" | "dark" |
28
-
|`VITE_UI_THEME_OPTIONS`| Available theme options (comma-separated) | "light,dark" | "light,dark,auto" |
27
+
|`VITE_UI_THEME_DEFAULT`| Default theme when user first visits | "dark" | "light" |
28
+
|`VITE_UI_THEME_OPTIONS`| Available theme options (comma-separated) | "light,dark" | "light" |
29
29
30
30
### Bot Name Customization
31
31
@@ -93,8 +93,8 @@ The logo appears in the navigation header of both chat and admin applications. Y
93
93
94
94
**Fallback order:**
95
95
96
-
- Light: `VITE_UI_LOGO_PATH_LIGHT` → `VITE_UI_LOGO_PATH` → `/assets/navigation-logo.svg` (default asset exists in both apps: [chat](../services/frontend/apps/chat-app/public/assets/navigation-logo.svg), [admin](../services/frontend/apps/admin-app/public/assets/navigation-logo.svg))
97
-
- Dark: `VITE_UI_LOGO_PATH_DARK` → `VITE_UI_LOGO_PATH` → `/assets/navigation-logo.svg` (default asset exists in both apps: [chat](../services/frontend/apps/chat-app/public/assets/navigation-logo.svg), [admin](../services/frontend/apps/admin-app/public/assets/navigation-logo.svg))
96
+
- Light: `VITE_UI_LOGO_PATH_LIGHT` → `VITE_UI_LOGO_PATH` → `/assets/navigation-logo-light.svg` (default asset exists in both apps: [chat](../services/frontend/apps/chat-app/public/assets/navigation-logo-light.svg), [admin](../services/frontend/apps/admin-app/public/assets/navigation-logo-light.svg))
97
+
- Dark: `VITE_UI_LOGO_PATH_DARK` → `VITE_UI_LOGO_PATH` → `/assets/navigation-logo-dark.svg` (default asset exists in both apps: [chat](../services/frontend/apps/chat-app/public/assets/navigation-logo-dark.svg), [admin](../services/frontend/apps/admin-app/public/assets/navigation-logo-dark.svg))
98
98
99
99
**Examples:**
100
100
@@ -113,8 +113,8 @@ The application supports a flexible theme system with user preference persistenc
113
113
114
114
**Available Themes:**
115
115
116
-
-`light`: Light mode (default)
117
-
-`dark`: Dark mode
116
+
-`light`: Light mode
117
+
-`dark`: Dark mode (default)
118
118
119
119
**Theme Configuration:**
120
120
@@ -139,7 +139,7 @@ The application supports a flexible theme system with user preference persistenc
139
139
140
140
- Theme preference is saved in browser's localStorage
141
141
- Theme persists across browser sessions
142
-
-Theme toggle button appears only when multiple options are available
142
+
-The built-in theme toggle is shown only when both `light` and `dark` are available
143
143
- Manual theme switching overrides the default setting
144
144
145
145
## Development Setup
@@ -284,9 +284,12 @@ Bot names and messages support internationalization:
284
284
285
285
### Bot Name Not Updating
286
286
287
-
-**Issue**: Bot name shows as `{bot_name}` instead of actual name
288
-
-**Cause**: Vue computed property not accessed correctly
289
-
-**Solution**: Use `initialMessage.value` instead of `initialMessage` in the store
287
+
-**Issue**: Bot name stays at the default or shows a placeholder value (e.g. `VITE_BOT_NAME`)
288
+
-**Cause**: Runtime env replacement did not run (Vite env vars are build-time by default)
289
+
-**Solutions**:
290
+
- Ensure `services/frontend/.env.production` contains placeholders for the variables you want to replace (this repo includes `VITE_BOT_NAME`, `VITE_UI_*`, etc.)
291
+
- Ensure the container runs `env.sh` after copying the built files into `/usr/share/nginx/html`
292
+
- Verify the variable is set in the container environment (Kubernetes `ConfigMap`/`Secret`, Docker `-e`, etc.)
290
293
291
294
### Logo Not Loading / Wrong for Theme
292
295
@@ -312,6 +315,7 @@ Bot names and messages support internationalization:
312
315
-**Issue**: Customization works in development but not production
313
316
-**Cause**: Vite environment variables are build-time only
314
317
-**Solutions**:
318
+
- Ensure the variables exist as placeholders at build time (see `services/frontend/.env.production`)
315
319
- For Docker: Ensure `env.sh` script runs after copying files
316
320
- For Kubernetes: Use ConfigMap/Secret with proper mounting
317
321
- Verify environment variables are set in container
0 commit comments