Skip to content

fix(ui): make the connectivity issues overlay closable - #354

Open
frdm666 wants to merge 1 commit into
visortelle:mainfrom
frdm666:fix/353-closable-connectivity-popup
Open

frdm666 wants to merge 1 commit into
visortelle:mainfrom
frdm666:fix/353-closable-connectivity-popup

Conversation

@frdm666

@frdm666 frdm666 commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Problem

When Dekaf can't reach the Pulsar broker, it shows a full-screen "There are
connectivity issues" overlay that cannot be dismissed — no close button, no Esc,
no click-outside.

That is especially painful when the cluster requires authentication and
DEKAF_DEFAULT_PULSAR_AUTH is not set: the health check fails, the overlay
appears, and it covers the credentials button — the very control needed to fix
the connection. As reported in #352, the only workaround was to delete the
overlay via browser devtools.

What changed

  • The overlay now reuses ModalElement from Modals.tsx — same backdrop, card,
    title bar with the close icon, and Esc handling as every other dialog. The
    component was already presentational; it just wasn't exported.
  • The overlay is shown again when the connection drops after having been
    restored, so a new outage is still reported.
  • Added a hint about setting Pulsar credentials via the 🔑 button in the
    navigation sidebar, so the dialog says what to do.
  • ModalStackEntry gained an optional testId (defaults to "modal") so the
    overlay keeps the health-overlay test id introduced in e2e test suite + bunch of bugfixes #351.

The credentials editor can't be opened from the overlay directly, because
HealthCheckContext sits above Modals.DefaultProvider in the tree — hence the
textual hint.

Test plan

Added NAV-11 to e2e/src/test/scala/routes/HealthCheckSpec.scala: it aborts the
health check poll, waits for the overlay, dismisses it with Esc, then waits longer
than the 5s poll interval to assert it does not come back while connectivity is
still down, and that the credentials button is reachable again.

Both NAV-10 (existing) and NAV-11 pass; NAV-11 fails without this change.

Fixes #353

@frdm666
frdm666 requested a review from visortelle as a code owner August 1, 2026 14:57
@visortelle

Copy link
Copy Markdown
Owner

@frdm666 thank you for the contribution.

We could reuse the same modal dialog component, which is used for other similar overlays. Or at least same cross icon, instead of the custom "Close" button.
It would be more consistent.

Screenshot 2026-08-01 at 6 10 09 PM

@frdm666
frdm666 force-pushed the fix/353-closable-connectivity-popup branch from 2cbd55c to a33d1ed Compare August 1, 2026 19:12
@frdm666

frdm666 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Good point -done. ModalElement in Modals.tsx was already the presentational
half of the dialog (backdrop, card, title bar with the close icon, Esc handling),
it just wasn't exported. It's now exported and reused here, so the overlay looks
and behaves like every other dialog. The custom "Close" button and the manual Esc
handler are gone.

One small addition: ModalStackEntry got an optional testId (defaults to
"modal"), so the overlay keeps the health-overlay test id introduced in #351.
Wrapping the modal in a tagged <div> doesn't work -the wrapper collapses to
zero height, and NAV-10 starts failing on "hidden".

Also rebased onto main to resolve the conflict with #351, and moved the test into
HealthCheckSpec as NAV-11 (dismiss while connectivity is still down).
Both NAV-10 and NAV-11 pass; NAV-11 fails without the fix.

The overlay covered the whole viewport and had no way to dismiss it, so
when Dekaf couldn't reach the Pulsar broker the UI became unusable. In
particular it blocked the credentials button, which made it impossible
to authenticate from the UI when DEKAF_DEFAULT_PULSAR_AUTH is not set -
the only workaround was to remove the overlay via browser devtools.

- Add a Close button (and Esc) to dismiss the overlay.
- Show the overlay again when the connection drops after being restored.
- Mention how to set Pulsar credentials in the overlay.
- Drop a leftover console.log.

Fixes visortelle#353
@frdm666
frdm666 force-pushed the fix/353-closable-connectivity-popup branch from a33d1ed to a815fdb Compare August 6, 2026 12:00
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.

Unable to set user auth credentials due to blocking popup

2 participants