The mail preview threw `Route [filament.{panel-id}.mails.preview] not
defined` because the 4.x branch still required consumers to wire up
`Mails::routes()` in their own PanelProvider. Register them from
`MailsPlugin::register()` instead, which runs while the panel is being
configured — before Filament reads `$panel->getRoutes()` when loading
its route file.
Registering them from `boot()` would be too late: `Plugin::boot()` runs
from the `SetUpPanel` middleware, after routing has already matched, so
the routes would never resolve and would fall outside the
`filament.{panel-id}.` name group.
Refs backstagephp/mails#77
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>