From 49f91c761d287d8909ac837fd346a97f5b3668e3 Mon Sep 17 00:00:00 2001 From: osiu97 Date: Wed, 8 Jul 2026 18:51:19 +0200 Subject: [PATCH] remove emojis from logging. Fixes #5 --- gemini.md | 1 + web/js/motion.js | 6 +++--- web/js/sections/stepper-test.js | 4 ++-- web/js/ui.js | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/gemini.md b/gemini.md index 3f820c3..4de7a10 100644 --- a/gemini.md +++ b/gemini.md @@ -434,6 +434,7 @@ To add a new section: | **Hash-based routing** | Keeps the SPA working from `file://` and simple static servers without needing a history API setup | | **Persistent Homing State** | The UI uses `localStorage.getItem('wiji_homed')` to track if the arm has been homed during the user's ongoing interaction. This avoids forcing the user to re-home every time they switch tabs or pages. Sending `HOMEALL` sets this to `true`. | | **Stateless Sequence Storage** | To remain serverless, sequences are stored per-background in `web/assets/backgrounds//sequences.json`. The Sequence Editor generates the JSON payload, which the user manually copy-pastes into the file to persist. Sequences marked `"favorite": true` appear automatically in Quick Sequences cards across the app. | +| **No Emojis in Logging** | Emojis in `UI.log` and console log statements are strictly forbidden. Always use text prefixes like `[ERROR]`, `[WARNING]`, `[INFO]` instead. | --- diff --git a/web/js/motion.js b/web/js/motion.js index 5d67122..2f08a27 100644 --- a/web/js/motion.js +++ b/web/js/motion.js @@ -161,7 +161,7 @@ async function goto(targetX, targetY, mode = 'direct') { // Quick check on final destination const destCheck = IK.checkWorkspace(targetX, targetY); if (!destCheck.ok) { - UI.log(`⛔ Destination blocked: ${destCheck.reason}`, 'error'); + UI.log(`[ERROR] Destination blocked: ${destCheck.reason}`, 'error'); return false; } @@ -185,7 +185,7 @@ async function goto(targetX, targetY, mode = 'direct') { // Prevent infinite loop if already at/near safe point const distToSafe = Math.sqrt(Math.pow(currentPos.endX - SAFE_X, 2) + Math.pow(currentPos.endY - SAFE_Y, 2)); if (distToSafe < 5) { - UI.log(`⛔ Path completely blocked even via safe point`, 'error'); + UI.log(`[ERROR] Path completely blocked even via safe point`, 'error'); return false; } @@ -199,7 +199,7 @@ async function goto(targetX, targetY, mode = 'direct') { } if (!segments) { - UI.log(`⛔ Target unreachable (path blocked by mechanism)`, 'error'); + UI.log(`[ERROR] Target unreachable (path blocked by mechanism)`, 'error'); return false; } } diff --git a/web/js/sections/stepper-test.js b/web/js/sections/stepper-test.js index c5df155..ea4b5b2 100644 --- a/web/js/sections/stepper-test.js +++ b/web/js/sections/stepper-test.js @@ -191,7 +191,7 @@ async function moveToXY(targetX, targetY) { // Check workspace limits first (quick check before queue) const wsCheck = IK.checkWorkspace(targetX, targetY); if (!wsCheck.ok) { - UI.log(`⛔ ${wsCheck.reason}`, 'warn'); + UI.log(`[WARNING] ${wsCheck.reason}`, 'warn'); return false; } @@ -697,7 +697,7 @@ const StepperTestSection = { const { wx, wy, sx, sy } = pointerToWorld(e); const ws = IK.checkWorkspace(wx, wy); if (!ws.ok) { - UI.log(`⛔ ${ws.reason}`, 'warn'); + UI.log(`[WARNING] ${ws.reason}`, 'warn'); return; } showTargetMarker(sx, sy); diff --git a/web/js/ui.js b/web/js/ui.js index 712758a..eaa5b6e 100644 --- a/web/js/ui.js +++ b/web/js/ui.js @@ -86,7 +86,7 @@ const UI = (() => { BLE.on('connected', (name) => { setButtonLoading('btn-ble-connect', false); setConnectionStatus(true, name); - log(`Connected to "${name}" ✓`, 'success'); + log(`Connected to "${name}" [INFO]`, 'success'); }); BLE.on('disconnected', () => { @@ -96,7 +96,7 @@ const UI = (() => { }); BLE.on('sent', (cmd) => { - log(`→ ${cmd}`, 'sent'); + log(`[SEND] ${cmd}`, 'sent'); }); BLE.on('status', (msg) => {