Skip to content

The agent that grows with you

fix(desktop): catalog counts use compactNumber and a Codicon star

Brooklyn Nicholsonc756986db209
diff --git a/apps/desktop/src/app/capabilities/catalog/catalog-browser.tsx b/apps/desktop/src/app/capabilities/catalog/catalog-browser.tsx
index 3845a996d22..fd5124c3bae 100644
--- a/apps/desktop/src/app/capabilities/catalog/catalog-browser.tsx
+++ b/apps/desktop/src/app/capabilities/catalog/catalog-browser.tsx
@@ -1,4 +1,4 @@
-import { groupCatalogPlugins, PLUGIN_CATEGORIES } from '@hermes/shared'
+import { compactNumber, groupCatalogPlugins, PLUGIN_CATEGORIES } from '@hermes/shared'
import { useStore } from '@nanostores/react'
import { memo, type ReactNode, useDeferredValue, useEffect, useRef, useState } from 'react'
@@ -377,7 +377,7 @@ export const CatalogBrowser = memo(function CatalogBrowser({
{section.label}
</Button>
<span className="text-xs font-normal text-(--ui-text-tertiary)">
- {section.entries.length.toLocaleString()}
+ {compactNumber(section.entries.length)}
</span>
</h3>
<Button onClick={() => filters.chooseCategory(section.key)} size="inline" variant="text">
diff --git a/apps/desktop/src/app/capabilities/catalog/catalog-card.tsx b/apps/desktop/src/app/capabilities/catalog/catalog-card.tsx
index a551b15b027..2450d9d15ae 100644
--- a/apps/desktop/src/app/capabilities/catalog/catalog-card.tsx
+++ b/apps/desktop/src/app/capabilities/catalog/catalog-card.tsx
@@ -88,7 +88,7 @@ export function CatalogCard({ entry, action, accentIndex, onOpen, onCategory, on
<RowButton
aria-haspopup="dialog"
aria-label={entry.name}
- className="min-w-0 flex-1 cursor-pointer text-left font-semibold leading-snug after:absolute after:inset-0 after:rounded-[inherit] focus-visible:outline-none focus-visible:after:outline-2 focus-visible:after:outline-primary focus-visible:after:-outline-offset-2"
+ className="min-w-0 flex-1 text-left font-semibold leading-snug after:absolute after:inset-0 after:rounded-[inherit] focus-visible:outline-none focus-visible:after:outline-2 focus-visible:after:outline-primary focus-visible:after:-outline-offset-2"
onClick={() => onOpen(entry)}
>
<span className="line-clamp-2 min-w-0 break-words text-lg">{entry.name}</span>
diff --git a/apps/desktop/src/app/capabilities/catalog/catalog-filters.tsx b/apps/desktop/src/app/capabilities/catalog/catalog-filters.tsx
index c94db8607ff..e0df09425ba 100644
--- a/apps/desktop/src/app/capabilities/catalog/catalog-filters.tsx
+++ b/apps/desktop/src/app/capabilities/catalog/catalog-filters.tsx
@@ -1,3 +1,4 @@
+import { compactNumber } from '@hermes/shared'
import type { ReactNode } from 'react'
import { SidebarDateDivider, SidebarSectionMeta } from '@/app/chat/sidebar/chrome'
@@ -44,7 +45,7 @@ function FacetItem({ row, active, onClick }: { row: FacetRow; active: boolean; o
onClick={onClick}
pressed={active}
trailing={
- row.count !== undefined ? <SidebarSectionMeta>{row.count.toLocaleString()}</SidebarSectionMeta> : undefined
+ row.count !== undefined ? <SidebarSectionMeta>{compactNumber(row.count)}</SidebarSectionMeta> : undefined
}
/>
)
@@ -104,7 +105,7 @@ export function CatalogFilters({
return (
<OverlaySidebar className={className}>
<div className="flex h-7 shrink-0 items-center gap-2 pb-1">
- <SidebarPanelLabel meta={resultCount.toLocaleString()}>{c.discover}</SidebarPanelLabel>
+ <SidebarPanelLabel meta={compactNumber(resultCount)}>{c.discover}</SidebarPanelLabel>
{filtered && (
<Button aria-label={c.clearFilters} className="ml-auto" onClick={onClear} size="inline" variant="text">
{t.common.clear}
diff --git a/apps/desktop/src/app/capabilities/catalog/catalog-metadata.tsx b/apps/desktop/src/app/capabilities/catalog/catalog-metadata.tsx
index 3fb93c3465a..9ad270f6a1b 100644
--- a/apps/desktop/src/app/capabilities/catalog/catalog-metadata.tsx
+++ b/apps/desktop/src/app/capabilities/catalog/catalog-metadata.tsx
@@ -1,7 +1,9 @@
+import { compactNumber } from '@hermes/shared'
import { useState } from 'react'
import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button'
+import { Codicon } from '@/components/ui/codicon'
import { Tip } from '@/components/ui/tooltip'
import { useI18n } from '@/i18n'
import { fmtDateTime, relativeTime } from '@/lib/time'
@@ -44,8 +46,8 @@ export function CatalogHeaderMeta({ entry }: { entry: CatalogEntry }) {
)}
{entry.stars !== null && entry.stars > 0 && (
<span className="flex shrink-0 items-center gap-0.5 text-[0.65rem] text-(--ui-text-tertiary)">
- <span aria-hidden>★</span>
- {entry.stars.toLocaleString()}
+ <Codicon name="star-full" size="0.65rem" />
+ {compactNumber(entry.stars)}
</span>
)}
</span>
diff --git a/apps/desktop/src/app/capabilities/plugins/plugins-tab.tsx b/apps/desktop/src/app/capabilities/plugins/plugins-tab.tsx
index 94718a6d794..6a3ea5ebd06 100644
--- a/apps/desktop/src/app/capabilities/plugins/plugins-tab.tsx
+++ b/apps/desktop/src/app/capabilities/plugins/plugins-tab.tsx
@@ -514,12 +514,7 @@ export function PluginActions({ profile }: { profile: ProfileScope }) {
return (
<>
- <Button
- className="underline"
- onClick={() => openPluginInstallRequest({ profile: scope, repo: '' })}
- size="xs"
- variant="text"
- >
+ <Button onClick={() => openPluginInstallRequest({ profile: scope, repo: '' })} size="xs" variant="textStrong">
{d.installModal.installFromGit}
</Button>
<Tip label={d.openFolder}>