diff --git a/bot/static/index.html b/bot/static/index.html
index f95a36f..66c2fa1 100644
--- a/bot/static/index.html
+++ b/bot/static/index.html
@@ -660,15 +660,15 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -1830,8 +1830,12 @@ function switchTab(tabId) {
// Show the selected tab content
document.getElementById(tabId).classList.add('active');
- // Add active class to the clicked tab button
- event.target.classList.add('active');
+ // Add active class to the matching tab button via data-tab attribute
+ const activeBtn = document.querySelector(`.tab-button[data-tab="${tabId}"]`);
+ if (activeBtn) activeBtn.classList.add('active');
+
+ // Persist active tab to localStorage
+ localStorage.setItem('miku-active-tab', tabId);
console.log(`🔄 Switched to ${tabId}`);
if (tabId === 'tab1') {
@@ -1846,6 +1850,12 @@ function switchTab(tabId) {
// Initialize
document.addEventListener('DOMContentLoaded', function() {
+ // Restore persisted tab from localStorage
+ const savedTab = localStorage.getItem('miku-active-tab');
+ if (savedTab && document.getElementById(savedTab)) {
+ switchTab(savedTab);
+ }
+
loadStatus();
loadServers();
loadLastPrompt();