Files
probo/pkg
Émile Ré e21388fa0c Stop bumping cookie banner version on no-op updates
A central snapshot-equality guard in ensureDraftVersion now returns
the latest version unchanged when the candidate snapshot matches it,
so no-op admin saves no longer force visitors to re-consent. Per-
operation short-circuits in UpdateCookieBanner, UpdateCookieCategory,
UpdateCookiePattern, DeleteCookiePattern, MoveCookiePatternToCategory,
ReorderCookieCategory, and UpsertCookieBannerTranslation skip the row
update and version bump when nothing visitor-facing changes (excluded
patterns, identical values, identical translation JSON).

Rank is now treated as admin-only metadata: buildSnapshot sorts
categories by (Kind weight, ID byte order) instead of relying on the
implicit rank-driven slice order, and ReorderCookieCategory no longer
calls ensureDraftVersionForBanner. Default banners keep their
visitor-facing order (insertion order matches Kind+ID); banners with
admin-customised ranks see a one-time order shift to insertion order
on the next snapshot rebuild.

Reusable equality helpers (Ptr generic + JSON canonicalisation) move
to a new pkg/equal package; snapshotsEqual stays in service.go as the
documented chokepoint for visitor-identical snapshot comparison.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-05-02 17:42:06 +04:00
..
2026-04-27 10:30:14 +02:00
2026-04-29 12:48:44 +04:00
2026-05-01 16:48:55 +04:00
2026-04-13 12:25:42 +02:00
2026-04-03 11:56:06 +02:00
2026-03-31 19:16:56 +04:00
2026-04-13 12:25:42 +02:00
2026-04-13 12:25:42 +02:00
2026-04-02 14:37:29 +02:00
2026-05-01 16:48:55 +04:00
2026-04-13 19:24:46 +02:00
2026-04-24 08:43:14 +02:00
2026-04-20 15:37:39 +02:00