Skip to content

Fix conflicting theme save notifications - #158

Draft
Hype76 wants to merge 4 commits into
mainfrom
codex/theme-save-notifications-20261002
Draft

Hype76 wants to merge 4 commits into
mainfrom
codex/theme-save-notifications-20261002

Conversation

@Hype76

@Hype76 Hype76 commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Selecting a theme previously announced success before persistence finished, then stacked an error when saving failed. Persistence also failed before the RPC: the raw Supabase Auth identity has role authenticated and no workspace billing context, so the existing staff mutation guard rejected it with payment_required.

This web-only fix supplies the matching loaded account profile to the unchanged billing/demo guard, retains the JWT-authorised self-service RPC, waits for persistence before success, replaces previous theme notices, serialises/coalesces rapid changes and suppresses stale responses after another selection, account switch, logout or unmount. Missing/mismatched profiles, unknown roles, unpaid paid-plan staff, demo identities and server authority denials remain blocked. System/Light/Dark defaults and branding remain compatible.

Current main b40b593 (approved PR163 tooling repair) is merged into this feature branch. Final head: d0cac3c. Other feature branches were not absorbed. The feature diff is eight files: UserSettingsPage, core theme persistence, Toast provider, latest-theme-save controller, three theme regression files and two additive CI lines. It adds no dependency, migration, native or permission change.

Validation at final head:

  • All seven required checks completed successfully: Security and V1 regression, Dependency review, Functions build, Supply chain, Migration safety, Scope ownership and Production build. All 49 regression stages passed, including sensitive account/Parent/Matchday/calendar/email/mobile authority and recovery checks. https://github.com/Hype76/footballdev/actions/runs/37013629740
  • Locally, all seven theme unit tests, the actual settings/Toast browser regression and full ESLint pass. Browser cases cover pending/failure/recovery, prior success followed by failure, rapid changes, stale successes/errors, persisted and local preferences, account switching, logout, unmount, demo and all three modes across reload. Accounts and writes are local fakes.
  • Final-head Deploy Preview smoke passed at desktop 1280px and mobile 390px: no page errors or overflow, signed-out settings require sign-in, and shipped assets contain the profile correction. Eight service requests were blocked. https://deploy-preview-158--footballplayer-online.netlify.app
  • Diff whitespace check and reverse-patch rollback check pass against b40b593, preserving PR163's tooling repair. No rollback was applied.

The previous two required security failures are resolved by integrating approved PR163; no check was weakened. A fresh local dependency reinstall hit ENOSPC, and only this task's incomplete install was removed before restoring its original dependency junction. Exact-head CI clean installs and all required gates succeeded. Other worktrees and pending cleanup archives were untouched.

Earlier exploratory tests/*.test.mjs results showed 84 identical failures on the pre-tooling main and initial candidate, with no introduced failures. That collection and test:platform are not configured release gates; they were not substituted for the seven exact-head checks above.

Report: https://app.slack.com/archives/C0C5N2XEQHM/p1790924386964299 . Parent inspected the original screenshot and confirmed both notices. Local reproduction proves the pre-RPC rejection; no separate live server error was attributed without a request trace.

Rollback, if later required: revert this feature through the reviewed Git/build pipeline to the b40b593 source while retaining PR163. The combined reverse patch checks cleanly. No database or native rollback is required; stored theme values remain compatible.

Draft only. Await separate parent release direction. Independent mobile security review remains outside this web change. No feature merge, production deployment, migration, OTA, live account mutation or customer communication was performed.

@netlify

netlify Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for footballplayer-online ready!

Name Link
🔨 Latest commit d0cac3c
🔍 Latest deploy log https://app.netlify.com/projects/footballplayer-online/deploys/6abfb258f081bb0008c02912
😎 Deploy Preview https://deploy-preview-158--footballplayer-online.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant