Make discovery actions icon-only utility buttons

The Run discovery and Discovery settings buttons sat at the same
visual prominence as the primary '+ Add infrastructure' CTA, even
though most users run discovery rarely. Three buttons of similar
weight made the toolbar feel busy.

Drop the visible labels; render the two discovery actions as
icon-only ghost buttons. The full description still lives in title
(for hover discovery) and aria-label (for screen readers); the
scanning state still surfaces 'Scanning…' inline so progress is
visible. The primary 'Add infrastructure' CTA now leads the toolbar
without competition.
This commit is contained in:
rcourtman 2026-05-09 14:34:04 +01:00
parent a7375d550c
commit ecc24f76b2
2 changed files with 13 additions and 4 deletions

View file

@ -524,7 +524,13 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP
</button>
</Show>
<div class="ml-auto flex flex-wrap items-center gap-2">
{/* Discovery actions are utility-tier: most users never run them.
Render as icon-only ghost buttons so they don't compete with
the primary '+ Add infrastructure' CTA for visual weight. The
full action description lives in title for hover discovery and
in aria-label for screen readers; the scanning state still
shows a 'Scanning…' label inline so the user gets feedback. */}
<div class="ml-auto flex flex-wrap items-center gap-1">
<Show when={props.onRunDiscovery}>
<button
type="button"
@ -537,7 +543,9 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP
<RotateCw
class={`h-4 w-4 ${props.discoveryScanStatus().scanning ? 'animate-spin' : ''}`}
/>
{props.discoveryScanStatus().scanning ? 'Scanning…' : 'Run discovery'}
<Show when={props.discoveryScanStatus().scanning}>
<span>Scanning</span>
</Show>
</button>
</Show>
@ -550,7 +558,6 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP
title="Configure which networks and ports Pulse scans for platform APIs, and how often."
>
<SlidersHorizontal class="h-4 w-4" />
Discovery settings
</button>
</Show>
</div>

View file

@ -466,8 +466,10 @@ describe('settings architecture guardrails', () => {
expect(infrastructureWorkspaceSource).not.toContain('InfrastructureOperationsController');
expect(infrastructureWorkspaceSource).not.toContain('PlatformConnectionsWorkspace');
expect(infrastructureSourceManagerSource).toContain('Infrastructure systems');
// Discovery actions are now icon-only ghost buttons; the human copy
// still lives in their title and aria-label attributes.
expect(infrastructureSourceManagerSource).toContain('Run discovery');
expect(infrastructureSourceManagerSource).toContain('Discovery settings');
expect(infrastructureSourceManagerSource).toContain('discovery settings');
expect(monitoredSystemImpactPreviewSource).toContain('getMonitoredSystemImpactPreviewTitle');
expect(monitoredSystemImpactPreviewSource).toContain(
'formatMonitoredSystemImpactPreviewSummary',