Skip to content

feat(campaign): enableQuoteWall flag to gate the quote wall#4857

Merged
yingshinlee merged 2 commits into
developfrom
feat/campaign-enable-quote-wall
Jun 17, 2026
Merged

feat(campaign): enableQuoteWall flag to gate the quote wall#4857
yingshinlee merged 2 commits into
developfrom
feat/campaign-enable-quote-wall

Conversation

@yingshinlee

Copy link
Copy Markdown
Collaborator

What

Add a per-campaign enableQuoteWall flag so only opted-in campaigns (e.g. 七日書) expose the quote wall / post-to-wall.

Changes

  • migration: add enable_quote_wall boolean to campaign (default false)
  • data backfill: enable it for existing 七日書 campaigns (name match used once at migration time; data-driven thereafter)
  • expose enableQuoteWall on WritingChallenge + PutWritingChallengeInput, wired through resolver / campaignService / putWritingChallenge
  • putQuote: server-side authoritative gate — reject posting to a campaign whose quote wall is not enabled (was: any campaign article)

Notes

  • base = develop → ICU only.
  • OSS toggle (matters-oss) and the web post-to-wall gating (matters-web) will follow once this is on ICU.
  • Verified locally: tsc 0 errors, eslint clean, codegen regenerated. Migration run + resolver runtime are exercised by CI / ICU.

- add `enable_quote_wall` boolean column to campaign (default false),
  with a one-time backfill enabling it for existing 七日書 campaigns
  (name match used once at migration time; data-driven thereafter)
- expose `enableQuoteWall` on WritingChallenge + PutWritingChallengeInput,
  wired through the resolver, campaignService, and putWritingChallenge
- putQuote now rejects posting to a campaign whose quote wall is not
  enabled — server-side authoritative gate (the old check only required
  the article to belong to any campaign)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@yingshinlee yingshinlee requested a review from a team as a code owner June 17, 2026 04:51
… test

The new putQuote gate rejects campaigns whose quote wall is disabled, so the
existing happy-path test (campaign defaulted to enable_quote_wall=false) broke.
Enable the wall on the seed campaign and add a test covering the rejection.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.68%. Comparing base (b12c8b7) to head (fecd588).
⚠️ Report is 22 commits behind head on develop.

Files with missing lines Patch % Lines
...7000000_alter_campaign_to_add_enable_quote_wall.js 71.42% 2 Missing ⚠️
...00100_backfill_enable_quote_wall_seven_day_book.js 80.00% 1 Missing ⚠️
src/queries/campaign/index.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4857   +/-   ##
========================================
  Coverage    72.68%   72.68%           
========================================
  Files         1068     1070    +2     
  Lines        21246    21262   +16     
  Branches      4641     4642    +1     
========================================
+ Hits         15442    15454   +12     
- Misses        5325     5329    +4     
  Partials       479      479           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yingshinlee yingshinlee merged commit c27a1b4 into develop Jun 17, 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.

1 participant