fix(ui): compact embedded chat URLs (#2431)

* fix(ui): keep embedded session chat URLs compact

* test(ui): guard embedded session chat URL length

* fix(ui): sync embedded custom themes

Bootstrap custom themes from parent window so iframe URLs stay compact.

Refs #2423

* docs(ui): clarify theme sync precedence
This commit is contained in:
Kai Yang
2026-07-26 15:33:04 +03:00
committed by GitHub
parent ae40f0fe7d
commit 023ec2362e
6 changed files with 135 additions and 22 deletions
@@ -46,7 +46,6 @@ export const buildEmbeddedSessionChatURL = (
url.searchParams.set('lightThemeId', theme.lightThemeId);
url.searchParams.set('darkThemeId', theme.darkThemeId);
url.searchParams.set('themeVariant', theme.currentTheme.metadata.variant === 'dark' ? 'dark' : 'light');
url.searchParams.set('currentTheme', JSON.stringify(theme.currentTheme));
url.hash = '';
return url.toString();
@@ -126,4 +125,4 @@ export const getEmbeddedSessionChatOriginSessionId = (): string | null => {
} catch {
return null;
}
};
};