@startuml
title Email Admin Runtime Dispatch Tenant Resolution (Before)

skinparam backgroundColor #FFFFFF
skinparam defaultFontColor #000000
skinparam ArrowColor #000000
skinparam ParticipantBorderColor #000000
skinparam ParticipantBackgroundColor #FFE8CC
skinparam NoteBackgroundColor #FFF4D6
skinparam NoteBorderColor #000000

actor "Tenant Client" as Client
participant "dispatch_auth_request" as Dispatch
participant "TenantRuntimeRegistry" as Registry
participant "Tenant Auth Runtime" as Runtime

Client -> Dispatch: /admin/email* request\nwith tenant-related headers
Dispatch -> Registry: resolve_tenant_from_headers(...)
Registry --> Dispatch: tenant id or error
Dispatch -> Runtime: dispatch_auth_axum_request(...)

note right of Dispatch
Dispatch behavior existed, but integration coverage\nfor header fallback + invalid/unknown tenant paths\nwas limited.
end note

@enduml
