Skip to content

RU-T50 Bug fix#251

Merged
ucswift merged 2 commits into
masterfrom
develop
Jun 19, 2026
Merged

RU-T50 Bug fix#251
ucswift merged 2 commits into
masterfrom
develop

Conversation

@ucswift

@ucswift ucswift commented Jun 19, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores
    • Updated Live Activity provisioning configuration to use explicit team identifier instead of conditional environment-based settings.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@ucswift, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 46 minutes and 22 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

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 credits.

🚦 How do rate limits work?

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

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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bf15a116-1d54-4f36-8160-d155538f50ff

📥 Commits

Reviewing files that changed from the base of the PR and between 46beadd and 9e3c560.

📒 Files selected for processing (1)
  • plugins/withCheckInLiveActivity.js
📝 Walkthrough

Walkthrough

The withCheckInLiveActivity Expo config plugin no longer conditionally writes the com.apple.developer.live-activity entitlement based on enableLiveActivityEntitlement. Instead, it always writes NSSupportsLiveActivities = true to the widget's Info.plist. The app.config.ts removes the environment-conditional flag and supplies a fixed teamId.

Changes

Live Activity Entitlement and Plugin Config

Layer / File(s) Summary
Remove entitlement write, always set NSSupportsLiveActivities
plugins/withCheckInLiveActivity.js, app.config.ts
withEntitlementsPlist import removed; conditional com.apple.developer.live-activity entitlement write deleted; NSSupportsLiveActivities = true written to widget Info.plist unconditionally. app.config.ts drops enableLiveActivityEntitlement and adds a fixed teamId (QKQVAJMTCN) to plugin options.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Resgrid/Unit#237: Modifies the same plugin's Xcode wiring around DEVELOPMENT_TEAM, directly related to the teamId propagation introduced here.
  • Resgrid/Unit#238: Also modifies app.config.ts and plugins/withCheckInLiveActivity.js around teamId and enableLiveActivityEntitlement handling in the iOS build.
  • Resgrid/Unit#250: Changes widget extension code-signing/provisioning settings in the same plugin file, overlapping with the teamId/widget target configuration touched here.

Suggested reviewers

  • github-actions

🐇 No more checking the env, no more entitlement gate,
Just NSSupportsLiveActivities = true — isn't that great?
A teamId fixed in stone, no conditions to bear,
The widget Info.plist gets the truth, plain and square.
Hop hop! Less code, more clarity in the air! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'RU-T50 Bug fix' is vague and does not clearly convey what the actual change is, using a generic ticket reference instead of describing the specific fix. Replace with a descriptive title that explains the actual change, such as 'Remove conditional Live Activity entitlement logic in Expo config' or 'Refactor Live Activity entitlement handling to always enable in widget'.
✅ 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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

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 and usage tips.

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

🧹 Nitpick comments (1)
plugins/withCheckInLiveActivity.js (1)

1-1: ⚡ Quick win

Rename this plugin file to lowercase-hyphenated form.

plugins/withCheckInLiveActivity.js violates the repository path convention; rename it to something like plugins/with-check-in-live-activity.js and update the plugin path in app.config.ts.

As per coding guidelines, **/*: Directory and file names should be lowercase and hyphenated (e.g., user-profile, chat-screen).

🤖 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 `@plugins/withCheckInLiveActivity.js` at line 1, Rename the file
`plugins/withCheckInLiveActivity.js` to `plugins/with-check-in-live-activity.js`
to follow the repository convention of using lowercase-hyphenated names for
files and directories. After renaming the file, update the import or require
statement in `app.config.ts` that references this plugin to point to the new
lowercase-hyphenated filename instead of the camelCase version.

Source: Coding guidelines

🤖 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 `@plugins/withCheckInLiveActivity.js`:
- Line 302: The early return at line 431 when a widget target already exists
skips the DEVELOPMENT_TEAM and ProvisioningStyle signing patches that are
located at lines 516-572, causing existing widget targets to retain stale
signing settings instead of applying the updated teamId from app.config.ts.
Refactor the code to separate the widget target creation check from the signing
patches application - the early return should only prevent duplicate target
creation, but move the DEVELOPMENT_TEAM and ProvisioningStyle patches outside or
after the creation check so that the signing settings are applied to both newly
created and existing widget targets.
- Line 1: The plugin currently prevents writing the invalid
com.apple.developer.live-activity entitlement going forward, but existing
projects may still have this stale key in their native entitlements file. Add a
cleanup mod using the withInfoPlist function (which is already imported) that
actively removes the com.apple.developer.live-activity key from the Info.plist
during prebuild to ensure old projects get cleaned up when running the plugin,
preventing the archive-breaking issues documented around lines 310–314. Execute
this cleanup before any other modifications to the entitlements.

---

Nitpick comments:
In `@plugins/withCheckInLiveActivity.js`:
- Line 1: Rename the file `plugins/withCheckInLiveActivity.js` to
`plugins/with-check-in-live-activity.js` to follow the repository convention of
using lowercase-hyphenated names for files and directories. After renaming the
file, update the import or require statement in `app.config.ts` that references
this plugin to point to the new lowercase-hyphenated filename instead of the
camelCase version.
🪄 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

Run ID: 94b513c3-9e10-450c-b7c9-3de1e5a73d2c

📥 Commits

Reviewing files that changed from the base of the PR and between 326d418 and 46beadd.

📒 Files selected for processing (2)
  • app.config.ts
  • plugins/withCheckInLiveActivity.js
💤 Files with no reviewable changes (1)
  • app.config.ts

@@ -1,4 +1,4 @@
const { withDangerousMod, withInfoPlist, withEntitlementsPlist, withXcodeProject } = require('expo/config-plugins');
const { withDangerousMod, withInfoPlist, withXcodeProject } = require('expo/config-plugins');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Find stale Live Activity entitlement keys in native entitlement files and confirm plugin cleanup coverage.
# Expected after the fix: no *.entitlements file contains com.apple.developer.live-activity; the plugin may only mention it in comments/deletion logic.

fd -e entitlements -x sh -c 'echo "== $1 =="; rg -n "com\.apple\.developer\.live-activity" "$1" || true' sh {}

fd -i 'withCheckInLiveActivity.js' -x sh -c 'echo "== $1 =="; rg -n -C3 "withEntitlementsPlist|com\.apple\.developer\.live-activity|NSSupportsLiveActivities" "$1"' sh {}

Repository: Resgrid/Unit

Length of output: 961


🏁 Script executed:

head -5 plugins/withCheckInLiveActivity.js

Repository: Resgrid/Unit

Length of output: 211


🏁 Script executed:

find . -name "*.entitlements" -type f 2>/dev/null | head -20

Repository: Resgrid/Unit

Length of output: 38


Add cleanup logic to remove stale invalid entitlements.

The current change prevents writing com.apple.developer.live-activity going forward, but projects that ran earlier plugin versions may still have this key in their native entitlements. Since lines 310–314 document that this key is invalid and archive-breaking, add a mod to actively delete it during prebuild to clean up existing projects:

Proposed cleanup
-const { withDangerousMod, withInfoPlist, withXcodeProject } = require('expo/config-plugins');
+const { withDangerousMod, withEntitlementsPlist, withInfoPlist, withXcodeProject } = require('expo/config-plugins');

@@
   config = withInfoPlist(config, (config) => {
     config.modResults.NSSupportsLiveActivities = true;
     return config;
   });
+
+  config = withEntitlementsPlist(config, (config) => {
+    delete config.modResults['com.apple.developer.live-activity'];
+    return config;
+  });
🤖 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 `@plugins/withCheckInLiveActivity.js` at line 1, The plugin currently prevents
writing the invalid com.apple.developer.live-activity entitlement going forward,
but existing projects may still have this stale key in their native entitlements
file. Add a cleanup mod using the withInfoPlist function (which is already
imported) that actively removes the com.apple.developer.live-activity key from
the Info.plist during prebuild to ensure old projects get cleaned up when
running the plugin, preventing the archive-breaking issues documented around
lines 310–314. Execute this cleanup before any other modifications to the
entitlements.

Comment thread plugins/withCheckInLiveActivity.js
@ucswift

ucswift commented Jun 19, 2026

Copy link
Copy Markdown
Member Author

Approve

@github-actions github-actions 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.

This PR is approved.

@ucswift ucswift merged commit 0a94c8f into master Jun 19, 2026
19 of 20 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