Skip to content

chore: sync upstream PR #8715 - fix(cli): keep a storyboard CAPBridgeViewController subclass when migrating to UIScene - #252

Open
riderx wants to merge 3 commits into
plusfrom
sync/upstream-pr-8715
Open

riderx wants to merge 3 commits into
plusfrom
sync/upstream-pr-8715

Conversation

@riderx

@riderx riderx commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Upstream PR Sync

This PR syncs changes from an external contributor's PR on the official Capacitor repository.

Original PR

  • PR: #8715
  • Title: fix(cli): keep a storyboard CAPBridgeViewController subclass when migrating to UIScene
  • Author: @resp76

Automation

  • CI will run automatically
  • Manual review is required before merging
  • Auto-merge is disabled until an equivalent review gate is available
  • A new release will be published automatically

Synced from upstream by Capacitor+ Bot


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff Turn on auto-fix

@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 18 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: a151b0ae-6819-4fc1-abbd-3aa936b2f337
Commits

Reviewing files that changed from the base of the PR and between 4f9459d and 30e12b1.

Files selected for processing: 2

  • cli/src/tasks/migrate-uiscene.ts
  • cli/test/migrate-uiscene-storyboard.spec.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions

Copy link
Copy Markdown

Beta npm build

Maintainers can publish one Capacitor Plus workspace package from this PR to npm for fast testing.

Comment /publish-beta <package> after the PR checks are green.

Examples:

/publish-beta core
/publish-beta cli
/publish-beta @capacitor-plus/core

If exactly one workspace package changed, /publish-beta without a package will use that package.

Packages:

  • core (@capacitor-plus/core)
  • cli (@capacitor-plus/cli)
  • android (@capacitor-plus/android)
  • ios (@capacitor-plus/ios)

The workflow will:

  • publish a prerelease package on the beta tag
  • update this comment with the install command

Security note: beta publish is only enabled for branches inside this repository.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T06:06:43.414297Z 2aef36b New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 385d2ecdc7

ℹ️ 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 CHANGELOG.md Resolved
@riderx
riderx force-pushed the sync/upstream-pr-8715 branch 5 times, most recently from a9cef46 to a680026 Compare November 19, 2026 06:03

@TorichanCapgo TorichanCapgo 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.

VERDICT: READY at 1d60c59

Jose gate, full review at HEAD (CodeRabbit and cubic skipped from limits, this review stands in). Author riderx (Martin), upstream author @resp76. Live: OPEN, not draft, base plus, CLEAN, 0 behind, 7 ahead. All checks finished green: lint, setup, test-core, test-cli, test-android, test-ios (Xcode 26.0), Socket, comment. Nothing pending. 0 unresolved threads (the one Codex P1 about changelog whitespace is fixed: HEAD is "restore CI-managed changelogs from plus" and the PR touches only 2 files). No CHANGES_REQUESTED. No workflow changes, no secrets, no toolchain bumps.

Faithfulness against ionic-team#8715 (head ad39c29, 2 files): I diffed the two patches. They are identical except hunk line offsets (cli/src/tasks/migrate-uiscene.ts is a few lines different in plus) and one context line in the __testables export, where plus has findMatchingBrace and lacks extractConfigurationForConnecting. The added code (getStoryboardBridgeSubclass, useBridgeSubclass, the storyboard lookup in migrateToUIScene, the logger.info) and the new cli/test/migrate-uiscene-storyboard.spec.ts are byte for byte the upstream content.

Logic: reads Main.storyboard only when it exists, finds the initial view controller id, takes its customClass if it is a valid Swift identifier and not CAPBridgeViewController, and swaps rootViewController = CAPBridgeViewController() in the SceneDelegate template. Returns null (current behavior) otherwise. Behavior matches the description.

Tests: the spec runs the real functions against the shipped ios-spm-template storyboard and SceneDelegate (null for shipped, custom class found, no initial controller, swap result). Behavioral, not source regexes. test-cli and test-ios both passed at HEAD (test-ios is part of CI here).

Blockers: none.

Nits:

  1. The storyboard is parsed with regexes (upstream's choice). A storyboard with the initialViewController attribute after a reordered tag is handled, but a customClass on a navigation controller wrapper would be missed. Acceptable, same as upstream.
  2. The PR body is the standard sync template, fine.

@riderx
riderx force-pushed the sync/upstream-pr-8715 branch 2 times, most recently from 8da5cf4 to 021c709 Compare November 21, 2026 06:04

@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: 021c709c1f

ℹ️ 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 on lines +9 to +12
const SHIPPED_STORYBOARD = readFileSync(
resolve(REPO_ROOT, 'ios-spm-template/App/App/Base.lproj/Main.storyboard'),
'utf-8',
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Use legacy UIKit fixtures instead of the current SwiftUI templates

This test suite reads Main.storyboard at module initialization, but that file no longer exists in the shipped SPM template, so Jest will fail with ENOENT before running any tests. A repository-wide file search and inspection of the asset packer confirm that it is not generated either. The current SceneDelegate.swift is also an empty SwiftUI delegate without the replacement target, so the final assertion would still fail after fixing the storyboard input. Use self-contained legacy UIKit fixtures for both inputs so these tests can exercise the migration without depending on templates that have already moved to SwiftUI.

Useful? React with 👍 / 👎.

@riderx
riderx force-pushed the sync/upstream-pr-8715 branch from 021c709 to aea372d Compare November 22, 2026 06:04

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread cli/src/tasks/migrate-uiscene.ts Resolved

@cubic-dev-ai cubic-dev-ai 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.

0 issues found across 2 files (changes from recent commits).

View guided diff | Turn on auto-fix | Re-trigger cubic

@cubic-dev-ai cubic-dev-ai 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.

0 issues found across 1 file (changes from recent commits).

View guided diff | Turn on auto-fix | Re-trigger cubic

resp76 and others added 2 commits November 23, 2026 06:05
…rating to UIScene

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit ad39c29)
@riderx
riderx force-pushed the sync/upstream-pr-8715 branch from 037af60 to 2aef36b Compare November 23, 2026 06:05

@cubic-dev-ai cubic-dev-ai 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.

0 issues found across 7 files (changes from recent commits).

View guided diff | Turn on auto-fix | Re-trigger cubic

…esync

Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>

@cubic-dev-ai cubic-dev-ai 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.

0 issues found across 7 files (changes from recent commits).

View guided diff | Turn on auto-fix | Re-trigger cubic

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.

4 participants