Repository navigation
fix: 1.6.0 上架文档、EAS Widget 路径与 knip 治理 - #16
Conversation
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]>
📝 WalkthroughWalkthroughThe 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. ChangesRelease and platform hardening
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
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
|
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (2)
modules/widget-snapshot/app.plugin.js (1)
231-287: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winReduce
ensureWidgetSwiftSourcesInGroupcomplexity.
ensureWidgetSwiftSourcesInGrouphas 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 winNarrow or justify the directory-wide Knip ignore.
components/EntryCard/contains four files with exported types, functions, and a re-export. Restrict thetypesandexportsignore 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
📒 Files selected for processing (19)
.maestro/flows/018-person-timeline-uat.yamlREADME.en.mdREADME.md__tests__/unit/modules/widget-snapshot/nativeHardening.test.tsapp-store-submission/metadata/app-description-en.mdapp-store-submission/metadata/app-description-zh.mdapp-store-submission/metadata/screenshot-guide.mdapp-store-submission/metadata/whats-new-1.6.0-en.mdapp-store-submission/metadata/whats-new-1.6.0-zh.mdapp.jsoncomponents/EditEntryModal/EditEntryModal.tsxcomponents/EntryCard/EntryCard.tsxcomponents/EntryCard/index.tsxknip.jsonlib/supabase.tsmodules/widget-snapshot/app.plugin.jspackage.jsonservices/maestroOnThisDaySeed.tsutils/ai/client.ts
💤 Files with no reviewable changes (2)
- utils/ai/client.ts
- components/EntryCard/index.tsx
| - 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" |
There was a problem hiding this comment.
🎯 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:
- 1: https://deepwiki.com/mobile-dev-inc/maestro-docs/6.1-conditional-execution
- 2: https://docs.maestro.dev/maestro-flows/flow-control-and-logic/conditions.md
- 3: https://docs.maestro.dev/maestro-flows/flow-control-and-logic/conditions
- 4: https://docs.maestro.dev/maestro-flows/flow-control-and-logic/wait-commands
- 5: https://docs.maestro.dev/maestro-flows/flow-control-and-logic/flow-control-and-logic-overview?ask=When+should+I+use+automatic+waiting+versus+explicit+wait+commands+in+flows%3F
🏁 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' .maestroRepository: 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.
| 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) |
There was a problem hiding this comment.
📐 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.
| ### [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. |
There was a problem hiding this comment.
📐 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-L480README.md#L434-L436README.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.



Summary
whats-new-1.6.0中英文文案EmotionDiaryWidgetPBXGroup,避免在ios/根目录找不到源文件knip.json的EntryCard/**ignore,恢复yarn verify:governanceedit-entry-close与关闭兜底,降低 UAT 抖动Test plan
yarn verify:governance(knip / depcruise / boundaries PASS)eas build --platform ios --profile production,确认 Widget 源文件路径错误已消失whats-new-1.6.0-zh.md/whats-new-1.6.0-en.mdMade with Cursor
Summary by CodeRabbit
New Features
Bug Fixes
Documentation