Skip to content

Commit ae0c826

Browse files
committed
fix: remove scroll and cursor tracking from analytics configuration
1 parent 22bf24d commit ae0c826

File tree

3 files changed

+3
-58
lines changed

3 files changed

+3
-58
lines changed

apps/vscode-extension/src/services/DecoratorService.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ export class DecoratorService {
8080
// Create blur decorator with step-specific or global blur/opacity values
8181
const blur = DecoratorService.getBlurValue(stepBlur);
8282
const opacity = DecoratorService.getOpacityValue(stepOpacity);
83+
if (DecoratorService.blurDecorator) {
84+
DecoratorService.blurDecorator.dispose();
85+
}
8386
DecoratorService.blurDecorator = DecoratorService.createBlurDecorator(blur, opacity);
8487

8588
// Reset the decorators

apps/vscode-extension/src/services/analytics/AnalyticsService.ts

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ export class AnalyticsService {
5050
AnalyticsService.config = {
5151
enabled: enabled ?? DEFAULT_ANALYTICS_CONFIG.enabled,
5252
narrativeThreshold: DEFAULT_ANALYTICS_CONFIG.narrativeThreshold,
53-
trackCursorMovements: DEFAULT_ANALYTICS_CONFIG.trackCursorMovements,
54-
trackScrollEvents: DEFAULT_ANALYTICS_CONFIG.trackScrollEvents,
5553
trackTerminalCommands: DEFAULT_ANALYTICS_CONFIG.trackTerminalCommands,
5654
autoSaveInterval: DEFAULT_ANALYTICS_CONFIG.autoSaveInterval,
5755
};
@@ -425,56 +423,6 @@ export class AnalyticsService {
425423
AnalyticsService.lastEventTime = Date.now();
426424
}
427425

428-
/**
429-
* Records a scroll event.
430-
*/
431-
public static recordScroll(
432-
filePath: string,
433-
direction: 'up' | 'down',
434-
linesScrolled: number,
435-
visibleStart?: number,
436-
visibleEnd?: number,
437-
): void {
438-
if (!AnalyticsService.currentSession || !AnalyticsService.config.trackScrollEvents) {
439-
return;
440-
}
441-
442-
const now = new Date().toISOString();
443-
const normalizedPath = AnalyticsService.normalizePath(filePath);
444-
445-
const activity = AnalyticsService.fileActivityMap.get(normalizedPath);
446-
if (activity) {
447-
// Calculate dwell time from last event
448-
const dwellTime = Date.now() - AnalyticsService.lastEventTime;
449-
450-
activity.scrollEvents.push({
451-
timestamp: now,
452-
direction,
453-
linesScrolled,
454-
dwellTime,
455-
visibleRange:
456-
visibleStart !== undefined && visibleEnd !== undefined
457-
? { start: visibleStart, end: visibleEnd }
458-
: undefined,
459-
});
460-
461-
// Record navigation event
462-
AnalyticsService.recordNavigationEvent({
463-
timestamp: now,
464-
type: 'scroll',
465-
toFile: normalizedPath,
466-
details: {
467-
lineRange:
468-
visibleStart !== undefined && visibleEnd !== undefined
469-
? { start: visibleStart, end: visibleEnd }
470-
: undefined,
471-
},
472-
});
473-
}
474-
475-
AnalyticsService.lastEventTime = Date.now();
476-
}
477-
478426
/**
479427
* Records a terminal command execution.
480428
*/

packages/common/src/models/Analytics.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -411,10 +411,6 @@ export interface AnalyticsConfig {
411411
enabled: boolean;
412412
/** Minimum narrative duration to detect (milliseconds) */
413413
narrativeThreshold: number;
414-
/** Whether to track cursor movements */
415-
trackCursorMovements: boolean;
416-
/** Whether to track scroll events */
417-
trackScrollEvents: boolean;
418414
/** Whether to track terminal commands */
419415
trackTerminalCommands: boolean;
420416
/** Auto-save interval in milliseconds (0 = only save at end) */
@@ -427,8 +423,6 @@ export interface AnalyticsConfig {
427423
export const DEFAULT_ANALYTICS_CONFIG: AnalyticsConfig = {
428424
enabled: true,
429425
narrativeThreshold: 30000, // 30 seconds
430-
trackCursorMovements: false, // Can be verbose
431-
trackScrollEvents: true,
432426
trackTerminalCommands: true,
433427
autoSaveInterval: 30000, // 30 seconds
434428
};

0 commit comments

Comments
 (0)