sync: update from private repo (dfadcd5f)
CI / build-and-test (push) Has been cancelled

This commit is contained in:
oss-sync
2026-06-23 06:38:48 +00:00
parent 6a2f2cc736
commit 29ccaf1e92
377 changed files with 31028 additions and 8994 deletions
@@ -14,9 +14,12 @@ type Phase = 'form' | 'logging-in' | 'saving' | 'done' | 'error';
interface Props {
existingProfile?: BrowserSessionProfile | null;
onClose: () => void;
/** When set, the profile is created under this space (`?spaceId=…`) and the
* space-scoped react-query key is invalidated on save. Omit for personal. */
spaceId?: string;
}
export function AddBrowserSessionDialog({ existingProfile, onClose }: Props) {
export function AddBrowserSessionDialog({ existingProfile, onClose, spaceId }: Props) {
const { t } = useTranslation('userfolder');
const qc = useQueryClient();
const [phase, setPhase] = useState<Phase>('form');
@@ -42,7 +45,7 @@ export function AddBrowserSessionDialog({ existingProfile, onClose }: Props) {
storageOrigins: [new URL(startUrl).origin],
loggedInSelector: loggedInSelector || undefined,
loginUrlPatterns: loginUrl ? [loginUrl] : [],
});
}, spaceId);
pid = created.id;
setProfileId(pid);
}
@@ -62,6 +65,7 @@ export function AddBrowserSessionDialog({ existingProfile, onClose }: Props) {
try {
await saveBrowserSession(profileId, sessionId);
qc.invalidateQueries({ queryKey: ['browser-session-profiles'] });
if (spaceId) qc.invalidateQueries({ queryKey: ['space-browser-sessions', spaceId] });
setPhase('done');
setTimeout(onClose, 800);
} catch (e) {