feat(tables): add PostHog events for table-workflow run/stop gestures#4839
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview New catalog events Reviewed by Cursor Bugbot for commit ff4b6d8. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR adds PostHog analytics instrumentation for table-workflow run and stop gestures by defining two new typed events (
Confidence Score: 5/5Safe to merge — changes are purely additive analytics instrumentation with no effect on table data or workflow execution paths. The two changed files make only additive changes: new type definitions in the event catalog and captureEvent calls in existing dispatcher callbacks. Every capture site is placed after its existing no-op guards, so short-circuited paths emit nothing. The posthogRef pattern is consistent with the rest of the codebase, dependency arrays are correct, and the typed event map ensures compile-time correctness. There are no changes to business logic, API calls, or state management. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant UI as UI Gesture
participant T as table.tsx dispatcher
participant API as runColumnMutate / cancelRunsMutate
participant PH as PostHog
UI->>T: onRunColumn / onRunRows / onRunRow
T->>T: "runScope() — guard: groupIds.length == 0?"
alt no-op
T-->>UI: return (no event)
else real run
T->>API: runColumnMutate(args)
T->>PH: "captureEvent(table_workflow_run, {source, run_mode, group_count, row_count, has_limit})"
end
UI->>T: onStopRow(rowId)
T->>API: "cancelRunsMutate({scope:row, rowId})"
T->>PH: "captureEvent(table_workflow_stopped, {scope:row, row_count:1})"
UI->>T: onStopRows(rowIds)
T->>T: "guard: rowIds.length == 0?"
alt no-op
T-->>UI: return (no event)
else real stop
loop each rowId
T->>API: "cancelRunsMutate({scope:row, rowId})"
end
T->>PH: "captureEvent(table_workflow_stopped, {scope:rows, row_count:N})"
end
UI->>T: onStopAll()
T->>API: "cancelRunsMutate({scope:all})"
T->>PH: "captureEvent(table_workflow_stopped, {scope:all, row_count:null})"
Reviews (1): Last reviewed commit: "feat(tables): add PostHog events for tab..." | Re-trigger Greptile |
Summary
table_workflow_run(source: row|rows|column,run_mode,group_count,row_count,has_limit) andtable_workflow_stopped(scope: all|row|rows,row_count)table.tsx(runScope,onStopRow,onStopRows,onStopAll) so every run/stop gesture — column header menu, per-row gutter, action bar, right-click context menu — fires exactly once per real dispatchrunScopeafter its no-op guards, so short-circuited runs don't emit phantom eventsusePostHog()+posthogRefpattern so memoized children (DataRow,RunStatusControl) keep stable handler identityType of Change
Testing
Tested manually.
bun run lintandbun run check:api-validation:strictboth pass;tsc --noEmitclean on touched files.Checklist