Files
orca/src/main/browser/browser-session-startup.ts
T
NeilandOrca 06afbc4a4b Add optional Orca account sign-in (#7515)
* auth v1

* fable review

* lint

* Account menu with org membership management

Default UX is a compact account menu (sign in, organization selection, sign
out) that renders only when cloud auth is configured; adds an organization
members dialog (invite, role, remove) gated on server-side role checks. The
multi-profile switcher UI is preserved behind ORCA_MULTI_PROFILE_UI=1.

Co-authored-by: Orca <help@stably.ai>

* Gate the optional account sign-in UI to dev builds

The account switcher stays hidden in packaged builds while the feature is
in progress. Dev builds still show it when the client env vars are set, and
a dev-only Settings > Dev Tools > Orca Cloud section mirrors it.

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Orca <help@stably.ai>
2026-07-09 02:13:13 -07:00

23 lines
725 B
TypeScript

import { browserSessionRegistry } from './browser-session-registry'
import type { BrowserSessionRegistryProfileOptions } from './browser-session-registry'
let initialized = false
export function initializeBrowserSessionsForApp(
activeProfile?: BrowserSessionRegistryProfileOptions
): void {
if (initialized) {
return
}
if (activeProfile) {
browserSessionRegistry.configureForOrcaProfile(activeProfile)
}
// Why: cookie replay must happen before the first session.fromPartition()
// call, otherwise Chromium opens the stale live cookie DB before import.
browserSessionRegistry.applyPendingCookieImport()
browserSessionRegistry.initializeBrowserSessionsFromPersistedState()
initialized = true
}