Rudy Celekli

Upstream contribution · orestbida/cookieconsent

cookieconsent · Discarding cookie-consent drafts consistently

Rudy Celekli’s engineering portfolio · AI-assisted summary

Problem

Closing preferences without saving restored the visual switches but left an internal draft of enabled services. A user could reopen the panel and save without touching the switches, unknowingly committing the discarded selection.

Engineering response

The discard path rebuilds the draft from the restored checkbox values. The subsequent save reflects the state the reopened panel displays.

Evidence and scope

The documented jsdom regression turns on a service, closes without saving, reopens and saves without changes. It fails before the patch and passes after. The PR reports 120 passing tests and a successful build, with real-browser testing outside the reported checks.