Add multiple-session support: run several independent encrypted chats at once
CodeQL Analysis / Analyze CodeQL (push) Has been cancelled
Deploy Application / deploy (push) Has been cancelled
Mirror to Codeberg / mirror (push) Has been cancelled
Mirror to PrivacyGuides / mirror (push) Has been cancelled

Each conversation now runs its own WebRTC session with separate keys and SAS verification, so chats never mix. Adds a side panel to switch between open chats with unread badges, a New chat action that leaves existing chats connected, per-chat local labels stored only on this device, and an availability status (Available, Away, Busy, Invisible) shared end-to-end with connected peers. Also includes vendored Prism syntax highlighting, more reliable PWA update handling, and offline send queueing fixes. Version 4.10.0.
This commit is contained in:
lockbitchat
2026-06-26 00:00:13 -04:00
parent db5d6e481d
commit 0e3e3a2974
16 changed files with 2828 additions and 924 deletions
+30 -2
View File
@@ -141,12 +141,37 @@ function updateIndexHtmlVersions(buildVersion) {
fs.writeFileSync(indexHtmlPath, indexHtml, 'utf-8');
console.log('✅ index.html versions updated');
} catch (error) {
console.warn('⚠️ Failed to update index.html versions:', error.message);
}
}
/**
* Stamp the build version into sw.js so the file's bytes change every deploy. The browser
* only reinstalls a Service Worker when sw.js differs byte-for-byte; without this the SW
* (and its caches) stay frozen and clients never pick up new releases automatically.
*/
function updateServiceWorkerVersion(buildVersion) {
try {
const swPath = path.join(CONFIG.publicDir, 'sw.js');
if (!fs.existsSync(swPath)) {
console.warn('⚠️ sw.js not found, skipping SW version stamp');
return;
}
let sw = fs.readFileSync(swPath, 'utf-8');
if (/const SW_BUILD_VERSION = '[^']*';/.test(sw)) {
sw = sw.replace(/const SW_BUILD_VERSION = '[^']*';/, `const SW_BUILD_VERSION = '${buildVersion}';`);
fs.writeFileSync(swPath, sw, 'utf-8');
console.log(`✅ sw.js build stamp updated → ${buildVersion}`);
} else {
console.warn('⚠️ SW_BUILD_VERSION marker not found in sw.js');
}
} catch (error) {
console.warn('⚠️ Failed to stamp sw.js version:', error.message);
}
}
/**
* Validate generated meta.json
*/
@@ -184,7 +209,10 @@ function main() {
// Update versions in index.html
updateIndexHtmlVersions(meta.version);
// Stamp the build version into sw.js so the Service Worker reinstalls each deploy.
updateServiceWorkerVersion(meta.version);
console.log('✅ Build metadata generation completed');
}