Skip to content

Release 1.3.0: onboarding activation, consent mode off, pf_loc removal, listing refresh, admin React from WordPress - #31

Merged
kskonovalov merged 75 commits into
mainfrom
feat/onboarding-kit
Dec 2, 2026
Merged

kskonovalov merged 75 commits into
mainfrom
feat/onboarding-kit

Conversation

@kskonovalov

@kskonovalov kskonovalov commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Release 1.3.0: a site turns PixelFlow on when it is first connected, warns when it is not sending, and offers WooCommerce and form tracking once. The plugin stops reading the pf_loc cookie, the WordPress.org listing is refreshed, the settings page loads React from WordPress instead of bundling its own copy, and sites with Consent mode switched off in PixelFlow get their WooCommerce and form server events sent.

OpenSpec changes

Change What it does
add-auto-activation On the first connection the plugin saves the script parameters and switches "Activate PixelFlow" on; sites connected before 1.3.0 keep their choice (1.3.0 upgrade step).
add-not-active-warning The settings page warns "PixelFlow is not active — your site is not sending any events" with an "Activate PixelFlow" button; "Save Changes & Insert Script" becomes "Regenerate script".
add-onboarding-tracking-window A one-time window offers WooCommerce and form tracking, with duplicate-tracking warnings; answers are stored per site.
remove-pf-loc-location PixelFlow now resolves location from the visitor's IP on its servers, so the plugin no longer reads pf_loc (forms, cart events, order copy, Purchase restore). Entered addresses are sent as before.
refresh-wporg-listing New readme text for multi-platform tracking, eleven screenshots, both banners and the matching plugin header; Installation step 4 describes the 1.3.0 settings page.
externalize-admin-react The settings app no longer bundles React: it is built as a classic script on WordPress's react and react-dom scripts, with its own small JSX runtime so it also works on WordPress 6.5 (no react-jsx-runtime there). Fixes the Plugin Check error inlined_react_dom.
honor-consent-mode-disabled With Consent mode off for the Site, a banner decline, a WP Consent API refusal or an unanswered banner no longer blocks WooCommerce and form server events; held events are sent. The plugin learns the switch from the tracking script's not-required cookie (adopted from #32) and from GET /site/config (honorConsent, cached 5 min); a known honorConsent: true outranks the cookie, and an unreadable config honours consent as before. Fixes purchases confirmed by a payment webhook being dropped as denied.

Also archived here: add-live-woo-event-test-skill and update-wporg-listing, whose requirements the last two changes modify.

Each change has its proposal, delta specs, design, test plan, tasks, handoff.json and reviews/review.json (architecture, business and security approved).

Test run (2026-12-02, final code)

  • PHP: 650/650 cases in 45 files
  • Component tests (vitest): 130/130; lint, typecheck and format pass
  • Admin E2E: 15/15 (local WordPress 7.1, React 18.3.1 from core)
  • WordPress 6.5 smoke: 1/1 (e2e/compat/run.sh; admin app unchanged since)
  • Live storefront matrix: 135/135 in one run (Consent mode on)
  • Live check with Consent mode off: 5/5 (e2e/live/tests/consent-mode-disabled.spec.ts, opt-in)
  • Scenario report: docs/test-scenarios.html (263 scenarios, 247 covered)
  • Tech-lead review: architecture, security and business approved for every change; honor-consent-mode-disabled after two rounds (stale not-required cookie, configuration read on page views)

Known limits

  • Live tests no longer assert that pf_loc is ignored; PHP tests do.
  • The listing's Installation step 5 and feature list say WooCommerce events send automatically, while WooCommerce tracking is off until enabled (wording carried over from the current listing).
  • Existing orders keep their _pf_cookie_pf_loc meta; nothing reads it.
  • The WordPress 6.5 smoke runs by hand (e2e/compat/run.sh), not in CI.
  • Purchases already reported as blocked are not re-sent; the consent fix repairs orders that follow it.
  • With a not-required cookie, event requests may read /site/config once per cache period (3 s cap); page views never do.
  • The settings app now runs on the React WordPress ships (18.3.1 in current releases) instead of the bundled React 19.

After merge

Set each change to DONE and run /opsx:archive for the seven changes; #32 is included here and can be closed; publish 1.3.0 with the SVN assets.

🤖 Generated with Claude Code

kskonovalov and others added 30 commits November 28, 2026 17:04
The change was archived on 2026-09-01; the archive copy of tasks.md is newer.
The stale copy failed `openspec validate --all --strict`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add the sdlc-kit schema, set it as the default in openspec/config.yaml with the
project context, and document the kit setup in CLAUDE.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
add-auto-activation turns Activate PixelFlow on once, when the site's
credentials are first stored, and never overrides the owner afterwards.
add-not-active-warning tells the owner on the settings page when the site is
not sending, and makes Regenerate script a secondary action that cannot wipe
the credentials. add-onboarding-tracking-window offers WooCommerce and form
tracking once to a newly connected site, with duplicate-tracking warnings.
All three ship together in 1.3.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Design, test plan and tasks for add-auto-activation: the first
credentials save turns PixelFlow on and reports it to the page, the
sanitizer keeps the decision and ignores stale saves, and a restored
pixelflow_db_version upgrade routine records existing sites as decided.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…activation

Design, test plan and tasks for add-not-active-warning: the warning
waits for the first automatic save, its button records the owner's
decision, and Regenerate script no longer deletes the credentials.
Its proposal now states that admin E2E covers only the not-connected
page, since it has no PixelFlow account.

Both changes now describe their rows for a new "Activation &
onboarding" section of docs/test-scenarios.html and carry a task to
add them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Design, test plan and tasks for add-onboarding-tracking-window: the
page receives the active form plugins, the answers are sticky general
options that turning tracking on also sets, the 1.3.0 upgrade step
marks sites connected before 1.3.0 as answered, and the window is a
portal modal like Start Setup. Carries the 1.3.0 release tasks.

The spec now says a step whose tracking is already on is not shown;
the proposal states that admin E2E covers the upgrade step only, since
it has no PixelFlow account.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e upgrade step

Fresh-site credentials save turns PixelFlow on and the storefront prints
the script; a site connected before 1.3.0 is marked decided, stays off and
shows the settings panel. design.md pins how maybe_upgrade() picks steps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Turn "Activate PixelFlow" on in the same request that first stores the
credentials, unless the activation was already decided, and answer
`activated: true` only then. The decision is the new `enabled_decided`
key in pixelflow_general_options; the sanitizer keeps it at 1 once
stored and keeps the stored `enabled` against a save from a page copy
that does not know about the decision. The sanitizer stays idempotent
for the second pass WordPress makes inside update_option().

Add maybe_upgrade() on admin_init with the stored version option
pixelflow_db_version. The 1.3.0 step records the decision for a site
that already has credentials and leaves `enabled` alone; without
credentials it writes nothing, so a fresh install never gets a
pixelflow_general_options row.

PHP tests: tests/test-auto-activation.php, tests/test-upgrade-routine.php
over tests/bootstrap-activation.php.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The server now turns "Activate PixelFlow" on while it stores the
credentials for the first time and answers `activated: true`. The page
reads that answer and updates only `enabled` and `enabled_decided` in
its settings copy, so the toggle shows on without a reload, unsaved
edits elsewhere survive, and the next full save carries enabled = 1.

- saveParams() returns { activated }; saveScriptCode passes it on
- Home applies it after the automatic save and after "Regenerate script"
- the toggle sets and sends enabled_decided = 1 with the new enabled
- enabled_decided added to the general options type and defaults
- vitest for the page mirroring and for the toggle request

Refs: add-auto-activation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cisions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-13, DEP-04 partial

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Architecture, business and security approved. The rollback-then-upgrade
path and the long handler functions are recorded in design.md Risks; the
onboarding change's upgrade line must sit after the step's early return.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ettings page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Show a warning with an "Activate PixelFlow" button on the settings
page when a connected owner with a pixel has the toggle off and the
first automatic credentials save has ended (stored, failed, no API
key or site not found). The flag flips after the activation copy, so
a site that activates itself never flashes it.

"Regenerate script" becomes a secondary button with a fixed label and
no longer deletes the stored credentials before saving them, so a
press without a pixel cannot silence tracking. The unused
removeScriptCode mutation is dropped; the adapter method stays as
PlatformAdapter requires it. The logout comment now says what the
code does.

Refs: add-not-active-warning

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…artial

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The logout handler only saves settings before logging out; it does
not disable the integration. Align its comment and console messages
with the corrected comment. No behaviour change.

Refs: add-not-active-warning
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…CT-22

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tive form plugins

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add the server side of the one-time onboarding window:
- active_form_plugins ({ id, label } of the active form adapters)
  in the settings passed to the admin page
- onboarding_woo_answered and onboarding_forms_answered in the general
  options, kept at 1 once stored and set when woo_enabled or
  forms_enabled is stored as 1, stable under the second sanitizer pass
- the 1.3.0 upgrade step marks both answers on sites with stored
  credentials, so they never see the window

Refs: add-onboarding-tracking-window

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bump the plugin version to 1.3.0 in the plugin header, the
PIXELFLOW_VERSION constant, the readme.txt stable tag and the two
changelogs. The release carries add-auto-activation,
add-not-active-warning and the onboarding window.

Refs: add-onboarding-tracking-window

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Offer WooCommerce and form tracking once in a modal on the settings
page, with a duplicate-tracking warning on each step.

- Add the two onboarding answer keys and activeFormPlugins, read from
  pixelflowSettings like isWooCommerceActive
- Add the modal: pending steps in order, "Enable" saves the tracking
  key with its answer, "Skip" saves the answer alone, closing saves
  nothing
- Show it from Home while logged in, with a pixel, PixelFlow on, Start
  Setup closed and a step pending; it appears without a reload once
  PixelFlow turns on
- Add vitest cases for scenarios ONB-01..ONB-07

Refs: add-onboarding-tracking-window

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s covered

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ADM-05 sources

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…helper in design

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PixelFlow's browser script (pfm.js, updated 2026-11-25) no longer writes the
pf_loc cookie, so the four location tests and the form location fallback test
wait for a cookie that never appears. They are marked test.fixme with the
reason. The plugin still reads pf_loc; tests/test-form-location.php covers it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Title and header for 1.3.0, the last full run (PHP 566/566, component
122/122, admin E2E 12/12, live matrix 135 passed with the five pf_loc tests
disabled), LOC-01 not covered and LOC-02 / FRM-39 partial while PixelFlow's
script no longer writes pf_loc, and header counts recomputed from the rows.
Task 4.2 ticked; handoff at PR_REVIEW.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Moves the change to the archive and promotes its live-event-verification
requirements to openspec/specs/, so remove-pf-loc-location can modify the
location requirement in the main spec.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plugin stops reading the pf_loc cookie: form events and WooCommerce events
carry only the location the shopper entered, as PixelFlow now resolves location
from the visitor's IP on its servers. Modifies form-events and
live-event-verification.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Backend removes every read of pf_loc and _pf_cookie_pf_loc; PHP tests assert
the cookie is ignored; qa deletes the five disabled live tests, updates the
LOC and FRM-39 report rows and runs the full release check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kskonovalov and others added 3 commits December 2, 2026 00:20
… narrow the runtime spec

The page-wide react-jsx-runtime check is dropped from the local spec:
other plugins enqueue that handle on every admin page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ADM-07..ADM-10 are covered; the header, counts and last-run line reflect
the 1.3.0 run with the admin app on WordPress's React.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Architecture, security and business focuses approve; the notes are
informational and one warning covers the manual WordPress 6.5 smoke.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kskonovalov kskonovalov changed the title Release 1.3.0: onboarding activation, pf_loc removal, listing refresh Release 1.3.0: onboarding activation, pf_loc removal, listing refresh, admin React from WordPress Dec 1, 2026
kskonovalov and others added 24 commits December 2, 2026 11:02
test-form-hold searched the stored JSON for 'ada' and '5678'. Both are
valid hex, so a random hold token or hash could contain them; CI failed
once on a token holding 'dada'. The checks now use markers that cannot
appear in hex and assert every stored customer value is a SHA-256 hash;
test-form-skips drops the bare '5678' for the same reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-runtime blocked

The admin E2E aborts react-jsx-runtime requests and checks the app renders
and switches tabs, replacing the page-wide absence assertion that other
plugins' scripts made unusable; the test plan records the replacement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ite's Consent mode is off

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tests/test-site-consent-mode.php drives the Woo, form and held-replay
entry points with a scripted site configuration; the server-path cases
fail until the implementation lands, the controls pass today. The stubs
gain wp_remote_get and a real is_wp_error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adopts the cookie path for a Site with Consent mode disabled
(not-required state, held replay, order sync) with its tests.

Resolved against this branch: keep version 1.3.0 and fold the
changelog text into the 1.3.0 entry, drop the CI inlined_react_dom
ignore (fixed by externalize-admin-react), and keep the hex-safe
raw-value markers in test-form-hold.php plus a word-boundary marker
for a raw first name.

Refs: honor-consent-mode-disabled

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add the PixelFlow site configuration client and one predicate that
decides whether the Site's Consent mode is disabled: a not-required
decision, or honorConsent false from GET /site/config/{id}, kept for
300 s (60 s after a failure) and read only when a hold or a denial
would block an event.

The send gate and the held-queue disposition lift the hold or denial
for such a Site, keep bot detection first and the inferred-bot rule
after, and stamp bypassed WooCommerce, form and held-replay events
with the not-required / consent_mode_disabled consent block.
Saving credentials drops the kept answers of the old and new Site.

Test stubs gain the HTTP and options companions the gate now reaches.

Refs: honor-consent-mode-disabled

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mark the scenario rows the PHP suites now cover and record the
backend quality gates and files in the handoff.

Refs: honor-consent-mode-disabled

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sabled

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tests/consent-mode-disabled.spec.ts runs only with PF_CONSENT_MODE_DISABLED=1
while the test Site's Consent mode is off: a declined shopper's AddToCart,
InitiateCheckout and Purchase are sent with the not-required block, and so
is a Purchase sent from a background request for an order that kept a
denial. The EU tunnel moves to scripts/eu-tunnel.sh so other runners can
use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
e2e/demo/overlay.ts draws captions, outlines and cards into the page so a
Playwright recording carries them; e2e/demo/record.sh (local WordPress)
and e2e/live/scripts/demo.sh (test site) stitch the clips into one mp4.
Demos: the settings page on WordPress React and Consent mode off. Screens
behind a PixelFlow sign-in are not recorded this way: the sign-in page
rejects automated browsers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… matrix

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ot-required cookie

The security review found that a stale or hand-made not-required cookie
bypassed an enabled Consent mode and the WP Consent API. The requirement
now lets a known server answer win; tasks 1.2 and 2.4 carry the fix and
the review's other findings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Five cases fail until a known honorConsent true outranks the cookie.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A configuration that reports honorConsent true now outranks a
not-required cookie (live or order snapshot): the cookie supplies no
decision, so the gates, the hold check, the payload consent block, the
order-received sync and the WP Consent API consumer all fall back to the
visitor's other signals. A false or unreachable configuration keeps the
cookie standing.

- one predicate (pixelflow_consent_mode_disabled_source) the gates ask;
  the unused wrapper is removed
- debug-log lines for an unusable configuration read (Woo and form
  logs, no key) and for a bypassed form event
- the bypass and stamp block moves out of post_event() into a helper
- tests for the new log lines

Refs: honor-consent-mode-disabled

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…low-up

Page views read only a kept configuration answer; a refusal keeps its own
source. Task 2.5 carries both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The `wp` hook that records the visitor's decision on their open orders
resolved the live decision through the same path as the events, so a
not-required cookie made every page view read, and on a cold cache
fetch, the site configuration. The decision resolvers and
pixelflow_get_site_honor_consent() now take a $fetch flag; the hook
passes false, reads only an answer already kept, and with none kept the
cookie stands and nothing is recorded. Event paths still fetch (cached).

- consent_snapshot_to_record() no longer borrows consent_mode_disabled
  from a stale not-required cookie for a granted/denied decision, so a
  WP Consent API refusal is stored under its own source.
- Reword the comments that said events consent does not block never
  cost a configuration read.
- Add cases to test-site-consent-mode.php: zero wp_remote_get on a page
  view with a cold cache, granted still recorded, refusal source kept on
  a page view and on the purchase path.

Refs: honor-consent-mode-disabled

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…doff

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kskonovalov kskonovalov changed the title Release 1.3.0: onboarding activation, pf_loc removal, listing refresh, admin React from WordPress Release 1.3.0: onboarding activation, consent mode off, pf_loc removal, listing refresh, admin React from WordPress Dec 2, 2026
@kskonovalov
kskonovalov merged commit 673f5dc into main Dec 2, 2026
5 checks passed
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.

2 participants