2
0 Comments

Built a versioned AI disclosure modal for EU AI Act compliance sharing the pattern.

Article 50 transparency rules kick in Aug 2. If you run anything AI facing in the EU, users need to know they're interacting with AI.

The pattern on my marketplace Next.js and Supabase:

Single table: user id, disclosure version, timestamp, user agent. Unique constraint on user and version. RLS so users only touch their own rows.

On load after auth, check if a row exists for the current version. No row, show the modal. Checkbox gates the button, no click outside dismiss.

The version number is the whole trick. Bump it when wording changes and everyone on the old version gets reprompted automatically. Full history in the db, localStorage just as a cache.

One gotcha if the insert fails don't trap the user behind the modal. Close anyway, queue a retry on next load.

Happy to share the full schema if anyone wants it.

on July 14, 2026