mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-17 00:20:51 +00:00
fix: keep the recent runs popover from overflowing (#12204)
* fix: keep the recent runs popover from overflowing Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: keep recent run rows still on hover and unclip the resolve button Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
fa83659b48
commit
7850bd213d
@@ -112,23 +112,27 @@
|
||||
|
||||
<span class="flex flex-col min-w-0 flex-1">
|
||||
<span
|
||||
class="truncate text-[12.5px] {failing
|
||||
class="flex min-w-0 text-[12.5px] {failing
|
||||
? 'font-semibold text-emphasis'
|
||||
: 'font-medium text-primary'}"
|
||||
>
|
||||
{#if prefix}<span class="text-hint font-normal">{prefix} / </span>{/if}{title}
|
||||
<!-- Capped so a long folder name cannot push the title it disambiguates out of view. -->
|
||||
{#if prefix}
|
||||
<span class="shrink-0 max-w-[45%] truncate text-hint font-normal">{prefix}</span>
|
||||
<span class="shrink-0 whitespace-pre text-hint font-normal">{' / '}</span>
|
||||
{/if}
|
||||
<span class="min-w-0 truncate">{title}</span>
|
||||
</span>
|
||||
<span class="flex items-center gap-1.5 min-w-0 text-[10.5px] text-hint">
|
||||
<span class="truncate">{item.path}</span>
|
||||
<!-- A fixed height: the hover actions are taller than the text, and must not move the row. -->
|
||||
<span class="flex items-center gap-1.5 h-4 min-w-0 overflow-x-clip text-[10.5px] text-hint">
|
||||
<!-- Gives way first: the hover actions shrink only once the path is gone. -->
|
||||
<span class="truncate shrink-[1000]">{item.path}</span>
|
||||
<!-- The header counts failed runs, not failing items: this per-item count shows where its
|
||||
number comes from. -->
|
||||
{#if item.failed_runs > 0}
|
||||
<span class="shrink-0 text-red-600 dark:text-red-400">{item.failed_runs} failed</span>
|
||||
{#if onResolve && $roleCaps.code}
|
||||
<!-- Negative margins keep the button's height from growing the row on hover. -->
|
||||
<span
|
||||
class="hidden group-hover:inline-flex group-focus-within:inline-flex shrink-0 -my-[3px]"
|
||||
>
|
||||
<span class="hidden group-hover:inline-flex group-focus-within:inline-flex shrink-0">
|
||||
<Button
|
||||
variant="subtle"
|
||||
unifiedSize="2xs"
|
||||
@@ -152,7 +156,7 @@
|
||||
{/if}
|
||||
{#if failing && canAskAI() && latest}
|
||||
<button
|
||||
class="hidden group-hover:inline group-focus-within:inline shrink-0 font-medium text-ai hover:underline"
|
||||
class="hidden group-hover:inline group-focus-within:inline min-w-0 truncate font-medium text-ai hover:underline"
|
||||
onclick={(e) => {
|
||||
e.stopPropagation()
|
||||
askAI({ kind: 'run', path: item.path, jobId: latest.id }, 'Why did this run fail?')
|
||||
|
||||
@@ -91,13 +91,16 @@
|
||||
{/if}
|
||||
{/snippet}
|
||||
{#snippet content()}
|
||||
<div class="w-[380px] p-1.5 text-xs">
|
||||
<div class="w-[380px] max-w-[calc(100vw-32px)] p-1.5 text-xs">
|
||||
{#if data}
|
||||
<div class="flex items-center gap-2 px-2.5 pt-2 pb-1.5 text-secondary">
|
||||
<!-- Wraps between its parts, never inside one: large counts move Ask AI to its own line. -->
|
||||
<div
|
||||
class="flex flex-wrap items-center gap-x-2 gap-y-1 px-2.5 pt-2 pb-1.5 text-secondary whitespace-nowrap"
|
||||
>
|
||||
<b class="font-semibold text-emphasis text-[12.5px]">
|
||||
{windowLabel(data.window_hours)}
|
||||
</b>
|
||||
<span>
|
||||
<span class="min-w-0 truncate">
|
||||
{totalLabel(data)} ·
|
||||
<span class={data.failed_runs > 0 ? 'text-red-600 dark:text-red-400' : ''}>
|
||||
{data.failed_runs} failed
|
||||
@@ -105,7 +108,7 @@
|
||||
</span>
|
||||
{#if canAskAI() && failing.length > 0}
|
||||
<button
|
||||
class="ml-auto h-[26px] px-2.5 rounded text-xs font-medium text-ai bg-ai/10 hover:bg-ai/15"
|
||||
class="ml-auto h-[26px] max-w-full truncate px-2.5 rounded text-xs font-medium text-ai bg-ai/10 hover:bg-ai/15"
|
||||
onclick={() =>
|
||||
askAI(
|
||||
{ kind: 'failing', items: failing },
|
||||
@@ -155,7 +158,7 @@
|
||||
{/if}
|
||||
|
||||
<div
|
||||
class="flex items-center gap-1 px-1.5 pb-1 whitespace-nowrap {data
|
||||
class="flex flex-wrap items-center gap-1 px-1.5 pb-1 whitespace-nowrap {data
|
||||
? 'mt-1.5 pt-2 border-t border-border-light'
|
||||
: 'pt-1'}"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user