How Byk works
Three native components turn one authenticated session into a retained, observable trading workspace.
1. Authenticate natively
BykSessionStore uses BykIOSCore.SupabaseClient to request an email one-time code and verify it. On success, BykIOSCore.SessionKeychain stores the session in the login Keychain under ai.wisent.byk.session. Signing out clears that item.
2. Seed the web session
TradingWebView derives the Supabase project reference from AppConfig.supabaseURL, creates the @supabase/ssr session cookie named sb-<ref>-auth-token, and injects it at document start. Only then does it load app.wisent.com/assistants/trading.
3. Retain and observe the surface
The navigation delegate records whether the page is loading, when it last loaded, and WebKit's own failure sentence. BykRootView presents that state in a shared Wisent application shell:
- A 44-point context bar identifies the Trading assistant and signed-in account.
- Freshness reports the age of the retained page.
- Reload and Sign out remain immediately available.
- A healthy surface uses one signal-strip line.
- A failed load or unseeded cookie uses a full-width alert with the real error above the retained page.
- Sign-in failures use the same alert pattern and name the failed step.
4. Update signed bundles
A signed Byk.app can expose Sparkle's Check for Updates… command through wisent-desktop-update. The feed is optional and must use HTTPS.