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:
@@ -2457,6 +2457,10 @@ export const ContextPanel: React.FC = () => {
|
||||
}
|
||||
|
||||
const data = event.data as { type?: unknown };
|
||||
if (data?.type === 'openchamber:theme-sync-request') {
|
||||
postThemeSyncToEmbeddedChat();
|
||||
return;
|
||||
}
|
||||
if (data?.type === 'openchamber:chat-settings-request') {
|
||||
postChatSettingsSyncToEmbeddedChat();
|
||||
return;
|
||||
@@ -2473,7 +2477,7 @@ export const ContextPanel: React.FC = () => {
|
||||
|
||||
window.addEventListener('message', handleMessage);
|
||||
return () => window.removeEventListener('message', handleMessage);
|
||||
}, [postChatSettingsSyncToEmbeddedChat, setThemeMode, themeMode]);
|
||||
}, [postChatSettingsSyncToEmbeddedChat, postThemeSyncToEmbeddedChat, setThemeMode, themeMode]);
|
||||
|
||||
React.useLayoutEffect(() => {
|
||||
const hasAnyChatTab = tabs.some((tab) => tab.mode === 'chat');
|
||||
|
||||
Reference in New Issue
Block a user