Skip to content

ADR-011 consent + per-site usage-data setting; Connect step fixes - #25

Merged
titus-toia merged 1 commit into
feature/onboardingfrom
fix/adr-011-consent-and-connect
Oct 1, 2026
Merged

titus-toia merged 1 commit into
feature/onboardingfrom
fix/adr-011-consent-and-connect

Conversation

@titus-toia

Copy link
Copy Markdown
Contributor

Framework half of ADR-011 (server half: TangibleInc/tangible-one#299), plus the Connect bugs found while screenshotting the onboarder.

ADR-011

  • Consent step asks about usage data only on an unconnected free plugin, once per site. Licensed and connected accounts are never asked — their accepted Terms are the grant — enforced locally even if an older server block says ask.
  • One-tier wording (telemetry v2), "basics already shared under your licence" line removed, heading reads "One optional thing" when only one question is asked.
  • "Don't send usage data from this site" (onboarding/site-telemetry.php): one site answer in the existing consent outbox, delivered like any answer — the server (#299) stores it as the site's exclusion. Shown in Tangible Home's This site block; plugins can call render_site_telemetry_setting() in their own settings.

Connect

  • Step id connect → tangible_connect (rail label "tangible.one"). SearchSync's own backend step is connect, so free SearchSync fataled with Onboarding step id "connect" registered twice.
  • Pending is its own screen. After approving, if tangible.one can't reach the site to verify it (local dev, blocked REST API) the step explains why, offers Check again (re-runs confirm), and Skip moves on without dropping the pending connection.
  • URLs: when TANGIBLE_CONNECT_APP_URL / TANGIBLE_CLOUD_API are unset they now derive from TANGIBLE_CLOUD_URL (api.staging.tangible.one/api/edd → app staging.tangible.one). Before, a staging-pointed site sent Connect to prod.

Tests: wp-env PHPUnit 113 tests / 309 assertions OK. New: coexists with a plugin step named connect; pending render + Check again; only unconnected free is asked; site setting is one answer; URL derivation.

Follow-up for plugin repos: vendored copies (e.g. SearchSync) need the framework bump; plugins should add render_site_telemetry_setting() to their settings page.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JAdkRhF6yVmWWZBdUgV8Si

…ect step fixes

ADR-011 (telemetry: one grant, given by the Terms, refused per site):
- the consent step asks about usage data only on an UNCONNECTED FREE
  plugin, once per site; licensed/connected accounts are never asked
  (their Terms are the grant), whatever an older server block says
- one-tier wording (telemetry v2); drop the paid 'basics already shared'
  line; heading says 'One optional thing' when only one is asked
- new onboarding/site-telemetry.php: 'Don't send usage data from this
  site' — one site answer in the consent outbox, delivered like any
  answer (server stores it as the site's exclusion); shown in Tangible
  Home's 'This site' block, render_site_telemetry_setting() for plugins

Connect:
- step id 'connect' -> 'tangible_connect' (label 'tangible.one'):
  SearchSync's backend step is also 'connect', which fatals resolve_plan
- pending (approved but unverified) is its own screen: says why
  (local dev site / unreachable REST API), 'Check again' re-confirms,
  Skip moves on without dropping the pending connection
- app/API URLs default from TANGIBLE_CLOUD_URL when the Connect
  constants are unset, so a staging-pointed site no longer Connects to prod

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAdkRhF6yVmWWZBdUgV8Si
@titus-toia
titus-toia merged commit 980e19c into feature/onboarding Oct 1, 2026
1 check failed
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