Expose HTTP cookie source through the console API

The coredata CookieSource enum and the ingestion path both support an
HTTP source, but the GraphQL CookieSource enum never declared it. The
generated marshaler is a plain map lookup with no fallback, so an HTTP
value missed the map and serialized to an empty string. The console UI
treats that empty string as falsy and rendered no source badge at all,
making HTTP-sourced trackers look sourceless.

Add the HTTP member to the GraphQL enum so the value round-trips, and
fold the duplicated tracker-type and tracker-source badge helpers from
three components into a shared @probo/helpers module, adding an explicit
HTTP label while consolidating.

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-05-29 12:56:36 +02:00
parent 24bece6f86
commit 12f9dfa352
6 changed files with 63 additions and 55 deletions

View File

@@ -32,6 +32,10 @@ enum CookieSource
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.CookieSourcePreExisting"
)
HTTP
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.CookieSourceHTTP"
)
EXTENSION
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.CookieSourceExtension"