feat: click-outside dismiss and clean overlay styling

- Add invisible backdrop (z-index 99) behind expanded overlay to
  dismiss on outside click
- Remove background/padding from overlay wrapper so GroupCard
  renders without visible extra border
- Use drop-shadow filter instead of box-shadow for natural card
  shadow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-16 14:04:26 +02:00
parent 911ba591a9
commit b57fe875f3
2 changed files with 12 additions and 5 deletions

View File

@@ -341,10 +341,14 @@
top: 0; top: 0;
left: 0; left: 0;
min-width: 500px; min-width: 500px;
background: var(--bg-body); filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.3));
border-radius: var(--radius-md); }
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
padding: 4px; /* Click-outside backdrop for expanded overlay */
.overlayBackdrop {
position: fixed;
inset: 0;
z-index: 99;
} }
/* Expand/collapse animation wrapper */ /* Expand/collapse animation wrapper */

View File

@@ -722,6 +722,8 @@ export default function AgentHealth() {
onNavigate={() => navigate(`/runtime/${group.appId}`)} onNavigate={() => navigate(`/runtime/${group.appId}`)}
/> />
{expandedApps.has(group.appId) && ( {expandedApps.has(group.appId) && (
<>
<div className={styles.overlayBackdrop} onClick={() => animateToggle(group.appId)} />
<div <div
ref={(el) => { ref={(el) => {
if (!el) return; if (!el) return;
@@ -758,7 +760,7 @@ export default function AgentHealth() {
/> />
<button <button
className={styles.collapseBtn} className={styles.collapseBtn}
onClick={() => animateToggle(group.appId)} onClick={(e) => { e.stopPropagation(); animateToggle(group.appId); }}
title="Collapse" title="Collapse"
> >
<ChevronDown size={14} /> <ChevronDown size={14} />
@@ -805,6 +807,7 @@ export default function AgentHealth() {
/> />
</GroupCard> </GroupCard>
</div> </div>
</>
)} )}
</div> </div>
))} ))}