Appearance
Blur Policy Playbook (Operations) ​
Purpose: End-to-end procedures for configuring, validating, QA and troubleshooting the listing fields blur policy. Audience: Admin, Developer, QA Prerequisites: Supabase cloud access; admin role in the app.
Components ​
- Config table:
public.blurred_fields - Function:
public.can_view_field(p_listing, p_field_key, p_user?) - View:
public.listing_view_secure - Admin UI:
src/components/admin/subscription-plans/BlurredFieldsManager.tsx - Frontend hooks:
useBlurredFields,useSelectiveDataLoading - Mapping:
FIELD_TO_COLUMN_MAP,VISUALLY_BLURRED_FIELDS_TO_FETCH,COMPLETELY_BLOCKED_FIELDS_IF_BLURRED - Docs:
docs/architecture/blur-policy.md
Operational flow ​
- Update configuration
- Open Admin → Subscription Plans → Blurred Fields Manager
- Create/toggle fields (unauth/free/starter/pro)
- Alternative (DB): use
admin_toggle_blurred_field(id, plan, enabled)
- Verify visibility
- Public/Free: open
/listing/:idunauthenticated / with a free user - Starter/Pro: sign in a user with an active subscription and verify sensitive fields
- Admin/Owner: verify bypass (everything visible)
- Technical validation
- View:
sql
select * from public.listing_view_secure where id='LISTING_UUID';- Function:
sql
select public.can_view_field('LISTING_UUID','monthly_profit');- Config:
sql
select field_key, is_blurred_for_unauthenticated, is_blurred_for_free, is_blurred_for_starter, is_blurred_for_pro
from public.blurred_fields order by field_key;QA Checklist ​
- Unauth:
- Action buttons (
action_*) blurred as configured - Sensitive media/URLs (screenshots/website_url) blurred
- Action buttons (
- Free:
- Financial/traffic metrics blurred when the flag is enabled
- Structured description follows the matrix
- Starter/Pro (active):
- Fields blurred for free become visible at the corresponding level
- Sensitive screenshots remain blurred if explicitly configured
- Admin/Owner:
- Full bypass (no blur)
- Explore/Search:
explore_*behaves per configuration
Troubleshooting ​
"Field visible when it should be blurred"
- Check
blurred_fieldsrow for thatfield_key - Confirm user subscription (status
active,current_period_endnot expired) - UI: ensure
FIELD_TO_COLUMN_MAPcontains the column anduseSelectiveDataLoadingdoesn't select it when blurred - Server: query
listing_view_secureand verify the column is NULL
- Check
"Field blurred for Admin/Owner"
- Verify user is admin/owner (bypass implemented in function)
- Re-auth and invalidate UI cache
"Admin toggle has no effect"
admin_toggle_blurred_fieldrequires admin; checkis_admin_user()- Reload (invalidate
['blurred-fields']), verifyupdated_at
Security ​
admin_toggle_blurred_fieldis SECURITY DEFINER withSET search_path TO 'public'and checksis_admin_user()- RLS on
blurred_fields: public SELECT, admin-only mutations - Do not rely on UI only:
listing_view_secureenforces server-side masking
Export / Audit ​
sql
-- Export CSV al matricei
copy (
select field_key,
is_blurred_for_unauthenticated, is_blurred_for_free,
is_blurred_for_starter, is_blurred_for_pro,
to_char(coalesce(updated_at, created_at),'YYYY-MM-DD') as updated
from public.blurred_fields
order by field_key
) to stdout with csv header;Rolling back ​
- For configuration mistakes: toggle back in UI or use
admin_toggle_blurred_fieldwithp_enabled=false - For systemic issues: ensure function/view exist from migrations (
can_view_field,listing_view_secure)
Notes ​
- "Visually blurred" fields can still be fetched and masked in UI; for sensitive data (image URLs, screenshots) block at source (do not select when blurred)