From 9c07122d60fd867347a8c34da26aca93b90728ef Mon Sep 17 00:00:00 2001 From: Michael Czechowski Date: Tue, 30 Dec 2025 19:53:40 +0100 Subject: [PATCH] fix: update module name element instead of overwriting pill - Add moduleName element reference for .module-name span - Update only module name text, preserving level indicator --- src/app.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app.js b/src/app.js index 27fa5f9..46d5567 100644 --- a/src/app.js +++ b/src/app.js @@ -21,6 +21,7 @@ const elements = { // Left panel modulePill: document.getElementById("module-pill"), + moduleName: document.querySelector(".module-name"), lessonTitle: document.getElementById("lesson-title"), lessonDescription: document.getElementById("lesson-description"), taskInstruction: document.getElementById("task-instruction"), @@ -315,9 +316,9 @@ function loadCurrentLesson() { // Update UI based on mode updateEditorForMode(mode); - // Update module pill with category name - if (elements.modulePill && engineState.module) { - elements.modulePill.textContent = engineState.module.title; + // Update module name in pill + if (elements.moduleName && engineState.module) { + elements.moduleName.textContent = engineState.module.title; } // Reset any success indicators