Add telemetry for entering linear mode (#8263)

Standard disclaimer: Telemetry only applies on cloud builds

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8263-Add-telemetry-for-entering-linear-mode-2f16d73d3650819ea53efeeb562ea095)
by [Unito](https://www.unito.io)
This commit is contained in:
AustinMroz
2026-01-22 21:28:41 -08:00
committed by GitHub
parent df85c4d463
commit 7952eb477e
5 changed files with 28 additions and 4 deletions

View File

@@ -1235,8 +1235,11 @@ export function useCoreCommands(): ComfyCommand[] {
id: 'Comfy.ToggleLinear',
icon: 'pi pi-database',
label: 'Toggle Simple Mode',
function: () => {
function: (metadata?: Record<string, unknown>) => {
const source =
typeof metadata?.source === 'string' ? metadata.source : 'keybind'
const newMode = !canvasStore.linearMode
if (newMode) useTelemetry()?.trackEnterLinear({ source })
app.rootGraph.extra.linearMode = newMode
workflowStore.activeWorkflow?.changeTracker?.checkState()
canvasStore.linearMode = newMode