feat: one-time CC0 acknowledgment modal for user-store metadata

Summary

  • New modal shown on first paint after login, asking the user to acknowledge that the workbench's drafts and preferences are saved to two public Commons user-subpages (User:<self>/UploadWorkbench/Preferences.json and Metadata.json) and that this content is dedicated CC0 by intent of the maintainer.
  • Two action buttons: "I agree — remind me next session" records the ack but reprompts on next session; "I agree — don't remind me again" records it permanently. Esc / backdrop-click dismisses without recording — modal will reappear on the next session.
  • Persisted as a single new key on Preferences.json: cc0Acknowledgment: { acknowledgedAt: <ISO>, suppressFurther: <bool>, version: 1 }. The version field allows a future copy/scope change to re-prompt previously-suppressed users by bumping CC0_ACK_VERSION. DEMO_MODE skips the modal.

Phabricator

  • T426455 — Show one-time CC0 acknowledgment modal for user-store metadata

Test plan

  • Fresh login (or any user with no cc0Acknowledgment in their Preferences.json) → modal appears on first paint after the workbench loads.
  • Click "I agree — remind me next session" → modal closes; reload the page → modal reappears.
  • Click "I agree — don't remind me again" → modal closes; reload the page → modal does not reappear.
  • Press Esc or click the backdrop → modal closes without recording; reload the page → modal reappears.
  • Click the "View your workbench pages on Commons" link → opens https://commons.wikimedia.org/wiki/User:<you>/UploadWorkbench in a new tab.
  • After choosing either button, inspect User:<you>/UploadWorkbench/Preferences.json (or wait ~3s + check the page-history once the debounced save fires) — it now contains a cc0Acknowledgment field with the appropriate suppressFurther value.
  • DEMO_MODE local build (no VITE_OAUTH_CLIENT_ID) → modal does not appear.
  • Modal does not block any other modal — InfoModal still opens, publish flow still works, etc.

🤖 Generated with Claude Code

Merge request reports

Loading