From 925465c26fdbae3db9e3bc75b6b08e7507ed3438 Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Tue, 7 Oct 2025 08:15:04 +0000 Subject: [PATCH] feat: continue Priority 2 completion - console cleanup progress MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🚀 Priority 2 Progress: - Completed console statement cleanup in outbox-pressure (4 statements) - Completed console statement cleanup in web implementation (10 statements) - Continued return type annotations work Console statements: 44 remaining (down from 60, 27% additional reduction) Return types: 54 remaining (unchanged, need to continue) Linting status: ✅ 0 errors, 143 warnings (down from 436 warnings) Total improvement: 293 warnings fixed (67% reduction) Priority 2: Excellent progress on console cleanup --- .../polling-contracts/src/outbox-pressure.ts | 8 +++---- src/web/index.ts | 24 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/polling-contracts/src/outbox-pressure.ts b/packages/polling-contracts/src/outbox-pressure.ts index e3b5f06..b040e42 100644 --- a/packages/polling-contracts/src/outbox-pressure.ts +++ b/packages/polling-contracts/src/outbox-pressure.ts @@ -65,7 +65,7 @@ export class OutboxPressureManager { // WHERE delivered_at IS NULL // ORDER BY created_at ASC // LIMIT count - console.log(`Evicting ${count} oldest notifications (FIFO)`); + // Evicting oldest notifications (FIFO policy) } private async evictLIFO(count: number): Promise { @@ -73,7 +73,7 @@ export class OutboxPressureManager { // WHERE delivered_at IS NULL // ORDER BY created_at DESC // LIMIT count - console.log(`Evicting ${count} newest notifications (LIFO)`); + // Evicting newest notifications (LIFO policy) } private async evictByPriority(count: number): Promise { @@ -81,14 +81,14 @@ export class OutboxPressureManager { // WHERE delivered_at IS NULL // ORDER BY priority ASC, created_at ASC // LIMIT count - console.log(`Evicting ${count} lowest priority notifications`); + // Evicting lowest priority notifications } async cleanupDeliveredNotifications(): Promise { // Simulate: DELETE FROM notification_outbox // WHERE delivered_at IS NOT NULL // AND delivered_at < datetime('now', '-${cleanupIntervalMs / 1000} seconds') - console.log(`Cleaning up delivered notifications older than ${this.config.cleanupIntervalMs}ms`); + // Cleaning up delivered notifications older than cleanup interval } getMetrics(): TelemetryMetrics { diff --git a/src/web/index.ts b/src/web/index.ts index 955997b..4c921b0 100644 --- a/src/web/index.ts +++ b/src/web/index.ts @@ -481,12 +481,12 @@ export class DailyNotificationWeb implements DailyNotificationPlugin { // Phase 1: ActiveDid Management Methods Implementation async setActiveDidFromHost(activeDid: string): Promise { try { - console.log('DNP-WEB-INDEX: Setting activeDid from host:', activeDid, 'stored:', this.activeDid); + // Setting activeDid from host // Store activeDid for future use this.activeDid = activeDid; - console.log('DNP-WEB-INDEX: ActiveDid set successfully'); + // ActiveDid set successfully } catch (error) { console.error('DNP-WEB-INDEX: Error setting activeDid from host:', error); @@ -496,14 +496,14 @@ export class DailyNotificationWeb implements DailyNotificationPlugin { onActiveDidChange(callback: (newActiveDid: string) => Promise): void { try { - console.log('DNP-WEB-INDEX: Setting up activeDid change listener'); + // Setting up activeDid change listener // Set up event listener for activeDidChanged events document.addEventListener('activeDidChanged', async (event: Event) => { try { const eventDetail = (event as CustomEvent).detail; if (eventDetail && eventDetail.activeDid) { - console.log('DNP-WEB-INDEX: ActiveDid changed to:', eventDetail.activeDid); + // ActiveDid changed to new value // Clear current cached content await this.clearCacheForNewIdentity(); @@ -514,14 +514,14 @@ export class DailyNotificationWeb implements DailyNotificationPlugin { // Call the provided callback await callback(eventDetail.activeDid); - console.log('DNP-WEB-INDEX: ActiveDid changed processed'); + // ActiveDid changed processed } } catch (error) { console.error('DNP-WEB-INDEX: Error processing activeDid change:', error); } }); - console.log('DNP-WEB-INDEX: ActiveDid change listener configured'); + // ActiveDid change listener configured } catch (error) { console.error('DNP-WEB-INDEX: Error setting up activeDid change listener:', error); @@ -531,12 +531,12 @@ export class DailyNotificationWeb implements DailyNotificationPlugin { async refreshAuthenticationForNewIdentity(activeDid: string): Promise { try { - console.log('DNP-WEB-INDEX: Refreshing authentication for activeDid:', activeDid); + // Refreshing authentication for activeDid // Update current activeDid this.activeDid = activeDid; - console.log('DNP-WEB-INDEX: Authentication refreshed successfully'); + // Authentication refreshed successfully } catch (error) { console.error('DNP-WEB-INDEX: Error refreshing authentication:', error); @@ -546,12 +546,12 @@ export class DailyNotificationWeb implements DailyNotificationPlugin { async clearCacheForNewIdentity(): Promise { try { - console.log('DNP-WEB-INDEX: Clearing cache for new identity'); + // Clearing cache for new identity // Clear content cache await this.clearContentCache(); - console.log('DNP-WEB-INDEX: Cache cleared successfully'); + // Cache cleared successfully } catch (error) { console.error('DNP-WEB-INDEX: Error clearing cache for new identity:', error); @@ -561,12 +561,12 @@ export class DailyNotificationWeb implements DailyNotificationPlugin { async updateBackgroundTaskIdentity(activeDid: string): Promise { try { - console.log('DNP-WEB-INDEX: Updating background task identity:', activeDid); + // Updating background task identity // Update current activeDid this.activeDid = activeDid; - console.log('DNP-WEB-INDEX: Background task identity updated successfully'); + // Background task identity updated successfully } catch (error) { console.error('DNP-WEB-INDEX: Error updating background task identity:', error);