feat: mark embedded session chat as desktop surface

Adds a surface=desktop URL param to embedded session chat links
Uses the surface override to classify embedded chat as desktop
Covers the new URL parameter in tests
This commit is contained in:
Bohdan Triapitsyn
2026-07-11 10:48:20 +03:00
parent 5a91c08413
commit 0a89f05d07
3 changed files with 5 additions and 3 deletions
@@ -54,6 +54,7 @@ describe('embedded session chat URL', () => {
const url = new URL(src);
expect(url.searchParams.get('ocPanel')).toBe('session-chat');
expect(url.searchParams.get('surface')).toBe('desktop');
expect(url.searchParams.get('themeMode')).toBe('system');
expect(url.searchParams.get('themeVariant')).toBe('dark');
expect(url.searchParams.get('lightThemeId')).toBe('custom-light');
@@ -30,6 +30,7 @@ export const buildEmbeddedSessionChatURL = (
const url = new URL(window.location.pathname, window.location.origin);
url.searchParams.set('ocPanel', 'session-chat');
url.searchParams.set('surface', 'desktop');
url.searchParams.set('sessionId', sessionID);
if (readOnly) {
url.searchParams.set('readOnly', '1');