From 66e864004137ee1fd977d909136653a315c26221 Mon Sep 17 00:00:00 2001 From: Oreo2026 Date: Sat, 22 Aug 2026 23:18:12 +0530 Subject: [PATCH] fix(ui): surface actionable banner for missing Supabase schema and RLS errors --- scripts/smoke-web.mjs | 7 ++++++ web/ui/state.mjs | 50 ++++++++++++++++++++++++++++++++++++++----- 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/scripts/smoke-web.mjs b/scripts/smoke-web.mjs index 28fb28e..01d07d4 100644 --- a/scripts/smoke-web.mjs +++ b/scripts/smoke-web.mjs @@ -117,6 +117,13 @@ const requiredStrings = [ { name: 'no standalone chat modal', re: /Job-search chat/, invert: true }, { name: 'resume_struct canonical doctrine', re: /resume_struct is canonical|Structured resume modified/i }, { name: 'memory provenance original', re: /Original text stays immutable|body_original/i }, + { name: 'self-host setup error classifier', re: /function selfHostSetupError\(error\)/ }, + { name: 'missing schema setup banner', re: /CareerOps tables are missing from this Supabase project/ }, + { name: 'RLS setup banner', re: /Supabase is blocking this account from reading CareerOps data/ }, + { name: 'invalid key setup banner', re: /The Supabase URL or publishable key is not accepted/ }, + { name: 'self-host troubleshooting link', re: /docs\/TROUBLESHOOTING\.md/ }, + { name: 'initial profile read handles setup error', re: /mt_profiles'\)\.select\('\*'\).*?if\(error\) SELF_HOST_SETUP_ERROR = selfHostSetupError\(error\)/s }, + { name: 'initial roles read handles setup error', re: /rolesRes\.error\)\{ showSelfHostSetupError\(rolesRes\.error\); return \}/ }, // HTML comments must not leak private stamp markers (b + east branding) { name: 'no private stamp leak', re: new RegExp('