Skip to content

feat: ソフトペイウォール化 + 日本語話者へ lifetime 表示#268

Merged
Daisuke134 merged 1 commit into
mainfrom
claude/aicca-ios-pricing-paywall-nzkmax
Jul 4, 2026
Merged

feat: ソフトペイウォール化 + 日本語話者へ lifetime 表示#268
Daisuke134 merged 1 commit into
mainfrom
claude/aicca-ios-pricing-paywall-nzkmax

Conversation

@Daisuke134

@Daisuke134 Daisuke134 commented Jul 3, 2026

Copy link
Copy Markdown
Owner

概要

Anicca iOS アプリのオンボーディング末尾ペイウォールに対する2点の修正。

# 現状(バグ) 修正後
G1 Lifetime(買い切り)が日本語ユーザーに表示されない 日本語話者に 月額 → 年額 → 買い切り の3プランを表示。英語は 月額+年額 のみ(買い切り非表示)
G2 ハードペイウォール(閉じるボタンなし・課金必須) ソフトペイウォール化。右上に平均サイズの ×。タップで課金せずメイン画面(FeedRootView)へ

変更内容

Swift

  • Onboarding/PaywallVariantBView.swift: lifetime のゲートを StoreKit storefront 国判定(storefrontCountry == "JPN")から端末優先言語の日本語判定(Locale.preferredLanguageshasPrefix("ja")UserProfile/QuoteProvider と同一パターン)へ変更。storefront は async 取得で初期値が空 → レースで非表示になるバグがあった。不要になった import StoreKit.task { storefront… } を削除。
  • Onboarding/OnboardingBibleViews.swift: PaywallFlowContaineronDismiss を追加し、ZStack(alignment: .topTrailing) へ右上 × ボタン(paywall-close-button, アイコン17pt / タップ領域44pt)を常時表示。
  • Onboarding/OnboardingFlowView.swift: onDismiss を新規 handlePaywallDismissedAsFree()(onboardingPaywallDismissedFree を track → markOnboardingComplete() → ペイウォールを閉じる)に配線。.interactiveDismissDisabled(true) は維持(スワイプ離脱は防止、離脱は明示的な × のみ)。

Maestro E2E

  • maestro/onboarding/03-soft-paywall.yaml: × → feed-scroll 到達(無課金)を検証。共有フロー v1.8.0/_onboarding_to_paywall.yaml を使用。
  • maestro/v1.8.0/05-paywall_variant_b_ja.yaml: 日本語で「買い切り」表示を assert + 現行文言/feed-scroll に整合。
  • maestro/v1.8.0/04-paywall_variant_b_en.yaml: 英語で「Lifetime」非表示を assert + 壊れていた ../ 相対パス/mypath-root/旧文言を修正。

Spec

  • docs/superpowers/specs/2026-07-03-soft-paywall-and-jp-lifetime-design.md

テスト状況(honesty)

本作業は Linux リモートコンテナで実行しており iOS toolchain(xcodebuild / swift / maestro / asc)が存在しないため、ビルド・Maestro 実走・App Store Connect 提出はこのセッションでは未実施。fresh-context の敵対的コードレビューは PASS(コンパイル/ロジック欠陥なし)。

Mac 側での実行手順(要実施):

cd aniccaios
fastlane set_version version:1.9.1     # ビルド番号/バージョンを bump
maestro test maestro/onboarding/03-soft-paywall.yaml
maestro test maestro/v1.8.0/05-paywall_variant_b_ja.yaml
maestro test maestro/v1.8.0/04-paywall_variant_b_en.yaml
fastlane full_release                   # build → upload → wait → submit for review(=審査待ち)

実機確認(Dais)

  • ja: 月/年/買い切り の3プランが表示される
  • en: 月/年 の2プランのみ(買い切り非表示)
  • 右上 × で課金せずメイン画面に到達する

🤖 Generated with Claude Code

https://claude.ai/code/session_01C84bsKHEy9pzDbicoPGg3h


Generated by Claude Code

Summary by CodeRabbit

  • New Features

    • オンボーディング後のペイウォールに右上の閉じるボタンを追加し、購入せずにメイン画面へ戻れるようになりました。
    • 日本語表示では、月額・年額に加えて買い切りプランが表示されるようになりました。
  • Bug Fixes

    • ペイウォールを閉じた場合でも、オンボーディング完了として正しく扱われるようになりました。
  • Documentation

    • ソフトペイウォールと日本語向けプラン表示の仕様を更新しました。

- PaywallVariantBView: lifetime(買い切り) を storefront国(JPN)判定から
  端末優先言語の日本語判定へ変更。async storefront 依存のレースで
  非表示になるバグを解消。英語ユーザーには従来通り非表示。
- PaywallFlowContainer: 右上に平均サイズの × (paywall-close-button) を追加。
  課金せずメイン画面(FeedRootView)へ遷移するソフトペイウォールに変更。
- OnboardingFlowView: onDismiss を handlePaywallDismissedAsFree に配線
  (onboardingPaywallDismissedFree track + markOnboardingComplete)。
- Maestro: 03-soft-paywall / 04(en, lifetime非表示) / 05(ja, 買い切り表示)
  を現行フロー・feed-scroll・paywall-close-button に整合。
- spec: docs/superpowers/specs/2026-07-03-soft-paywall-and-jp-lifetime-design.md

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C84bsKHEy9pzDbicoPGg3h
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 63b93294-c351-4ca6-a9e7-e15e3c7b0885

📥 Commits

Reviewing files that changed from the base of the PR and between 8f3b7fa and c4b8dda.

📒 Files selected for processing (7)
  • aniccaios/aniccaios/Onboarding/OnboardingBibleViews.swift
  • aniccaios/aniccaios/Onboarding/OnboardingFlowView.swift
  • aniccaios/aniccaios/Onboarding/PaywallVariantBView.swift
  • aniccaios/maestro/onboarding/03-soft-paywall.yaml
  • aniccaios/maestro/v1.8.0/04-paywall_variant_b_en.yaml
  • aniccaios/maestro/v1.8.0/05-paywall_variant_b_ja.yaml
  • docs/superpowers/specs/2026-07-03-soft-paywall-and-jp-lifetime-design.md

📝 Walkthrough

Walkthrough

ペイウォールをハード(閉じられない)からソフト(右上×で無課金dismiss可能)へ変更し、dismiss時にonboardingPaywallDismissedFreeを計測してメイン画面へ遷移する。加えてLifetimeプラン表示判定をStorefront国コードから端末言語判定へ変更し、Maestro E2Eテストと設計ドキュメントを更新した。

Changes

ソフトペイウォールとLifetime表示変更

Layer / File(s) Summary
ソフトペイウォール設計仕様
docs/superpowers/specs/2026-07-03-soft-paywall-and-jp-lifetime-design.md
Lifetime言語判定と×ボタンによる無課金dismissの契約を定義する設計ドキュメントを新規追加。
PaywallFlowContainerの×ボタン実装
aniccaios/aniccaios/Onboarding/OnboardingBibleViews.swift
ZStackで右上に常時表示の×ボタンを追加し、onDismissをPaywallVariantBViewへ配線。
無課金dismissハンドラの追加
aniccaios/aniccaios/Onboarding/OnboardingFlowView.swift
仕様コメントをSOFTへ更新し、dismiss時にhandlePaywallDismissedAsFree()でオンボーディング完了更新と計測を実行。
Lifetime表示の言語判定への変更
aniccaios/aniccaios/Onboarding/PaywallVariantBView.swift
StoreKitのstorefrontCountry判定を削除し、端末優先言語のja判定(isJapanese)へ切替。
Maestro E2Eテストのソフトペイウォール対応
aniccaios/maestro/onboarding/03-soft-paywall.yaml, aniccaios/maestro/v1.8.0/04-paywall_variant_b_en.yaml, aniccaios/maestro/v1.8.0/05-paywall_variant_b_ja.yaml
paywall-close-buttonでの遷移とfeed-scroll到達判定、EN/JAのプラン文言・Lifetime表示アサーションを更新。

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant PaywallFlowContainer
  participant OnboardingFlowView
  User->>PaywallFlowContainer: ×ボタンをタップ
  PaywallFlowContainer->>OnboardingFlowView: onDismiss()呼び出し
  OnboardingFlowView->>OnboardingFlowView: handlePaywallDismissedAsFree()
  OnboardingFlowView->>OnboardingFlowView: onboardingPaywallDismissedFree計測
  OnboardingFlowView->>User: 課金なしでメイン画面へ遷移
Loading

関連する課題: なし明記のPR記述

関連するPR: なし明記

推奨ラベル: enhancement, ios, testing

推奨レビュアー: なし明記

詩:
うさぎ跳ねて、×ボタン光る
課金せずとも、道は開く
日本語ならば買い切りも見え
ソフトな別れ、フィードへ続く
今日もコードに、月光差す

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/aicca-ios-pricing-paywall-nzkmax

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Daisuke134 Daisuke134 marked this pull request as ready for review July 4, 2026 11:33
@Daisuke134 Daisuke134 merged commit 09194e5 into main Jul 4, 2026
1 check passed
@Daisuke134 Daisuke134 deleted the claude/aicca-ios-pricing-paywall-nzkmax branch July 4, 2026 11:33
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