Skip to content

Dashboard: hover-gate actions, stop the relay on every QR dismissal path - #4

Open
AadhilFarhan wants to merge 1 commit into
mainfrom
fix/dashboard-hover-and-relay-leak
Open

Dashboard: hover-gate actions, stop the relay on every QR dismissal path#4
AadhilFarhan wants to merge 1 commit into
mainfrom
fix/dashboard-hover-and-relay-leak

Conversation

@AadhilFarhan

Copy link
Copy Markdown
Owner

What

Two related bugs in the Dashboard's row UI:

  1. Missing hover gate. DashboardRow's four action buttons (open, copy, QR, kill) rendered unconditionally whenever the row wasn't mid-kill — unlike ServerRow, which only shows them on hover. This contradicts the project's stated "hover-revealed actions" convention (checked CLAUDE.md: it documents ServerRow as hover-revealed and says nothing about DashboardRow needing to differ). Now gated on hovering, same as ServerRow — the port badge stays always-visible either way.

  2. Relay leak on dismissal. QRPanel's "Done" button was the only path that called model.stopSharing. Dismissing any other way — clicking away from DashboardRow's system .popover, or re-tapping the QR icon in ServerRow to collapse the inline panel — skips the Done button entirely, so a relayed share keeps running with nothing but the small "sharing" badge as a trace. Fixed once, in QRPanel itself (not per call site), by moving the stop-sharing call into .onDisappear, which fires regardless of how the view goes away. Removed the now-redundant explicit call from the Done button.

(2) also fixes the equivalent latent bug in ServerRow's inline QR panel, not just the Dashboard's popover — same root cause, same fix.

Test plan

  • Build succeeds, app launches and stays alive (sanity-launched, checked for crash log).
  • Full suite: 9/9 passing (unaffected by this change, run as a hygiene check).
  • Not covered by an automated test: the actual popover-dismiss/hover behavior, since it requires driving the live UI. Worth a manual click-through before merging: open the dashboard, share a loopback server via QR, click away from the popover instead of pressing Done, confirm the "sharing" badge clears.

DashboardRow's action buttons rendered unconditionally whenever a row
wasn't mid-kill, unlike ServerRow's hover-gated equivalent — inconsistent
with the project's stated hover-revealed-actions convention. Now gated
on hovering, same as ServerRow.

QRPanel's Done button was the only path that stopped a relayed share;
dismissing the popover by clicking away (DashboardRow) or re-tapping the
QR icon to collapse it (ServerRow) both skip that button entirely, so
the relay kept running with only the small "sharing" badge as any
trace. Moved the stop-sharing call into onDisappear, which fires on
every dismissal path regardless of how it happened, and removed the
now-redundant explicit call from the Done button.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant