Skip to content

feat(mobile): show the pull request in PR-watch monitor rows - #21412

Open
voida6 wants to merge 1 commit into
pingdotgg:mainfrom
voida6:feat/mobile-pr-monitor-rows
Open

voida6 wants to merge 1 commit into
pingdotgg:mainfrom
voida6:feat/mobile-pr-monitor-rows

Conversation

@voida6

@voida6 voida6 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Related to #21359. Now a single commit on main, on top of #21395 (which superseded #21305). The device screenshots below were taken on the #21305 version of the sheet; the row code is unchanged, and after the port the unit test, mobile typecheck, lint and format pass.

Problem

The mobile Background work sheet lists a PR-watch monitor as "Monitor" with a label, so you cannot tell which pull request is being watched or open it.

Fix

A PR-watch monitor row now shows the PR title, the number coloured by state, "Watching · Open/Draft/...", and a checks summary. Tapping it opens the PR on GitHub. Other rows (subagent, command, other monitors) are unchanged, and a link with no snapshot yet still renders and stays tappable.

No contract change: the monitor task id is already pull-request-watch:<host/repo#number>, and the thread shell already carries pullRequests, so the client looks the link up with one shared helper (findPullRequestForWatchTask) next to the code that builds the id. Colours and check icons reuse pullRequestStatus.ts.

Evidence

before and after

Tapping the #21305 row on a Galaxy S25 opens the real PR in the GitHub app:

tap opens the PR

  • Unit test for the task-id to PR mapping, including the same number in another repository not matching.
  • Mobile typecheck clean for the touched files.
  • Verified on a real S25 against a real server.

Not covered: web banner parity (inline link button using the same helper, about 15 lines), and merged/closed/failing-check colours were not captured on device.

Sent by Ravdeep's agent: Claude Sonnet 5.5 in Claude Code, running in T3 Code.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Oct 19, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — This adds a new mobile background-work screen and interaction flow, including PR metadata rendering, child-thread navigation, and opening PRs externally. The feature changes existing background-status behavior and introduces substantial user-facing runtime logic, so it merits human review.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2845ce86-bd22-4f6f-981b-3a07ea87b6a1
📥 Commits

Reviewing files that changed from the base of the PR and between 9aa7a35 and 5da517f.

📒 Files selected for processing: 3
  • apps/mobile/src/features/threads/ThreadBackgroundWorkSheet.tsx
  • packages/shared/src/orchestrationV2PendingBackgroundWork.test.ts
  • packages/shared/src/orchestrationV2PendingBackgroundWork.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Walkthrough

The shared package now maps pull-request watch-task IDs to linked pull requests. The mobile background work sheet uses those links to display pull-request details, status, and checks, with an option to open the pull request externally.

Changes: Pull-request monitoring

Layer / File(s) Summary
Watch-task lookup
packages/shared/src/orchestrationV2PendingBackgroundWork.ts, packages/shared/src/orchestrationV2PendingBackgroundWork.test.ts
Adds findPullRequestForWatchTask and uses the shared watch-task ID helper. Tests cover matching links, unknown and non-watch IDs, and repository mismatches.
Mobile monitor rows
apps/mobile/src/features/threads/ThreadBackgroundWorkSheet.tsx
The sheet renders a pull-request row for matching monitor tasks and retains the existing row for other tasks. The pull-request row shows available details and status, supports missing snapshot data, and opens the URL externally with an alert on failure.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant ThreadBackgroundWorkSheet
  participant findPullRequestForWatchTask
  participant PullRequestMonitorRow
  participant ExternalLinkOpener
  ThreadBackgroundWorkSheet->>findPullRequestForWatchTask: Resolve task ID against pull-request links
  ThreadBackgroundWorkSheet->>PullRequestMonitorRow: Render matching pull-request details
  PullRequestMonitorRow->>ExternalLinkOpener: Open pull-request URL
Loading

Suggested reviewers: maria-rcks, t3dotgg

Merge Risk: ⚪ Minimal · up to 5da51

The pull-request monitor rows are ready to merge after normal checks; no concrete issue remains that requires a fix.

Security architecture risk: 🔵 Low · up to 5da51

The change adds a tap target for already linked pull requests without demonstrating broader access or new privileges. Handling of unexpected link destinations remains partly unverified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated exposure is user-triggered navigation from a displayed thread into the device's URL-handler boundary. Row rendering does not automatically open links. Accepted schemes and the authority exercised by downstream handlers remain outside verified coverage.

Security Findings and Attack Paths

  • inferred — No materially new attacker-controlled path was established. Before this PR, linked-pull-request menus already offered an unconditional browser action for the same stored URL, including snapshotless links. The new monitor row adds another trigger for that existing handoff, not a new URL producer or privileged operation.

Trust Boundaries and Controls

  • observed — Task matching establishes correspondence with a thread's linked pull request, not destination safety. The unchanged link schema accepts a nonempty URL, and tryOpenExternalUrl forwards it directly to Linking.openURL without application-level scheme or authority validation. Its pull-request target labels error reporting rather than enforcing a navigation policy.

Hardening Proposals

  • proposed — As separate hardening of the existing navigation boundary, consider enforcing expected web URL schemes for pull-request destinations, with explicit support for enterprise hosts. This is not a verified vulnerability introduced by this PR.
Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description explains the problem, implementation, verification, screenshots, and known limitations. However, it does not provide explicit maintainer approval for the stated scope or explain why th… Add the triaged issue or discussion link with the explicit maintainer approval comment, or explain why this focused change qualifies for the approval exemption. Rename the sections to "## Change" and "## Verification" to match the repositor…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the main change: displaying pull-request details in mobile PR-watch monitor rows.
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.
Full details: Description check

Explanation

The description explains the problem, implementation, verification, screenshots, and known limitations. However, it does not provide explicit maintainer approval for the stated scope or explain why the change qualifies for an exemption. It also uses "Fix" and "Evidence" instead of the template's "Change" and "Verification" headings.

Resolution

Add the triaged issue or discussion link with the explicit maintainer approval comment, or explain why this focused change qualifies for the approval exemption. Rename the sections to "## Change" and "## Verification" to match the repository template.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@voida6
voida6 force-pushed the feat/mobile-pr-monitor-rows branch from 9aa7a35 to 5da517f Compare October 21, 2026 05:06
@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Oct 21, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant