@@ -321,6 +321,14 @@ <h3 class="mb-3 text-sm font-medium text-gray-300">Live Activity</h3>
321321 < div data-testid ="ccr-net-tokens " class ="mt-1 text-xl font-light tabular-nums " :class ="ccrNetTokensSaved >= 0 ? 'text-emerald-400' : 'text-red-400' " x-text ="(ccrNetTokensSaved >= 0 ? '+' : '-') + formatNumber(Math.abs(ccrNetTokensSaved)) "> </ div >
322322 < div class ="mt-1 text-[11px] text-gray-600 "> savings minus retrieval drawback</ div >
323323 </ div >
324+ <!-- Retrievals recorded by prior proxy processes (durable ledger; survives restart) -->
325+ < template x-if ="lifetimeRetrievals > 0 ">
326+ < div class ="rounded-lg border border-emerald-500/20 bg-emerald-500/5 p-3 mt-2 ">
327+ < div class ="text-xs text-gray-500 uppercase tracking-wide mb-1 "> Retrievals (lifetime)</ div >
328+ < div class ="text-2xl font-light tabular-nums text-emerald-400 " x-text ="formatNumber(lifetimeRetrievals) "> </ div >
329+ < div class ="text-xs " :class ="lifetimeNetTokensSaved >= 0 ? 'text-emerald-400/70' : 'text-red-400/80' " x-text ="formatNumber(lifetimeTokensRetrieved) + ' retrieved-back \u00b7 net ' + (lifetimeNetTokensSaved >= 0 ? '+' : '') + formatNumber(lifetimeNetTokensSaved) "> </ div >
330+ </ div >
331+ </ template >
324332 < template x-if ="stats.feedback_loop?.high_retrieval_tools?.length ">
325333 < div class ="mt-2 pt-2 border-t border-border ">
326334 < div class ="text-[11px] text-gray-600 mb-1 "> High-Retrieval Tools</ div >
@@ -2610,8 +2618,21 @@ <h3 class="mb-3 text-sm font-medium text-gray-300">Live Activity</h3>
26102618 return c . net_tokens_saved ?? ( ( c . total_tokens_removed || 0 ) - ( c . tokens_retrieved || 0 ) ) ;
26112619 } ,
26122620
2621+ get lifetimeRetrievals ( ) {
2622+ return this . stats . persistent_savings ?. lifetime ?. retrievals || 0 ;
2623+ } ,
2624+
2625+ get lifetimeTokensRetrieved ( ) {
2626+ return this . stats . persistent_savings ?. lifetime ?. tokens_retrieved || 0 ;
2627+ } ,
2628+
2629+ get lifetimeNetTokensSaved ( ) {
2630+ return this . stats . persistent_savings ?. lifetime ?. net_tokens_saved || 0 ;
2631+ } ,
2632+
26132633 get hasCcrRetrievals ( ) {
2614- return ( this . stats . summary ?. compression ?. retrievals_total || 0 ) > 0 ;
2634+ return ( this . stats . summary ?. compression ?. retrievals_total || 0 ) > 0
2635+ || this . lifetimeRetrievals > 0 ;
26152636 } ,
26162637
26172638 // --- Cache miss attribution (#1313) ---
0 commit comments