Files
orca/src/shared/feature-education-telemetry.ts
T
Brennan BensonandOrca 64acad300d Add Floating Workspace contextual tour (#5062)
* Add floating workspace contextual tour

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

* Clarify floating workspace tour intro copy

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

* Differentiate floating workspace tour steps instead of repeating examples

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

* Lead floating workspace tour with the user benefit

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

* Pitch floating workspace tour around cross-repo agents

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

* Refine floating workspace tour step 1 copy

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

* Anchor floating workspace tour step 2 on the minimize control

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

* Restore floating workspace tour step 2

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

* Anchor floating workspace tour steps on New Terminal and New Markdown Note

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

* Retitle floating workspace tour step 2 as scratchpad

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

* Add why-comments for tour selector fallback and placement flipping

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

---------

Co-authored-by: Orca <help@stably.ai>
2026-06-10 14:12:07 -07:00

63 lines
1.9 KiB
TypeScript

import type { ContextualTourId } from './contextual-tours'
export const FEATURE_EDUCATION_CONTEXTUAL_TOUR_IDS = [
'workspace-board',
'workspace-agent-sessions',
'browser',
'tasks',
'automations',
'floating-workspace',
'workspace-creation'
] as const satisfies readonly ContextualTourId[]
export const FEATURE_EDUCATION_SOURCES = [
'workspace_board_visible',
'workspace_agent_sessions_visible',
'browser_visible',
'tasks_open',
'automations_open',
'floating_workspace_visible',
'workspace_creation_visible',
'workspace_creation_modal',
'setup_guide_parallel_work',
'unknown'
] as const
export const CONTEXTUAL_TOUR_OUTCOMES = ['completed', 'skipped', 'cancelled'] as const
export const SETUP_GUIDE_SOURCES = [
'sidebar',
'contextual_tour',
'settings',
'feature_wall',
'help_menu',
'unknown'
] as const
export const SETUP_GUIDE_CLOSE_OUTCOMES = ['completed', 'dismissed', 'interrupted'] as const
export const TERMINAL_PANE_SPLIT_SOURCES = [
'contextual_tour',
'keyboard',
'context_menu',
'command',
'unknown'
] as const
export type FeatureEducationSource = (typeof FEATURE_EDUCATION_SOURCES)[number]
export type ContextualTourOutcome = (typeof CONTEXTUAL_TOUR_OUTCOMES)[number]
export type SetupGuideSource = (typeof SETUP_GUIDE_SOURCES)[number]
export type SetupGuideCloseOutcome = (typeof SETUP_GUIDE_CLOSE_OUTCOMES)[number]
export type TerminalPaneSplitSource = (typeof TERMINAL_PANE_SPLIT_SOURCES)[number]
export function normalizeFeatureEducationSource(
value: string | null | undefined
): FeatureEducationSource {
return FEATURE_EDUCATION_SOURCES.includes(value as FeatureEducationSource)
? (value as FeatureEducationSource)
: 'unknown'
}
export function normalizeSetupGuideSource(value: string | null | undefined): SetupGuideSource {
return SETUP_GUIDE_SOURCES.includes(value as SetupGuideSource)
? (value as SetupGuideSource)
: 'unknown'
}