diff --git a/web/components/ChatHistory.tsx b/web/components/ChatHistory.tsx index e51ce91..b6e145f 100644 --- a/web/components/ChatHistory.tsx +++ b/web/components/ChatHistory.tsx @@ -732,10 +732,9 @@ const ActivityItem: React.FC<{ className="text-zinc-500 hover:text-zinc-300 transition-colors p-1 hover:bg-white/10 rounded" title="Download" + aria-label="Download generated artifact" - aria-label="Download Generated Artifact" - > @@ -751,10 +750,9 @@ const ActivityItem: React.FC<{ className="text-zinc-500 hover:text-zinc-300 transition-colors p-1 hover:bg-white/10 rounded" title="Open in new window" + aria-label="Open generated artifact in new window" - aria-label="Open Generated Artifact in new window" - > diff --git a/web/hooks/useSessionList.ts b/web/hooks/useSessionList.ts index 29a2c0c..b9759ab 100644 --- a/web/hooks/useSessionList.ts +++ b/web/hooks/useSessionList.ts @@ -14,9 +14,12 @@ export function useSessionList(service: GeminiService | null) { setSessions(allSessions); // Calculate sessions in last 24 hours - const twentyFourHoursAgoIso = new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString(); - // ⚡ Bolt: Direct lexical comparison of ISO 8601 strings avoids allocating Date objects for each session - const usedCount = allSessions.filter(s => s.createTime > twentyFourHoursAgoIso).length; + const twentyFourHoursAgo = new Date(Date.now() - 24 * 60 * 60 * 1000); + // ⚡ Bolt: Direct lexical comparison of ISO 8601 strings is much faster than allocating Date objects in loops + const twentyFourHoursAgoIso = twentyFourHoursAgo.toISOString(); + const usedCount = allSessions.filter(s => { + return s.createTime > twentyFourHoursAgoIso; + }).length; setSessionsUsed(usedCount); } catch (e) {