@@ -19,6 +19,7 @@ import type {
1919 APIKeyRow ,
2020 OpsOverviewResponse ,
2121 AccountGroup ,
22+ SystemSettings ,
2223} from "../types" ;
2324import { getErrorMessage } from "../utils/error" ;
2425import { formatCompactEmail } from "../lib/utils" ;
@@ -401,36 +402,47 @@ export default function Accounts() {
401402 const { confirm, confirmDialog } = useConfirmDialog ( ) ;
402403
403404 const loadAccounts = useCallback ( async ( ) => {
404- const [ accountsResponse , apiKeysResponse , opsOverview , groupsResponse ] =
405+ const [
406+ accountsResponse ,
407+ apiKeysResponse ,
408+ opsOverview ,
409+ groupsResponse ,
410+ settings ,
411+ ] =
405412 await Promise . all ( [
406413 api . getAccounts ( ) ,
407414 api . getAPIKeys ( ) ,
408415 api . getOpsOverview ( ) . catch ( ( ) : OpsOverviewResponse | null => null ) ,
409416 api . listAccountGroups ( ) . catch ( ( ) => ( { groups : [ ] } ) ) ,
417+ api . getSettings ( ) . catch ( ( ) : SystemSettings | null => null ) ,
410418 ] ) ;
411419 setAllGroups ( groupsResponse . groups ?? [ ] ) ;
412420 return {
413421 accounts : accountsResponse . accounts ?? [ ] ,
414422 apiKeys : apiKeysResponse . keys ?? [ ] ,
415423 opsOverview,
424+ lazyMode : settings ?. lazy_mode ?? false ,
416425 } ;
417426 } , [ ] ) ;
418427
419428 const { data, loading, error, reload, reloadSilently } = useDataLoader < {
420429 accounts : AccountRow [ ] ;
421430 apiKeys : APIKeyRow [ ] ;
422431 opsOverview : OpsOverviewResponse | null ;
432+ lazyMode : boolean ;
423433 } > ( {
424434 initialData : {
425435 accounts : [ ] ,
426436 apiKeys : [ ] ,
427437 opsOverview : null ,
438+ lazyMode : false ,
428439 } ,
429440 load : loadAccounts ,
430441 } ) ;
431442 const accounts = data . accounts ;
432443 const apiKeys = data . apiKeys ;
433444 const opsOverview = data . opsOverview ;
445+ const lazyMode = data . lazyMode ;
434446 const usageReloadAttemptsRef = useRef < Map < number , number > > ( new Map ( ) ) ;
435447
436448 useEffect ( ( ) => {
@@ -2855,8 +2867,29 @@ export default function Accounts() {
28552867 </ TableCell >
28562868 ) }
28572869 { visibleColumns . updatedAt && (
2858- < TableCell className = "text-[14px] text-muted-foreground" >
2859- { formatRelativeTime ( account . updated_at ) }
2870+ < TableCell className = "text-[13px] text-muted-foreground whitespace-nowrap" >
2871+ { lazyMode ? (
2872+ < div className = "space-y-0.5 leading-tight" >
2873+ < div title = { t ( "accounts.recordUpdatedAt" ) } >
2874+ < span className = "mr-1 text-[11px] text-muted-foreground/70" >
2875+ { t ( "accounts.recordUpdatedAtShort" ) }
2876+ </ span >
2877+ { formatRelativeTime ( account . updated_at ) }
2878+ </ div >
2879+ < div title = { t ( "accounts.usageUpdatedAt" ) } >
2880+ < span className = "mr-1 text-[11px] text-muted-foreground/70" >
2881+ { t ( "accounts.usageUpdatedAtShort" ) }
2882+ </ span >
2883+ { account . codex_usage_updated_at
2884+ ? formatRelativeTime (
2885+ account . codex_usage_updated_at ,
2886+ )
2887+ : t ( "accounts.noUsageUpdatedAt" ) }
2888+ </ div >
2889+ </ div >
2890+ ) : (
2891+ formatRelativeTime ( account . updated_at )
2892+ ) }
28602893 </ TableCell >
28612894 ) }
28622895 { visibleColumns . actions && (
0 commit comments