[eric] stop tab clicks in browser cards from triggering card auto-focus (stopPropagation on tab click events), fix broken PostHog identify (SDK has no .identify(), use .set()), send referral_source to PostHog

This commit is contained in:
ciregenz
2026-04-10 09:26:18 -07:00
parent 4c5c6ff3d3
commit a5fc29351e
4 changed files with 8 additions and 3 deletions
+2
View File
@@ -153,6 +153,8 @@ async def analytics_lifespan():
id_props["name"] = settings.user_name
if getattr(settings, "user_use_case", None):
id_props["use_case"] = settings.user_use_case
if getattr(settings, "user_referral_source", None):
id_props["referral_source"] = settings.user_referral_source
identify(id_props)
except Exception as e:
logger.debug(f"Analytics startup event failed (non-critical): {e}")
+3 -3
View File
@@ -101,13 +101,13 @@ def record(
def identify(extra_properties: dict | None = None):
"""Identify the current installation with properties."""
"""Set person properties on the current installation's PostHog profile."""
if not _posthog:
return
try:
_posthog.identify(
_get_installation_id(),
_posthog.set(
distinct_id=_get_installation_id(),
properties={
"os": platform.system(),
"platform": platform.platform(),
+2
View File
@@ -96,6 +96,8 @@ async def update_settings(body: AppSettings):
id_props["name"] = body.user_name
if body.user_use_case:
id_props["use_case"] = body.user_use_case
if body.user_referral_source:
id_props["referral_source"] = body.user_referral_source
if id_props:
_identify(id_props)
@@ -726,6 +726,7 @@ const BrowserCard: React.FC<Props> = ({
onPointerDown={handleTabPointerDown}
onPointerMove={handleTabPointerMove}
onPointerUp={handleTabPointerUp}
onClick={(e: React.MouseEvent) => e.stopPropagation()}
sx={{
display: 'flex',
alignItems: 'center',