mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
Reduce egress costs, add PWA support, fix Polymarket and Railway relay
Egress optimization: - Add s-maxage + stale-while-revalidate to all API endpoints for Vercel CDN caching - Add vercel.json with immutable caching for hashed assets - Add gzip compression to sidecar responses >1KB - Add gzip to Railway RSS responses (4 paths previously uncompressed) - Increase polling intervals: markets/crypto 60s→120s, ETF/macro/stablecoins 60s→180s - Remove hardcoded Railway URL from theater-posture.js (now env-var only) PWA / Service Worker: - Add vite-plugin-pwa with autoUpdate strategy - Cache map tiles (CacheFirst), fonts (StaleWhileRevalidate), static assets - NetworkOnly for all /api/* routes (real-time data must be fresh) - Manual SW registration (web only, skip Tauri) - Add offline fallback page - Replace manual manifest with plugin-generated manifest Polymarket fix: - Route dev proxy through production Vercel (bypasses JA3 blocking) - Add 4th fallback tier: production URL as absolute fallback Desktop/Sidecar: - Dual-backend cache (_upstash-cache.js): Redis cloud + in-memory+file desktop - Settings window OK/Cancel redesign - Runtime config and secret injection improvements
This commit is contained in:
@@ -7,18 +7,44 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="settings-shell">
|
||||
<header class="settings-header">
|
||||
<div>
|
||||
<h1>Settings</h1>
|
||||
<p>Desktop runtime configuration and local API keys.</p>
|
||||
</div>
|
||||
<div class="settings-actions">
|
||||
<button id="openLogsBtn" type="button">Open Logs Folder</button>
|
||||
<button id="openSidecarLogBtn" type="button">Open API Log</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="settings-tabs" role="tablist">
|
||||
<button class="settings-tab active" role="tab" aria-selected="true" aria-controls="tabPanelKeys" data-tab="keys">API Keys</button>
|
||||
<button class="settings-tab" role="tab" aria-selected="false" aria-controls="tabPanelDebug" data-tab="debug">Debug & Logs</button>
|
||||
</div>
|
||||
<p id="settingsActionStatus" class="settings-action-status" aria-live="polite"></p>
|
||||
<main id="settingsApp" class="settings-content"></main>
|
||||
<div class="settings-tab-panels">
|
||||
<div id="tabPanelKeys" class="settings-tab-panel active" role="tabpanel">
|
||||
<main id="settingsApp" class="settings-content"></main>
|
||||
</div>
|
||||
<div id="tabPanelDebug" class="settings-tab-panel" role="tabpanel">
|
||||
<div class="debug-actions">
|
||||
<button id="openLogsBtn" type="button">Open Logs Folder</button>
|
||||
<button id="openSidecarLogBtn" type="button">Open API Log</button>
|
||||
</div>
|
||||
<section class="settings-diagnostics" id="diagnosticsSection">
|
||||
<header class="diag-header">
|
||||
<h2>Diagnostics</h2>
|
||||
<div class="diag-toggles">
|
||||
<label><input type="checkbox" id="verboseApiLog"> Verbose Sidecar Log</label>
|
||||
<label><input type="checkbox" id="fetchDebugLog"> Frontend Fetch Debug</label>
|
||||
</div>
|
||||
</header>
|
||||
<div class="diag-traffic-bar">
|
||||
<h3>API Traffic <span id="trafficCount"></span></h3>
|
||||
<div class="diag-traffic-controls">
|
||||
<label><input type="checkbox" id="autoRefreshLog" checked> Auto</label>
|
||||
<button id="refreshLogBtn" type="button">Refresh</button>
|
||||
<button id="clearLogBtn" type="button">Clear</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="trafficLog" class="diag-traffic-log"></div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="settings-footer">
|
||||
<button id="cancelBtn" type="button" class="settings-btn settings-btn-secondary">Cancel</button>
|
||||
<button id="okBtn" type="button" class="settings-btn settings-btn-primary">OK</button>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script type="module" src="/src/settings-main.ts"></script>
|
||||
|
||||
Reference in New Issue
Block a user