fix: reduce console warnings and errors in web UI (#183)

- Add UILogger utility for conditional debug logging
- Replace verbose console.log/warn with UILogger.debug in charts.js
- Suppress non-critical cache and preference warnings in data-store.js
- Use debug level for log stream reconnection messages
- Add ?debug=true URL param or localStorage ag_debug=true to enable debug output

Closes #183
This commit is contained in:
quocthai0404
2026-01-24 14:43:01 +07:00
parent 71b9b001fd
commit cd44b2bc9d
6 changed files with 171 additions and 25 deletions

View File

@@ -18,7 +18,7 @@
<body
class="bg-space-950 text-gray-300 font-sans antialiased min-h-screen overflow-hidden selection:bg-neon-purple selection:text-white"
x-cloak x-data="app" x-init="console.log('App initialized')">
x-cloak x-data="app" x-init="if(window.UILogger) window.UILogger.debug('App initialized')">
<!-- Toast Notification -->
<div class="fixed top-4 right-4 z-[100] flex flex-col gap-2 pointer-events-none">
@@ -389,6 +389,7 @@
<!-- Scripts - Loading Order Matters! -->
<!-- 1. Config & Utils (global helpers) -->
<script src="js/config/constants.js"></script>
<script src="js/utils/ui-logger.js"></script><!-- Issue #183: Conditional logging utility -->
<script src="js/utils.js"></script>
<script src="js/utils/error-handler.js"></script>
<script src="js/utils/account-actions.js"></script>