fuzzyworld

north-star / commit

added

12fa94c534dafc501eb12eafaef8342d0a5cb1c0 · Pavel Safronov · 2026-03-14 21:37:55 -0700 · parents 49e9f35c4155

added
 src/app.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/app.js b/src/app.js
index ccf2c89..922a77c 100644
--- a/src/app.js
+++ b/src/app.js
@@ -19,7 +19,9 @@ const createRoomLink = document.getElementById('create-room-link');
 const participantsPanel = document.getElementById('participants-panel');
 const participantsToggle = document.getElementById('participants-toggle');
 const logDebug = (message) => {
-    debugParagraph.innerText = message;
+    if (message !== debugParagraph.innerHTML) {
+        debugParagraph.innerHTML = message;
+    }
 }
 
 const arrow = document.getElementById('default-arrow');
@@ -37,11 +39,13 @@ let headingCorrectionDeg = (() => {
     const parsed = Number(localStorage.getItem(HEADING_CORRECTION_STORAGE_KEY));
     return Number.isFinite(parsed) ? parsed : 0;
 })();
+let isLocalCommit = true;
 let GIT_COMMIT = 'local-dev';
 try {
     const commitModule = await import('./commit.js');
     if (typeof commitModule.GIT_COMMIT === 'string') {
         GIT_COMMIT = commitModule.GIT_COMMIT;
+        isLocalCommit = false;
     }
 } catch {
     // Local/dev environments may not have commit.js.
@@ -825,7 +829,7 @@ const render = () => {
     document.body.style.backgroundColor = selfParticipant.color;
 
     // output debug info
-    logDebug(`Name: ${selfParticipant.name} | Real participants: ${participants.length} | Commit: ${GIT_COMMIT}`);
+    logDebug(`Name: ${selfParticipant.name} | Real participants: ${participants.length} | Commit: ${isLocalCommit ? 'local' : `<a href="https://gitlab.com/PavelSafronov/north-star/-/commit/${GIT_COMMIT}">${GIT_COMMIT}</a>`}`);
 };
 
 await syncSelfParticipant();