Skip to content

fix: 1.6.0 上架文档、EAS Widget 路径与 knip 治理 - #16

Merged
moyunzero merged 1 commit into
masterfrom
260811-fix-knip-governance-master
Aug 11, 2026
Merged

moyunzero merged 1 commit into
masterfrom
260811-fix-knip-governance-master

Conversation

@moyunzero

@moyunzero moyunzero commented Aug 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • 版本升至 1.6.0,补齐 README / App Store 描述与 whats-new-1.6.0 中英文文案
  • 修复 EAS iOS production 构建:Widget Swift 源文件挂入 EmotionDiaryWidget PBXGroup,避免在 ios/ 根目录找不到源文件
  • 清理 knip 未使用 export(EntryCard memo helper、SecureStore backoff、AIErrorType.NO_TOKEN、Maestro seed 内部符号),并修正 knip.json 的 EntryCard/** ignore,恢复 yarn verify:governance
  • Maestro 018:编辑弹窗增加 edit-entry-close 与关闭兜底,降低 UAT 抖动

Test plan

  • yarn verify:governance(knip / depcruise / boundaries PASS)
  • 相关单测:secureStore / OTD seed / widget nativeHardening
  • Maestro 019 On This Day、015 Retention、018 Person Timeline(模拟器断言全部 COMPLETED)
  • 重新跑 eas build --platform ios --profile production,确认 Widget 源文件路径错误已消失
  • App Store Connect 粘贴 whats-new-1.6.0-zh.md / whats-new-1.6.0-en.md

Made with Cursor

Summary by CodeRabbit

  • New Features

    • Version 1.6.0 highlights Relationship Timeline, On This Day, and the Soft Stack home widget.
    • Added App Store release information and updated screenshots, descriptions, and promotional content.
    • Widget data is cleared when signing out or deleting an account.
  • Bug Fixes

    • Improved reliability when closing edit-entry screens during automated flows.
    • Improved iOS widget setup to keep widget files organized consistently.
  • Documentation

    • Updated English and Chinese documentation with 1.6.0 features, milestones, quality guidance, and usage instructions.

Bump to 1.6.0 with App Store what’s-new, fix EmotionDiaryWidget Swift group membership for EAS prebuild, clear knip unused exports that broke master governance, and harden Maestro 018 edit-close.

Co-authored-by: Cursor <[email protected]>
@coderabbitai

coderabbitai Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR prepares the 1.6.0 release, improves iOS widget Swift-source grouping, updates person-timeline UAT behavior, revises App Store and README content, and removes unused public exports.

Changes

Release and platform hardening

Layer / File(s) Summary
Widget Swift source grouping
modules/widget-snapshot/app.plugin.js, __tests__/unit/modules/widget-snapshot/nativeHardening.test.ts
The Expo plugin groups Swift references under the widget PBX group. Tests cover re-parenting, basename preservation, and duplicate removal.
Person timeline UAT close flow
components/EditEntryModal/EditEntryModal.tsx, .maestro/flows/018-person-timeline-uat.yaml
The modal exposes edit-entry-close. The UAT flow taps this identifier and conditionally opens the other person timeline.
1.6.0 release materials
app.json, package.json, README*.md, app-store-submission/metadata/*
Version references, feature descriptions, roadmap entries, screenshots, release notes, and submission guidance now describe version 1.6.0.
Internal API visibility cleanup
components/EntryCard/*, knip.json, lib/supabase.ts, services/maestroOnThisDaySeed.ts, utils/ai/client.ts
Unused exports and AIErrorType.NO_TOKEN are removed. Internal implementations remain unchanged.

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

Sequence Diagram(s)

sequenceDiagram
  participant ExpoPlugin
  participant PBXProject
  participant WidgetGroup
  participant SwiftReferences
  ExpoPlugin->>PBXProject: ensureWidgetSwiftSourcesInGroup
  PBXProject->>WidgetGroup: find or create widget group
  PBXProject->>SwiftReferences: normalize references
  SwiftReferences->>WidgetGroup: attach Swift files
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了 1.6.0 上架文档、EAS Widget 路径修复和 knip 治理等主要变更。
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 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 260811-fix-knip-governance-master

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.

@sonarqubecloud

Copy link
Copy Markdown

@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: 3

🧹 Nitpick comments (2)
modules/widget-snapshot/app.plugin.js (1)

231-287: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Reduce ensureWidgetSwiftSourcesInGroup complexity.

ensureWidgetSwiftSourcesInGroup has Cognitive Complexity 21. This exceeds the configured limit of 15 and fails the SonarCloud check. Extract the file-reference scan, widget-group creation, and group-membership cleanup into focused helpers.

🤖 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 `@modules/widget-snapshot/app.plugin.js` around lines 231 - 287, Reduce
cognitive complexity in ensureWidgetSwiftSourcesInGroup by extracting the
file-reference scan, widget-group creation, and orphan-membership cleanup into
focused helper functions. Keep ensureWidgetSwiftSourcesInGroup responsible only
for coordinating these helpers and adding discovered Swift references to the
widget group, preserving the existing behavior.

Source: Linters/SAST tools

knip.json (1)

77-77: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Narrow or justify the directory-wide Knip ignore.

components/EntryCard/ contains four files with exported types, functions, and a re-export. Restrict the types and exports ignore to the affected file, or document why all four files are exempt.

🤖 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 `@knip.json` at line 77, Update the Knip configuration entry for
components/EntryCard/** to target only the specific file containing the unused
types and exports, unless all four files genuinely require exclusion; if
retaining the directory-wide ignore, add documentation explaining why every file
is exempt.
🤖 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 @.maestro/flows/018-person-timeline-uat.yaml:
- Around line 101-112: Add waitForAnimationToEnd immediately after tapping
edit-entry-close and before the runFlow visibility condition, so the fallback
checks mood-content-input only after the modal close animation completes.

In `@app-store-submission/metadata/app-description-en.md`:
- Around line 38-48: Update the character-count annotations in the app
description metadata: change the promotional text count from 128 to 130 and the
keyword string count from 98 to 93, without modifying the field contents.

In `@README.en.md`:
- Around line 349-351: Align both README version histories with the pending
release gates: in README.en.md lines 349-351, change the v1.6.0 “App Store
update” status to prepared or pending; remove the completed-submission status at
README.en.md line 480; make the equivalent “App Store 更新” status change at
README.md lines 434-436; and remove “App Store 提审” at README.md line 565.

---

Nitpick comments:
In `@knip.json`:
- Line 77: Update the Knip configuration entry for components/EntryCard/** to
target only the specific file containing the unused types and exports, unless
all four files genuinely require exclusion; if retaining the directory-wide
ignore, add documentation explaining why every file is exempt.

In `@modules/widget-snapshot/app.plugin.js`:
- Around line 231-287: Reduce cognitive complexity in
ensureWidgetSwiftSourcesInGroup by extracting the file-reference scan,
widget-group creation, and orphan-membership cleanup into focused helper
functions. Keep ensureWidgetSwiftSourcesInGroup responsible only for
coordinating these helpers and adding discovered Swift references to the widget
group, preserving the existing behavior.
🪄 Autofix

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: b65b334a-f8d6-44f3-858e-4cb528df7dab

📥 Commits

Reviewing files that changed from the base of the PR and between b88a41d and efa2aac.

📒 Files selected for processing (19)
  • .maestro/flows/018-person-timeline-uat.yaml
  • README.en.md
  • README.md
  • __tests__/unit/modules/widget-snapshot/nativeHardening.test.ts
  • app-store-submission/metadata/app-description-en.md
  • app-store-submission/metadata/app-description-zh.md
  • app-store-submission/metadata/screenshot-guide.md
  • app-store-submission/metadata/whats-new-1.6.0-en.md
  • app-store-submission/metadata/whats-new-1.6.0-zh.md
  • app.json
  • components/EditEntryModal/EditEntryModal.tsx
  • components/EntryCard/EntryCard.tsx
  • components/EntryCard/index.tsx
  • knip.json
  • lib/supabase.ts
  • modules/widget-snapshot/app.plugin.js
  • package.json
  • services/maestroOnThisDaySeed.ts
  • utils/ai/client.ts
💤 Files with no reviewable changes (2)
  • utils/ai/client.ts
  • components/EntryCard/index.tsx

Comment on lines +101 to +112
- tapOn:
id: edit-entry-close
# Modal close via Pressable is flaky under XCTest; deep-link fallback restores timeline.
- runFlow:
when:
visible:
id: mood-content-input
commands:
- runFlow:
file: ../subflows/open-url.yaml
env:
URL: "emotiondiary://person-timeline?person=other"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

In Maestro YAML flows, does a runFlow when: visible:condition immediately followingtapOn wait for the UI state to settle, or is it evaluated immediately?

💡 Result:

In Maestro YAML flows, the when: visible: condition attached to a runFlow command is evaluated immediately at the moment the flow execution reaches that step [1]. It does not automatically wait for the UI state to settle or for an element to appear before checking the condition [1]. If the specified element is not currently visible when the runFlow step is reached, the condition evaluates to false, and Maestro will skip the associated subflow and proceed to the next command in your main flow [2][3]. To handle scenarios where you need to wait for an element to appear before running a subflow, you should use an assertion or wait command before the runFlow step [4][5]. Specifically: 1. Use assertVisible if you want to explicitly wait for the element to appear (which includes smart polling until the element is found or a timeout is reached) [4]. 2. If the UI might be animating or unstable, consider using waitForAnimationToEnd or assertVisible before the runFlow command to ensure the state is what you expect before the condition is checked [4]. The design principle in Maestro is that commands like assertVisible provide built-in, smart polling, whereas when conditions are strictly evaluated at the time of execution [1][4].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu
file=".maestro/flows/018-person-timeline-uat.yaml"
sed -n '90,120p' "$file"
printf '\nRelated wait and fallback usage:\n'
rg -n -C 3 'waitForAnimationToEnd|mood-content-input|edit-entry-close|open-url\.yaml' .maestro

Repository: moyunzero/Emotion-Diary

Length of output: 26242


Wait for modal dismissal before evaluating the fallback.

runFlow.when.visible evaluates immediately after tapOn. Add waitForAnimationToEnd before the fallback condition so the close animation cannot trigger the deep link after a successful close.

🤖 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 @.maestro/flows/018-person-timeline-uat.yaml around lines 101 - 112, Add
waitForAnimationToEnd immediately after tapping edit-entry-close and before the
runFlow visibility condition, so the fallback checks mood-content-input only
after the modal close animation completes.

Comment on lines +38 to +48
MoodMO 1.6: Relationship Timeline, On This Day, Soft Stack widget—revisit moments with someone, tend your Mind Garden at a glance.

(149 characters)
(128 characters)

---

## Keywords (max 100 characters; comma-separated, no space after commas)

mood,diary,journal,emotion,mental health,wellness,self care,mindfulness,tracker,voice notes
mood,diary,journal,emotion,mental health,wellness,self care,mindfulness,relationships,memories

(99 characters)
(98 characters)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Recalculate the App Store field counts.

The promotional text on Line 38 contains 130 characters, not 128. The keyword string on Line 46 contains 93 characters, not 98. Update both annotations before pasting the fields into App Store Connect.

Proposed correction
- (128 characters)
+ (130 characters)

- (98 characters)
+ (93 characters)
🤖 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 `@app-store-submission/metadata/app-description-en.md` around lines 38 - 48,
Update the character-count annotations in the app description metadata: change
the promotional text count from 128 to 130 and the keyword string count from 98
to 93, without modifying the field contents.

Comment thread README.en.md
Comment on lines +349 to +351
### [1.6.0] - 2026-08-11 · App Store update

> v1.6 “relationship insight & light reach” (Phases 13–18): turn people tags into browsable relationship memory, plus a minimal home-screen widget.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Keep both version histories aligned with the pending release gates.

The PR objectives state that EAS production validation and App Store Connect copy are still pending. Both language versions currently mark v1.6.0 as updated or submitted.

  • README.en.md#L349-L351: change “App Store update” to a prepared or pending status.
  • README.en.md#L480-L480: remove the completed-submission status until the release gates finish.
  • README.md#L434-L436: change “App Store 更新” to a prepared or pending status.
  • README.md#L565-L565: remove “App Store 提审” until the release gates finish.
📍 Affects 2 files
  • README.en.md#L349-L351 (this comment)
  • README.en.md#L480-L480
  • README.md#L434-L436
  • README.md#L565-L565
🤖 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 `@README.en.md` around lines 349 - 351, Align both README version histories
with the pending release gates: in README.en.md lines 349-351, change the v1.6.0
“App Store update” status to prepared or pending; remove the
completed-submission status at README.en.md line 480; make the equivalent “App
Store 更新” status change at README.md lines 434-436; and remove “App Store 提审” at
README.md line 565.

@moyunzero
moyunzero merged commit df6e7d9 into master Aug 11, 2026
4 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