Skip to content

Start Skill Mobile Prs View#729

Open
arul28 wants to merge 6 commits into
mainfrom
ade/start-skill-mobile-prs-view-c2520191
Open

Start Skill Mobile Prs View#729
arul28 wants to merge 6 commits into
mainfrom
ade/start-skill-mobile-prs-view-c2520191

Conversation

@arul28

@arul28 arul28 commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

Describe the change.

What Changed

Key files and behaviors.

Validation

How you tested.

Risks

Anything to watch.

ADE   Open in ADE  ·  ade/start-skill-mobile-prs-view-c2520191 branch  ·  PR #729

Summary by CodeRabbit

  • New Features

    • Added PR lifecycle notifications for opening, reopening, closing, and merging.
    • PR updates now appear more prominently across desktop and iOS, including push alerts, Live Activities, widgets, and PR detail screens.
    • PR details now show a compact summary with status, checks, diff stats, commits, and better timeline navigation.
  • Bug Fixes

    • Improved PR message rendering and normalization for more consistent display.
    • Fixed notification tone and alert handling so PR events are classified more accurately.

Greptile Summary

This PR adds PR lifecycle notifications and a richer mobile PR view. The main changes are:

  • Repo-scoped push alerts and Live Activity rows for PR events.
  • iOS deep links for repo-scoped PR notifications.
  • PR detail screen updates for overview, activity, markdown, and timeline navigation.
  • Widget and shared activity payload support for PR rows.
  • Tests and docs for the new PR notification and mobile flows.

Confidence Score: 4/5

The repo-scoped PR navigation path can still open or hydrate the wrong PR.

The push payload now carries owner and repo, but the iOS detail screen drops that scope during reload, and the fallback GitHub lookup still matches duplicate PR numbers across repositories.

apps/ios/ADE/Views/PRs/PrDetailScreen.swift

T-Rex T-Rex Logs

What T-Rex did

  • Tried the narrow Swift/Xcode execution path for repo-scoped routing, but swift and xcodebuild were unavailable in the Linux sandbox.
  • Tried to run a narrow Swift fallback harness, but the local Swift toolchain was not installed and the harness could not execute; the repository code did not run.
  • Reviewed the UI proof showing the desktop PR surface with browser mock data, captured in before and after videos and supported by logs.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
apps/ade-cli/src/services/push/pushPublisherService.ts Adds PR lifecycle alerts, repo-scoped activity IDs, repo-scoped deep links, PR Live Activity rows, and expiry cleanup.
apps/ios/ADE/App/DeepLinkRouter.swift Routes repo-scoped PR URLs locally and stores repo owner and repo name in PR navigation requests.
apps/ios/ADE/Views/PRs/PrDetailScreen.swift Updates the PR detail flow, but reload and fallback lookup can lose repo scope for duplicate PR numbers.
apps/ios/ADE/Views/PRs/PrHelpers.swift Adds repo-aware PR navigation helpers for matching scoped PR requests.
apps/ios/ADE/Shared/ADEAgentActivityAttributes.swift Extends Live Activity content state with compact PR rows and lenient decoding.

Comments Outside Diff (2)

  1. apps/ios/ADE/Views/PRs/PrDetailScreen.swift, line 1303-1308 (link)

    P1 Scoped Route Loses Repo

    When a repo-scoped PR notification opens a synthetic github-pr-number:<n> route, this reload path calls prDetailRouteListItem without the requested owner and repo. If two tracked repositories both have PR #42, a later reload can resolve only by number and leave the detail screen on the wrong PR or no PR.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/ios/ADE/Views/PRs/PrDetailScreen.swift
    Line: 1303-1308
    
    Comment:
    **Scoped Route Loses Repo**
    
    When a repo-scoped PR notification opens a synthetic `github-pr-number:<n>` route, this reload path calls `prDetailRouteListItem` without the requested owner and repo. If two tracked repositories both have PR `#42`, a later reload can resolve only by number and leave the detail screen on the wrong PR or no PR.
    
    How can I resolve this? If you propose a fix, please make it concise.

    Fix in Claude Code

  2. apps/ios/ADE/Views/PRs/PrDetailScreen.swift, line 1445-1450 (link)

    P1 Fallback Match Ignores Repo

    The fallback GitHub item lookup scans all repo PRs and accepts the first matching githubPrNumber without checking the scoped owner and repo. Tapping a notification for ownerA/repoA#42 can hydrate the detail screen with ownerB/repoB#42 when that item appears first.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/ios/ADE/Views/PRs/PrDetailScreen.swift
    Line: 1445-1450
    
    Comment:
    **Fallback Match Ignores Repo**
    
    The fallback GitHub item lookup scans all repo PRs and accepts the first matching `githubPrNumber` without checking the scoped owner and repo. Tapping a notification for `ownerA/repoA#42` can hydrate the detail screen with `ownerB/repoB#42` when that item appears first.
    
    How can I resolve this? If you propose a fix, please make it concise.

    Fix in Claude Code

Fix All in Claude Code

Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
apps/ios/ADE/Views/PRs/PrDetailScreen.swift:1303-1308
**Scoped Route Loses Repo**

When a repo-scoped PR notification opens a synthetic `github-pr-number:<n>` route, this reload path calls `prDetailRouteListItem` without the requested owner and repo. If two tracked repositories both have PR `#42`, a later reload can resolve only by number and leave the detail screen on the wrong PR or no PR.

### Issue 2 of 2
apps/ios/ADE/Views/PRs/PrDetailScreen.swift:1445-1450
**Fallback Match Ignores Repo**

The fallback GitHub item lookup scans all repo PRs and accepts the first matching `githubPrNumber` without checking the scoped owner and repo. Tapping a notification for `ownerA/repoA#42` can hydrate the detail screen with `ownerB/repoB#42` when that item appears first.

Reviews (5): Last reviewed commit: "ship: iteration 4 address PR activity id..." | Re-trigger Greptile

@cursor

cursor Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ade Ignored Ignored Preview Jul 8, 2026 2:56am

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 4 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e7a34a47-31c3-4622-a86c-d6fa67820908

📥 Commits

Reviewing files that changed from the base of the PR and between d33450b and 6c81453.

📒 Files selected for processing (10)
  • apps/ade-cli/src/services/push/pushPublisherService.test.ts
  • apps/ade-cli/src/services/push/pushPublisherService.ts
  • apps/desktop/src/main/services/prs/prAsync.test.ts
  • apps/desktop/src/main/services/prs/prPollingService.ts
  • apps/ios/ADE/App/DeepLinkRouter.swift
  • apps/ios/ADE/Services/SyncService.swift
  • apps/ios/ADE/Views/PRs/PrDetailScreen.swift
  • apps/ios/ADE/Views/PRs/PrHelpers.swift
  • apps/ios/ADETests/ADETests.swift
  • apps/ios/ADEWidgets/ADEAgentActivityWidget.swift
📝 Walkthrough

Walkthrough

This PR introduces PR lifecycle notification kinds (opened, reopened, closed, merged) across the desktop polling service, shared types, and toast presentation. The ade-cli push publisher now tracks and expires PR activity for iOS Live Activity content state. iOS ActivityKit attributes gain a PullRequest model, and the widget/PR detail screens are updated to render PR rows, a new summary section with commit expansion, and timeline scroll-to-commit navigation, alongside a markdown normalization refactor.

Changes

ade-cli push publisher PR lifecycle support

Layer / File(s) Summary
Bootstrap PR event payload fields
apps/ade-cli/src/bootstrap.ts
emitPrEvent now includes repoOwner/repoName in PushPrNotification, with an updated fan-out comment.
PR activity state and content-state builder
apps/ade-cli/src/services/push/pushPublisherService.ts
Adds PrLiveActivityState, PR_LIVE_ACTIVITY_MAX, and extends buildAgentRunsContentState to accept/emit prs.
PR activity tracking, expiry, and Live Activity planning
apps/ade-cli/src/services/push/pushPublisherService.ts
Adds prActivities/prExpiryTimer, pruning/expiry scheduling, integrates PR activity into planLiveActivity, refactors onPrNotification to record state and alerts, and updates cleanup/wiring.
Push publisher tests
apps/ade-cli/src/services/push/pushPublisherService.test.ts
New test covers PR notification push alerts, multi-project Live Activity aggregation, detachment, and expiry-driven end state.

Desktop PR lifecycle notification kinds

Layer / File(s) Summary
Type expansion
apps/desktop/src/shared/types/prs.ts
PrNotificationKind adds opened, reopened, closed, merged.
Lifecycle detection in polling
apps/desktop/src/main/services/prs/prPollingService.ts
Adds lifecycleNotificationKind and shouldNotifyStatusKind, and combines lifecycle/status kinds into the notification loop.
Toast tone mapping
apps/desktop/src/renderer/components/app/prToastPresentation.ts
getPrToastTone maps new lifecycle kinds to "success".

iOS ActivityKit PR content state and widget rendering

Layer / File(s) Summary
PullRequest content-state model
apps/ios/ADE/Shared/ADEAgentActivityAttributes.swift
Adds prs field, PullRequest struct, and PullRequestPhase enum with presentation helpers.
Widget PR rows and presentation logic
apps/ios/ADEWidgets/ADEAgentActivityWidget.swift
Adds prs/primaryPr/primarySymbol/glanceCount, PR-aware deep links, and PullRequestActivityRow rendering.
Decoding test
apps/ios/ADETests/ADETests.swift
Adds a PR-row decoding test and unrelated fixture field additions.

iOS PR detail markdown normalization and summary/timeline UI

Layer / File(s) Summary
Markdown normalization helper
apps/ios/ADE/Views/PRs/PrHelpers.swift
Adds normalizePrMarkdownText to normalize newline/escape sequences.
PrMarkdownRenderer refactor
apps/ios/ADE/Views/PRs/CreatePrWizardView.swift, apps/ios/ADE/Views/PRs/PrDetailActivityTab.swift
Replaces cached AttributedString rendering with normalized-markdown rendering across review threads, reply bubbles, and timeline comments.
PR detail summary section
apps/ios/ADE/Views/PRs/PrDetailOverviewTab.swift
Adds PrDetailSummarySection with status/checks/diff/commit metrics and expandable commit rows.
Detail screen integration and scroll navigation
apps/ios/ADE/Views/PRs/PrDetailScreen.swift
Wires summary section, replaces hero card, adds header meta text, and adds scroll-to-commit timeline navigation.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

  • arul28/ADE#207: The main PR's iOS Live Activity content-state PR data is consumed by this PR's iOS widget/Live Activity rendering and deep-link logic.
  • arul28/ADE#670: Extends desktop PR lifecycle notification kinds (merged/closed) that this PR also reacts to via pr-notification handling.
  • arul28/ADE#710: Both modify pushPublisherService.ts's buildAgentRunsContentState/Live Activity payload construction at overlapping code points.

Suggested labels: desktop, ios

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and doesn’t clearly describe the main changes beyond a broad mobile PR view update. Use a more specific title like "Add mobile PR detail views and PR lifecycle notifications".
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ade/start-skill-mobile-prs-view-c2520191

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.

@arul28

arul28 commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

@copilot review but do not make fixes

Comment thread apps/ade-cli/src/services/push/pushPublisherService.ts Outdated
Comment thread apps/ios/ADE/Views/PRs/PrDetailScreen.swift
@arul28

arul28 commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Comment thread apps/ade-cli/src/services/push/pushPublisherService.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 19eeda873b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/ade-cli/src/services/push/pushPublisherService.ts
Comment thread apps/ios/ADEWidgets/ADEAgentActivityWidget.swift
@arul28

arul28 commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d33450b8ea

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/ade-cli/src/services/push/pushPublisherService.ts
Comment thread apps/ios/ADE/Views/PRs/PrDetailScreen.swift Outdated

@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

🤖 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/ade-cli/src/services/push/pushPublisherService.ts`:
- Around line 588-589: The start alert in PushPublisherService undercounts PR
activity because prActivityCount is taken from contentState.prs.length, which is
capped. Update the start-alert count in pushPublisherService to use the uncapped
total from contentState.activeCount (or the equivalent uncapped source already
used in the run path) so the `${prActivityCount} pull requests updated` message
reflects the real number when more than two PRs are tracked.

In `@apps/desktop/src/main/services/prs/prPollingService.ts`:
- Around line 309-318: The polling flow in prPollingService is clearing tracked
PR state on a transient empty poll, which causes the next non-empty poll to
reclassify existing PRs as newly opened. Update the snapshot management around
the polling/refresh logic that feeds lastByPrId so an empty discovery tick does
not overwrite the previous map while initialized remains true; only reset the
stored PR set when the polling state is intentionally reinitialized.

In `@apps/ios/ADE/Views/PRs/PrDetailScreen.swift`:
- Around line 1096-1107: The event matching in PrDetailScreen.eventMatches can
falsely match any .commit event when both commit.shortSha and commit.sha are
empty because the search string becomes empty. Update eventMatches to explicitly
return false when there is no usable SHA (before checking
localizedCaseInsensitiveContains), and keep matching only against non-empty
shortSha/fullSha so focusCommitInTimeline doesn’t scroll to the wrong timeline
row.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7a98ddba-b9c5-48f9-8db0-f8b85e786b66

📥 Commits

Reviewing files that changed from the base of the PR and between 93dbb6d and d33450b.

⛔ Files ignored due to path filters (2)
  • docs/features/pull-requests/README.md is excluded by !docs/**
  • docs/features/sync-and-multi-device/ios-companion.md is excluded by !docs/**
📒 Files selected for processing (14)
  • apps/ade-cli/src/bootstrap.ts
  • apps/ade-cli/src/services/push/pushPublisherService.test.ts
  • apps/ade-cli/src/services/push/pushPublisherService.ts
  • apps/desktop/src/main/services/prs/prPollingService.ts
  • apps/desktop/src/renderer/components/app/prToastPresentation.ts
  • apps/desktop/src/shared/types/prs.ts
  • apps/ios/ADE/Shared/ADEAgentActivityAttributes.swift
  • apps/ios/ADE/Views/PRs/CreatePrWizardView.swift
  • apps/ios/ADE/Views/PRs/PrDetailActivityTab.swift
  • apps/ios/ADE/Views/PRs/PrDetailOverviewTab.swift
  • apps/ios/ADE/Views/PRs/PrDetailScreen.swift
  • apps/ios/ADE/Views/PRs/PrHelpers.swift
  • apps/ios/ADETests/ADETests.swift
  • apps/ios/ADEWidgets/ADEAgentActivityWidget.swift

Comment thread apps/ade-cli/src/services/push/pushPublisherService.ts Outdated
Comment thread apps/desktop/src/main/services/prs/prPollingService.ts
Comment thread apps/ios/ADE/Views/PRs/PrDetailScreen.swift
@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/arul28s-projects?upgradeToPro=build-rate-limit

@arul28

arul28 commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Comment thread apps/ade-cli/src/services/push/pushPublisherService.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2dce34e68f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/ade-cli/src/services/push/pushPublisherService.ts Outdated
Comment thread apps/ios/ADEWidgets/ADEAgentActivityWidget.swift
@cursor

cursor Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@arul28

arul28 commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 006ea879bc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/ios/ADE/Views/PRs/PrHelpers.swift Outdated
Comment thread apps/ios/ADEWidgets/ADEAgentActivityWidget.swift
@arul28

arul28 commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review

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