@@ -761,15 +761,16 @@ function Dashboard() {
761761 )
762762 }
763763
764- { /* Performance Tab - Fixed at bottom (controlled by settings) */ }
765- { showPerfOverlay && (
766- < div className = "fixed bottom-0 left-0 right-0 z-30" >
767- < div className = "w-full py-2 px-4 bg-data-textbox-bg/95 backdrop-blur text-gray-300 text-xs border-t border-white/10" >
768- < div className = "flex justify-between items-center max-w-6xl mx-auto flex-wrap gap-1" >
764+ { /* Bottom bar: Build version + Force update, and perf stats when overlay enabled */ }
765+ < div className = "fixed bottom-0 left-0 right-0 z-30 py-1.5 px-4 bg-data-textbox-bg/95 backdrop-blur text-gray-400 text-xs border-t border-white/10" >
766+ < div className = "flex justify-between items-center max-w-6xl mx-auto flex-wrap gap-2" >
767+ < span title = "Git commit this build is based on" >
768+ Build: < code className = "font-mono text-gray-300" > { typeof __GIT_COMMIT__ !== "undefined" ? __GIT_COMMIT__ : "—" } </ code >
769+ </ span >
770+ { showPerfOverlay && (
771+ < div className = "flex flex-wrap gap-2" >
769772 < span > FPS: { performanceStats . fps } </ span >
770- < span className = "hidden sm:inline" >
771- CAN: { dataStoreStats . totalMessages > 0 ? "Live" : "0" }
772- </ span >
773+ < span className = "hidden sm:inline" > CAN: { dataStoreStats . totalMessages > 0 ? "Live" : "0" } </ span >
773774 < span className = "hidden md:inline" >
774775 Mem: { performanceStats . memoryUsage }
775776 { typeof performanceStats . memoryUsage === "number" ? "MB" : "" }
@@ -779,9 +780,25 @@ function Dashboard() {
779780 </ span >
780781 < span className = "hidden lg:inline" > Store Mem: { dataStoreStats . memoryEstimateMB } MB</ span >
781782 </ div >
782- </ div >
783+ ) }
784+ < button
785+ type = "button"
786+ onClick = { async ( ) => {
787+ if ( ! confirm ( "Clear PWA cache and reload to get the latest version?" ) ) return ;
788+ try {
789+ const regs = await navigator . serviceWorker ?. getRegistrations ?.( ) ?? [ ] ;
790+ for ( const reg of regs ) await reg . unregister ( ) ;
791+ const names = await caches ?. keys ?.( ) ?? [ ] ;
792+ for ( const name of names ) await caches . delete ( name ) ;
793+ } catch ( _ ) { /* ignore */ }
794+ window . location . reload ( ) ;
795+ } }
796+ className = "text-gray-400 hover:text-white underline cursor-pointer shrink-0"
797+ >
798+ Force update
799+ </ button >
783800 </ div >
784- ) }
801+ </ div >
785802 </ div >
786803 ) ;
787804}
0 commit comments