Hoist whitespace-normal to DiscoveryTab wrapper

Follow-up to the previous Discovery banner fix. Move the
`whitespace-normal` class from the per-banner text wrapper up to the
DiscoveryTab's outer container, so that any text inside the tab — the
banner copy, the per-command descriptions in the "Commands that will
run" disclosure, and any future explanatory copy — wraps without
needing a per-element override. The fix sits at the boundary where the
inherited `.table-fixed td/th` rule (white-space: nowrap) reaches the
expanded-row content.
This commit is contained in:
rcourtman
2026-05-09 21:22:17 +01:00
parent d433daab6c
commit d31c8ea9bd
@@ -98,8 +98,11 @@ export const DiscoveryTab: Component<DiscoveryTabProps> = (props) => {
const commandSettingsTarget = getDiscoveryCommandSettingsTarget();
const apiAccessSettingsTarget = getDiscoveryApiAccessSettingsTarget();
// `whitespace-normal` on the wrapper neutralises the `.table-fixed td/th`
// global rule (white-space: nowrap) that bleeds into expanded-row content
// via CSS inheritance, so explanatory copy and command descriptions wrap.
return (
<div class="space-y-4">
<div class="space-y-4 whitespace-normal">
{/* Analysis provider badge - shown when a provider is configured */}
<Show when={!discoveryInfo.loading && discoveryInfo()?.ai_provider}>
<div class="flex items-center gap-2">
@@ -154,7 +157,7 @@ export const DiscoveryTab: Component<DiscoveryTabProps> = (props) => {
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
<div class="whitespace-normal text-xs text-amber-800 dark:text-amber-200">
<div class="text-xs text-amber-800 dark:text-amber-200">
<p class="font-medium mb-1">What Discovery Does</p>
<p class="text-amber-700 dark:text-amber-300">
{DISCOVERY_ANALYSIS_EXPLANATION}