Skip to content

Verification to dashboard - #6516

Open
RobertJoonas wants to merge 38 commits into
masterfrom
verification-to-dashboard
Open

Verification to dashboard#6516
RobertJoonas wants to merge 38 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
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.

3 participants