opencode-statboard 2.10.36 → 2.10.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-statboard",
3
- "version": "2.10.36",
3
+ "version": "2.10.38",
4
4
  "description": "Real-time dashboard for opencode token usage and cost statistics",
5
5
  "main": "server.js",
6
6
  "bin": {
package/public/index.html CHANGED
@@ -1033,7 +1033,7 @@ function renderAll() {
1033
1033
  renderTrend(tr || null);
1034
1034
  renderHeatmap(heatmapTrend);
1035
1035
  renderTools(lastTools);
1036
- if (!window.__quotaLoaded) { window.__quotaLoaded = true; loadQuota(); }
1036
+ loadQuota(); // always refresh quota on render (server caches 5 min, so this is cheap)
1037
1037
  }
1038
1038
 
1039
1039
  // ---- data loading ------------------------------------------------------
@@ -1069,12 +1069,12 @@ async function poll() {
1069
1069
  renderTrend(null);
1070
1070
  }
1071
1071
  renderTools(lastTools);
1072
+ loadQuota(); // refresh quota after data load
1072
1073
  const ago = Math.round((Date.now() - (j.generatedAt || 0)) / 1000);
1073
1074
  const time = new Date().toLocaleTimeString(lang === 'zh-TW' ? 'zh-TW' : 'en', { hour12: false });
1074
1075
  lastUpdatedText = t('lastUpdated') + ' ' + time + ' (' + t('dataAgo') + ' ' + ago + 's)';
1075
1076
  $('updated').textContent = lastUpdatedText;
1076
1077
  refreshCurrentReport(); // auto-refresh report panels
1077
- loadQuota(); // keep quota/RPD fresh on a 24/7 dashboard (server caches 5 min, so this is cheap)
1078
1078
  return j;
1079
1079
  } catch (e) {
1080
1080
  $('updated').textContent = t('connFail') + ': ' + e.message;