Skip to content

Commit b9ebc6c

Browse files
chriscrosstalkclaude
authored andcommitted
fix(EasySetup): Remove built-in System Benchmark from wizard
System Benchmark is a built-in feature that doesn't require installation, so it shouldn't appear in the Easy Setup Wizard where users select things to install. Users can access the benchmark through Settings > Benchmark. - Removed benchmark entry from ADDITIONAL_TOOLS array - Removed unused isBuiltInCapability helper and related dead code - Simplified renderCapabilityCard by removing built-in specific styling - Removed unused IconArrowRight import Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent adf76d2 commit b9ebc6c

File tree

1 file changed

+24
-70
lines changed

1 file changed

+24
-70
lines changed

admin/inertia/pages/easy-setup/index.tsx

Lines changed: 24 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import CategoryCard from '~/components/CategoryCard'
1010
import TierSelectionModal from '~/components/TierSelectionModal'
1111
import LoadingSpinner from '~/components/LoadingSpinner'
1212
import Alert from '~/components/Alert'
13-
import { IconCheck, IconChevronDown, IconChevronUp, IconArrowRight } from '@tabler/icons-react'
13+
import { IconCheck, IconChevronDown, IconChevronUp } from '@tabler/icons-react'
1414
import StorageProjectionBar from '~/components/StorageProjectionBar'
1515
import { useNotifications } from '~/context/NotificationContext'
1616
import useInternetStatus from '~/hooks/useInternetStatus'
@@ -98,19 +98,6 @@ const ADDITIONAL_TOOLS: Capability[] = [
9898
services: ['nomad_cyberchef'],
9999
icon: 'IconChefHat',
100100
},
101-
{
102-
id: 'benchmark',
103-
name: 'System Benchmark',
104-
technicalName: 'Built-in',
105-
description: 'Measure your server performance and compare with the NOMAD community',
106-
features: [
107-
'CPU, memory, and disk benchmarks',
108-
'AI inference performance testing',
109-
'NOMAD Score for easy comparison',
110-
],
111-
services: ['__builtin_benchmark'], // Special marker for built-in features
112-
icon: 'IconChartBar',
113-
},
114101
]
115102

116103
type WizardStep = 1 | 2 | 3 | 4
@@ -526,28 +513,20 @@ export default function EasySetupWizard(props: { system: { services: ServiceSlim
526513
)
527514
}
528515

529-
// Check if a capability is a built-in feature (not a Docker service)
530-
const isBuiltInCapability = (capability: Capability) => {
531-
return capability.services.some((service) => service.startsWith('__builtin_'))
532-
}
533-
534516
// Check if a capability is selected (all its services are in selectedServices)
535517
const isCapabilitySelected = (capability: Capability) => {
536-
if (isBuiltInCapability(capability)) return false // Built-ins can't be selected
537518
return capability.services.every((service) => selectedServices.includes(service))
538519
}
539520

540521
// Check if a capability is already installed (all its services are installed)
541522
const isCapabilityInstalled = (capability: Capability) => {
542-
if (isBuiltInCapability(capability)) return true // Built-ins are always "installed"
543523
return capability.services.every((service) =>
544524
installedServices.some((s) => s.service_name === service)
545525
)
546526
}
547527

548528
// Check if a capability exists in the system (has at least one matching service)
549529
const capabilityExists = (capability: Capability) => {
550-
if (isBuiltInCapability(capability)) return true // Built-ins always exist
551530
return capability.services.some((service) =>
552531
allServices.some((s) => s.service_name === service)
553532
)
@@ -575,38 +554,23 @@ export default function EasySetupWizard(props: { system: { services: ServiceSlim
575554
const selected = isCapabilitySelected(capability)
576555
const installed = isCapabilityInstalled(capability)
577556
const exists = capabilityExists(capability)
578-
const isBuiltIn = isBuiltInCapability(capability)
579557

580558
if (!exists) return null
581559

582560
// Determine visual state: installed (locked), selected (user chose it), or default
583561
const isChecked = installed || selected
584562

585-
// Handle click - built-in features navigate to their page, others toggle selection
586-
const handleClick = () => {
587-
if (isBuiltIn) {
588-
// Navigate to the appropriate settings page for built-in features
589-
if (capability.id === 'benchmark') {
590-
router.visit('/settings/benchmark')
591-
}
592-
} else {
593-
toggleCapability(capability)
594-
}
595-
}
596-
597563
return (
598564
<div
599565
key={capability.id}
600-
onClick={handleClick}
566+
onClick={() => toggleCapability(capability)}
601567
className={classNames(
602568
'p-6 rounded-lg border-2 transition-all',
603-
isBuiltIn
604-
? 'border-desert-stone bg-desert-stone-lighter/50 hover:border-desert-green hover:shadow-sm cursor-pointer'
605-
: installed
606-
? 'border-desert-green bg-desert-green/20 cursor-default'
607-
: selected
608-
? 'border-desert-green bg-desert-green shadow-md cursor-pointer'
609-
: 'border-desert-stone-light bg-white hover:border-desert-green hover:shadow-sm cursor-pointer'
569+
installed
570+
? 'border-desert-green bg-desert-green/20 cursor-default'
571+
: selected
572+
? 'border-desert-green bg-desert-green shadow-md cursor-pointer'
573+
: 'border-desert-stone-light bg-white hover:border-desert-green hover:shadow-sm cursor-pointer'
610574
)}
611575
>
612576
<div className="flex items-start justify-between">
@@ -615,16 +579,12 @@ export default function EasySetupWizard(props: { system: { services: ServiceSlim
615579
<h3
616580
className={classNames(
617581
'text-xl font-bold',
618-
isBuiltIn ? 'text-gray-700' : installed ? 'text-gray-700' : selected ? 'text-white' : 'text-gray-900'
582+
installed ? 'text-gray-700' : selected ? 'text-white' : 'text-gray-900'
619583
)}
620584
>
621585
{capability.name}
622586
</h3>
623-
{isBuiltIn ? (
624-
<span className="text-xs bg-desert-stone text-white px-2 py-0.5 rounded-full">
625-
Built-in
626-
</span>
627-
) : installed && (
587+
{installed && (
628588
<span className="text-xs bg-desert-green text-white px-2 py-0.5 rounded-full">
629589
Installed
630590
</span>
@@ -633,15 +593,15 @@ export default function EasySetupWizard(props: { system: { services: ServiceSlim
633593
<p
634594
className={classNames(
635595
'text-sm mt-0.5',
636-
isBuiltIn ? 'text-gray-500' : installed ? 'text-gray-500' : selected ? 'text-green-100' : 'text-gray-500'
596+
installed ? 'text-gray-500' : selected ? 'text-green-100' : 'text-gray-500'
637597
)}
638598
>
639-
{isBuiltIn ? 'Click to open' : `Powered by ${capability.technicalName}`}
599+
Powered by {capability.technicalName}
640600
</p>
641601
<p
642602
className={classNames(
643603
'text-sm mt-3',
644-
isBuiltIn ? 'text-gray-600' : installed ? 'text-gray-600' : selected ? 'text-white' : 'text-gray-600'
604+
installed ? 'text-gray-600' : selected ? 'text-white' : 'text-gray-600'
645605
)}
646606
>
647607
{capability.description}
@@ -650,21 +610,19 @@ export default function EasySetupWizard(props: { system: { services: ServiceSlim
650610
<ul
651611
className={classNames(
652612
'mt-3 space-y-1',
653-
isBuiltIn ? 'text-gray-600' : installed ? 'text-gray-600' : selected ? 'text-white' : 'text-gray-600'
613+
installed ? 'text-gray-600' : selected ? 'text-white' : 'text-gray-600'
654614
)}
655615
>
656616
{capability.features.map((feature, idx) => (
657617
<li key={idx} className="flex items-start text-sm">
658618
<span
659619
className={classNames(
660620
'mr-2',
661-
isBuiltIn
662-
? 'text-desert-stone'
663-
: installed
664-
? 'text-desert-green'
665-
: selected
666-
? 'text-white'
667-
: 'text-desert-green'
621+
installed
622+
? 'text-desert-green'
623+
: selected
624+
? 'text-white'
625+
: 'text-desert-green'
668626
)}
669627
>
670628
@@ -678,18 +636,14 @@ export default function EasySetupWizard(props: { system: { services: ServiceSlim
678636
<div
679637
className={classNames(
680638
'ml-4 w-7 h-7 rounded-full border-2 flex items-center justify-center transition-all flex-shrink-0',
681-
isBuiltIn
682-
? 'border-desert-stone bg-desert-stone'
683-
: isChecked
684-
? installed
685-
? 'border-desert-green bg-desert-green'
686-
: 'border-white bg-white'
687-
: 'border-desert-stone'
639+
isChecked
640+
? installed
641+
? 'border-desert-green bg-desert-green'
642+
: 'border-white bg-white'
643+
: 'border-desert-stone'
688644
)}
689645
>
690-
{isBuiltIn ? (
691-
<IconArrowRight size={16} className="text-white" />
692-
) : isChecked && (
646+
{isChecked && (
693647
<IconCheck size={20} className={installed ? 'text-white' : 'text-desert-green'} />
694648
)}
695649
</div>

0 commit comments

Comments
 (0)