Skip to content

Dev#15

Merged
Retsomm merged 4 commits into
mainfrom
dev
Jul 13, 2026
Merged

Dev#15
Retsomm merged 4 commits into
mainfrom
dev

Conversation

@Retsomm

@Retsomm Retsomm commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added a Chinese privacy policy page covering data collection, usage, third-party services, account deletion, permissions, and contact information.
    • Added support for Android app builds and distribution across development, preview, and production channels.
    • Added production version tracking and automated Android version increments.
  • Documentation
    • Clarified how visitor and signed-in data are handled, including storage, security, and privacy choices.

Retsomm and others added 3 commits July 13, 2026 17:42
apps/web/privacy:說明訪客模式本機資料、登入後透過 Clerk 蒐集的資料範圍、
第三方服務商(Clerk/Supabase/Vercel)、刪除帳號效果、App 權限用途,
使用者已在本機確認內容無誤。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- 建立 EAS 專案並連結 app.json(extra.eas.projectId)
- 新增 eas.json:development/preview/production build profile,
  preview/production 指向正式後端 https://easy-learn-inky.vercel.app
- 加上 android.versionCode,production profile 開 autoIncrement
- expo-image-picker 明確關閉 cameraPermission/microphonePermission,
  避免預設帶入用不到的 RECORD_AUDIO/CAMERA 權限
- .gitignore 排除 google-play-service-account.json

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
apps/web 的 postinstall(prisma generate)會在任何一次 repo 根目錄的
yarn install 被觸發(Yarn 1 workspaces 對所有 workspace 一起跑
postinstall),即使只是要裝 apps/mobile 的依賴。prisma.config.ts 用
@prisma/config 的 env('DIRECT_URL') 讀不到就直接 throw,導致 EAS Build
(只建置 mobile,本來就不會有 apps/web 的資料庫連線字串)在
INSTALL_DEPENDENCIES 階段整個失敗。

改成直接讀 process.env.DIRECT_URL,讀不到時退回一個不會真的連線的假字串
——prisma generate 本身不需要真的連得上資料庫,只有 prisma migrate/正式
執行期的 @prisma/client 才需要真正有效的連線字串,那些情境本來就會有
apps/web 自己的 .env.local 或 Vercel 環境變數,不受這個 fallback 影響。

已用 env -i(清空所有環境變數+暫時移開 .env)模擬 EAS Build 的環境,
確認 prisma generate 不再因缺 DIRECT_URL 而失敗;apps/web 的
typecheck/build 在正常環境下仍全部通過。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
easy-learn Ready Ready Preview, Comment Jul 13, 2026 11:32am

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Retsomm, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 49 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: db691d7b-22b5-45ea-a776-a6ceb7d27cd5

📥 Commits

Reviewing files that changed from the base of the PR and between 76d03ef and 0768726.

📒 Files selected for processing (1)
  • apps/web/src/app/privacy/page.tsx
📝 Walkthrough

Walkthrough

Adds mobile Android/EAS release configuration, makes Prisma generation tolerate a missing DIRECT_URL, and introduces a Chinese privacy policy page for the web app.

Changes

Mobile release configuration

Layer / File(s) Summary
Android and EAS release setup
apps/mobile/.gitignore, apps/mobile/app.json, apps/mobile/eas.json
Configures the Android package and version, Expo permissions and metadata, EAS build profiles, production submission settings, and service-account credential exclusions.

Prisma configuration

Layer / File(s) Summary
Datasource URL resolution
apps/web/prisma.config.ts
Reads DIRECT_URL from process.env and falls back to a placeholder PostgreSQL URL when unset.

Privacy policy route

Layer / File(s) Summary
Privacy policy page
apps/web/src/app/privacy/page.tsx
Adds metadata and renders Chinese privacy-policy content with third-party service links and contact information.

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

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is too vague to describe the actual changes in the pull request. Use a concise, specific title that names the main change, such as adding the privacy page and mobile/EAS configuration updates.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
apps/web/src/app/privacy/page.tsx (2)

7-7: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider extracting the contact email to an environment variable.

The personal Gmail address 112182ssss@gmail.com is hardcoded in the source. For maintainability and to allow changing the contact address without a code change, consider reading it from an environment variable (e.g., process.env.NEXT_PUBLIC_CONTACT_EMAIL). This also makes it easier to use a custom domain email in the future.

♻️ Suggested refactor
-const CONTACT_EMAIL = '112182ssss@gmail.com'
+const CONTACT_EMAIL = process.env.NEXT_PUBLIC_CONTACT_EMAIL ?? '112182ssss@gmail.com'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/src/app/privacy/page.tsx` at line 7, Update the CONTACT_EMAIL
constant to read from the NEXT_PUBLIC_CONTACT_EMAIL environment variable instead
of hardcoding the Gmail address, while preserving an appropriate fallback only
if the existing behavior requires one.

66-66: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Add noopener to external link rel attributes.

All three external links use rel="noreferrer" but omit noopener. While modern browsers imply noopener when noreferrer is set, explicitly including both is the recommended best practice for defense-in-depth against reverse tabnabbing.

🔒️ Proposed fix
-          <a href="https://clerk.com/legal/privacy" target="_blank" rel="noreferrer">
+          <a href="https://clerk.com/legal/privacy" target="_blank" rel="noopener noreferrer">
-          <a href="https://supabase.com/privacy" target="_blank" rel="noreferrer">
+          <a href="https://supabase.com/privacy" target="_blank" rel="noopener noreferrer">
-          <a href="https://vercel.com/legal/privacy-policy" target="_blank" rel="noreferrer">
+          <a href="https://vercel.com/legal/privacy-policy" target="_blank" rel="noopener noreferrer">

Also applies to: 72-72, 78-78

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/src/app/privacy/page.tsx` at line 66, Update all three external
links in the privacy page, including the links near the Clerk privacy, terms,
and contact references, so their rel attributes explicitly include both
noreferrer and noopener. Preserve the existing target="_blank" behavior and link
destinations.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/mobile/eas.json`:
- Around line 21-27: Update the production profile in eas.json so
EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY uses the Clerk production pk_live_ value
instead of the preview/test pk_test_ value, while leaving the preview profile
unchanged.

---

Nitpick comments:
In `@apps/web/src/app/privacy/page.tsx`:
- Line 7: Update the CONTACT_EMAIL constant to read from the
NEXT_PUBLIC_CONTACT_EMAIL environment variable instead of hardcoding the Gmail
address, while preserving an appropriate fallback only if the existing behavior
requires one.
- Line 66: Update all three external links in the privacy page, including the
links near the Clerk privacy, terms, and contact references, so their rel
attributes explicitly include both noreferrer and noopener. Preserve the
existing target="_blank" behavior and link destinations.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 47f3ec3c-409f-4645-8f47-a06675c78cf2

📥 Commits

Reviewing files that changed from the base of the PR and between df6744d and 76d03ef.

📒 Files selected for processing (5)
  • apps/mobile/.gitignore
  • apps/mobile/app.json
  • apps/mobile/eas.json
  • apps/web/prisma.config.ts
  • apps/web/src/app/privacy/page.tsx

Comment thread apps/mobile/eas.json
Comment on lines +21 to +27
"production": {
"autoIncrement": true,
"env": {
"EXPO_PUBLIC_API_BASE_URL": "https://easy-learn-inky.vercel.app",
"EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY": "pk_test_Z29sZGVuLWxhYi00OC5jbGVyay5hY2NvdW50cy5kZXYk"
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Production build uses a Clerk test publishable key.

The production profile sets EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY to a pk_test_ key (line 25), identical to the preview profile (line 18). Production builds should use a pk_live_ key so authentication routes through Clerk's production environment, not the test environment.

🔐 Suggested fix
     "production": {
       "autoIncrement": true,
       "env": {
         "EXPO_PUBLIC_API_BASE_URL": "https://easy-learn-inky.vercel.app",
-        "EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY": "pk_test_Z29sZGVuLWxhYi00OC5jbGVyay5hY2NvdW50cy5kZXYk"
+        "EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY": "pk_live_YOUR_LIVE_CLERK_PUBLISHABLE_KEY"
       }
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"production": {
"autoIncrement": true,
"env": {
"EXPO_PUBLIC_API_BASE_URL": "https://easy-learn-inky.vercel.app",
"EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY": "pk_test_Z29sZGVuLWxhYi00OC5jbGVyay5hY2NvdW50cy5kZXYk"
}
}
"production": {
"autoIncrement": true,
"env": {
"EXPO_PUBLIC_API_BASE_URL": "https://easy-learn-inky.vercel.app",
"EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY": "pk_live_YOUR_LIVE_CLERK_PUBLISHABLE_KEY"
}
}
🧰 Tools
🪛 Betterleaks (1.6.0)

[high] 25-25: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/mobile/eas.json` around lines 21 - 27, Update the production profile in
eas.json so EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY uses the Clerk production pk_live_
value instead of the preview/test pk_test_ value, while leaving the preview
profile unchanged.

@Retsomm
Retsomm merged commit ff9030e into main Jul 13, 2026
3 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