fix(01-review): IN-01 read extensionVersion from chrome.runtime.getManifest()

This commit is contained in:
2026-05-16 10:29:28 +02:00
parent f8a9c10758
commit 6286957f53

View File

@@ -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