Skip to content

Verification to dashboard - #6516

Merged
RobertJoonas merged 52 commits into
masterfrom
verification-to-dashboard
Aug 4, 2026
Merged

Verification to dashboard#6516
RobertJoonas merged 52 commits into
masterfrom
verification-to-dashboard

Conversation

@RobertJoonas

@RobertJoonas RobertJoonas commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Changes

Move verification (all flows: provisioning, review, and domain_change) to the dashboard (between the top bar and sources/pages reports). It will remain a LiveView, but will be teleported into the stats-react-container with the help of <.portal>. Various UI changes in this PR to make the UI feel more "banner-like".

For reviewers: For UI testing, I encourage playing around with it locally -- this PR builds a dev convenience for mocking different verification outcomes. The same code is also used for E2E testing.

In addition to verification, we'll also move the email reports CTA from stats.html.heex to React. The reason for that is positioning -- otherwise impossible to render it between top bar and stats reports.

New db field and onboarding logic

This PR also includes a migration, adding a new site.onboarding_status field which makes all of this possible. There are currently four different statuses possible:

  • :new_site
    • The site was just created, didn't succeed verification, didn't receive any pageviews yet
    • Means that a "Setup required" pill should be rendered on this site card on the /sites page
    • Any links to this dashboard (such as the one in site-switcher.js) should append ?verify_installation=true&flow=provisioning to the URL to initiate a verification banner upon entering the dashboard.
  • :verification_completed
    • Advances to this state once a verification success is encountered (no matter through what flow -- provisioning / review / domain_change)
    • Means that "Setup required" won't ever render for this site again, and verification banner won't be triggered automatically for this site anymore. The only way to get verification again is Site Settings > Review Installation
  • :first_pageview
    • The site has received at least one pageview
    • Advances to this state when:
      • a full dashboard load happens and the site has pageviews (piggybacking on the same condition where site.stats_start_date is set for the very first time)
      • the site card on the /sites page is about to display "X visitors in the last 24h" (where X > 0) for the very first time
      • (note that either of the above can happen before verification success is encountered, in which case that step is simply skipped. This is also exactly what happens on CE)
    • Similar to :verification_completed, we won't automatically trigger verification anymore
    • In this state, the email reports CTA starts appearing to any site member with editor permissions (owner, admin, editor)
  • :completed
    • Everything related to onboarding is done
    • This is the database default for the onboarding_status field -- running the migration will set the new field value to :completed for every existing site.
    • As for new sites (after this PR gets deployed), the only way to get to this state will be to dismiss or action (click the /:domain/settings/email-reports link) the email reports CTA banner.

Migration

  • Extract the migration and execute it

Tests

  • Automated tests have been added

Changelog

  • Need to update and review the flows on CE

Documentation

  • Docs have been updated

Dark mode

  • The UI has been tested both in dark and light mode

Comment thread lib/plausible_web/live/sites.ex
@RobertJoonas
RobertJoonas marked this pull request as draft July 23, 2026 11:32
@RobertJoonas
RobertJoonas force-pushed the verification-to-dashboard branch from 01949f3 to 511af2c Compare July 27, 2026 06:52
RobertJoonas and others added 26 commits July 29, 2026 12:02
* Refine verification banner UI and copy

- Simplify failure CTAs: keep "Check again" as primary, add ghost
  "Review installation" (or "Try another URL" when a custom URL retry
  is offered); remove installation-guide, change-method, and view-snippet
  expandable logic
- Render inline "verify your installation manually" / "review your
  installation" links inside recommendation text (offer_custom_url_input
  scenarios) via safe HTML helpers, avoiding HEEx whitespace pitfalls
- Tighten diagnostics title and body copy
- Move the "Setup pending" pill in the sites list to replace the
  percentage indicator; use the generic pill component
- Extend the notice component with title_class override and a spinner
  slot; swap success icon to solid check-circle

* improve templating logic

---------

Co-authored-by: Robert Joonas <robertjoonas16@gmail.com>
@RobertJoonas
RobertJoonas force-pushed the verification-to-dashboard branch from 45547c4 to 3fd5593 Compare July 29, 2026 11:03
@RobertJoonas
RobertJoonas marked this pull request as ready for review July 29, 2026 12:32

@ukutaht ukutaht left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a lot to review so I don't feel like I could pay full attention to everything. Overall looks all good to me.

In general it doesn't feel great to me to have liveview running alongside React like this on the dashboard long-term but I also understand why it was done this way.

Comment thread lib/plausible/application.ex Outdated
const { queryParams } = (event as CustomEvent<VerificationFinishedDetail>)
.detail

navigate({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I'm thinking using replace: true here would be more fitting so the path with URL params does not stay in the browser history.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Did that in 90342eb.

There's still one quirk where if you navigate in React (e.g. change period/filters) then the verification params will stay in those history entries. So for example:

  1. verification banner is visible (either loading or failed) and the params are in the URL
  2. open the page filter modal, then close it
  3. close the verification banner (params are stripped from the URL)
  4. hit back in browser history (page filter modal appears)
  5. Quirk: the verification params re-appear in the URL as well, refreshing the page now will bring verification back

In practice though, I think it's very unlikely to hurt the UX because:

  • although some clicking-around on the dashboard to discover what it can do is expected, going back in browser history when there's nothing meaningful happening on the dashboard yet is probably rare.
  • even though the query params might re-appear, the verification will only come back if 1) it didn't succeed before, and 2) the dashboard doesn't have any pageviews yet.
  • the worst case scenario is: user has to dismiss the banner for a second time.

apata and others added 3 commits August 4, 2026 10:44
Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
…t time) (#6571)

* Revert "Use Blacksmith checkout with sticky-disk git mirror in Elixir CI (#6564)"

This reverts commit fd528f2.

* Fix inert service container health checks in Elixir CI

The postgres and clickhouse health-check options were nested under env,
so Docker never received a health check and jobs could start before
ClickHouse was listening, failing ecto.create with
Mint.TransportError{reason: :closed}. Move options to the service level
and point the ClickHouse check at the real HTTP port (8123 /ping)
instead of the unused 8124.

Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>

* Give ClickHouse a 2m health-check start period

ClickHouse on these runners can take over 50s to start listening
during load spikes (the same slowness behind the Aug 3+ ecto.create
failures). Without a start period the health check flips to unhealthy
after ~50s and the runner kills the job before the server is ready;
probe failures during the start period no longer count toward
--health-retries.

Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>

* Probe ClickHouse health check via 127.0.0.1, not localhost

The server fails to bind [::] in these containers (IPv6 disabled) and
falls back to 0.0.0.0 only, while busybox wget resolves localhost to
::1 and does not retry the next address, so the probe got connection
refused forever and every service init failed. Reproduced against
clickhouse/clickhouse-server:25.11.5.8-alpine: localhost fails,
127.0.0.1 succeeds and the container reports healthy within seconds.

Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>

---------

Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
@RobertJoonas
RobertJoonas force-pushed the verification-to-dashboard branch from 350345a to acab7c3 Compare August 4, 2026 09:45
RobertJoonas and others added 4 commits August 4, 2026 12:35
Adjust the global btn-base styling to make the button appear "disabled",
when phx-click-loading is set on it.
@RobertJoonas
RobertJoonas added this pull request to the merge queue Aug 4, 2026
Merged via the queue into master with commit b8484ea Aug 4, 2026
23 checks passed
@RobertJoonas
RobertJoonas deleted the verification-to-dashboard branch August 4, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants