diff --git a/shared/components/rstack-collab-overlay.ts b/shared/components/rstack-collab-overlay.ts
index 38e138a..171eec8 100644
--- a/shared/components/rstack-collab-overlay.ts
+++ b/shared/components/rstack-collab-overlay.ts
@@ -4,7 +4,7 @@
* Features:
* - "N online" badge (top-right pill with colored dots)
* - People panel dropdown (click badge to open)
- * - Solo/Share mode toggle in panel
+ * - Online/Offline mode toggle in panel
* - Remote cursors (SVG arrows with username labels, viewport-relative)
* - Focus highlighting (colored outline rings on data-collab-id elements)
* - Auto-discovery via rspace-doc-subscribe events from runtime
@@ -438,7 +438,7 @@ export class RStackCollabOverlay extends HTMLElement {
fragments.push(`
${this.#escHtml(msg)}
`);
}
- // Self row with Solo/Share toggle
+ // Self row with Online/Offline toggle
const isSolo = this.#soloMode;
const selfModule = this.#moduleId || '';
fragments.push(`
@@ -448,9 +448,9 @@ export class RStackCollabOverlay extends HTMLElement {
${this.#escHtml(this.#localUsername)} (you)
${selfModule ? `${this.#escHtml(selfModule)}` : ''}
-
-
-
+
+
+
`);
@@ -845,7 +845,7 @@ const OVERLAY_CSS = `
font-weight: normal;
}
- /* ── Mode toggle (Solo/Share) ── */
+ /* ── Mode toggle (Online/Offline) ── */
.mode-toggle {
display: flex;
diff --git a/website/canvas.html b/website/canvas.html
index a8de718..27b229c 100644
--- a/website/canvas.html
+++ b/website/canvas.html
@@ -3030,7 +3030,14 @@
// Initialize Presence for real-time cursors
const peerId = generatePeerId();
- const storedUsername = localStorage.getItem("rspace-username") || `User ${peerId.slice(0, 4)}`;
+ const storedUsername = (() => {
+ try {
+ const s = JSON.parse(localStorage.getItem("encryptid_session") || "{}");
+ if (s?.username) return s.username;
+ if (s?.displayName) return s.displayName;
+ } catch {}
+ return localStorage.getItem("rspace-username") || `User ${peerId.slice(0, 4)}`;
+ })();
const presence = new PresenceManager(canvas, peerId, storedUsername);
// Initialize Comment Pin Manager