From 6286957f531a56a336f1745d538ac404eb17403a Mon Sep 17 00:00:00 2001 From: Mark Date: Sat, 16 May 2026 10:29:28 +0200 Subject: [PATCH] fix(01-review): IN-01 read extensionVersion from chrome.runtime.getManifest() --- src/background/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/background/index.ts b/src/background/index.ts index b033080..f35d080 100644 --- a/src/background/index.ts +++ b/src/background/index.ts @@ -361,11 +361,17 @@ async function createArchive( logger.log('✓ Added screenshot'); // Добавляем метаданные + // IN-01 fix: read version from manifest at runtime instead of the + // hardcoded '1.0.0'. Previously the metadata would silently lie about + // the running version once manifest.json bumps to 1.0.1+. The Chrome + // runtime API is always available in the SW context, so no fallback + // is needed. + const manifest = chrome.runtime.getManifest(); const metadata: SessionMetadata = { timestamp: new Date().toISOString(), url: new URL(chrome.runtime.getURL('')).origin, userAgent: navigator.userAgent, - extensionVersion: '1.0.0', + extensionVersion: manifest.version, videoBufferSeconds: 30, logDurationMinutes: 10, totalEvents: rrwebEvents.length + userEvents.length