mirror of
https://github.com/nexu-io/open-design.git
synced 2026-10-27 09:51:12 +01:00
Doc v2 row 12 (settings) was renamed `page` -> `page_name` in the doc; mirror that in code so every event surface uses the same field name on the wire. Drops `TrackingSettingsPage` as a separate discriminator and merges 'settings' into `TrackingPageName` so `page_name='settings'` sits beside the product surfaces. Adds two new page_view surfaces from the v2 doc: - `page_name=onboarding`: one emission per step exposure in the Connect / About you / Design system / Generation 4-step funnel. `onboarding_session_id` is generated once in sessionStorage so the 4th step (which fires from `DesignSystemDetailView` after onboarding navigates away) stays attributable. Cleared on onboarding finish so a later unrelated DS visit doesn't inherit the id. - `page_name=design_system_project | design_systems`: multi-surface DS page_view. Wires the page-level emissions (list / create / generation / preview); the module / popover / panel exposures inside home and studio are intentionally left for a follow-up so this PR doesn't blur with the unresolved "page_view vs surface_view for non-page exposures" question raised with product. `PageViewProps` becomes a discriminated union (`GenericPageViewProps | OnboardingPageViewProps | DesignSystemsPageViewProps`) so each surface gets its own typed contract. `design_system_source` is a new field on the DS page_view; it shares the name from the v2 doc with the existing run_created/run_finished field, but the value set is disjoint so a new `TrackingDesignSystemOrigin` type carries it.