Skip to content

Remove the Capacitor iOS shell - #121

Merged
Programcode merged 2 commits into
mainfrom
native-ios/01-remove-capacitor
Oct 8, 2026
Merged

Programcode merged 2 commits into
mainfrom
native-ios/01-remove-capacitor

Conversation

@Programcode

@Programcode Programcode commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

The Capacitor iOS app never shipped, and the native app plan replaces it with an Expo app in later PRs. This PR deletes the shell so the next PRs start from a web-only repo. The website behaves the same as before.

Removed:

  • ios/, capacitor.config.ts, the eight @capacitor/* packages with their 64 transitive dependencies, and the ios:build and ios:open scripts. The lockfile diff is removals plus dev and peer flags; no other package changed version.
  • src/native-runtime.ts, src/native-app-url-listener.ts, and the native branches in src/lib/native.ts. openExternalUrl, getWebAppRedirectUrl and getOAuthRedirectUrl keep their web code paths unchanged. The isNativeApp() guards in src/main.tsx and src/register-service-worker.ts were always false in a browser, so dropping them changes nothing.
  • The .capacitor-native CSS block. The native-safe-* utilities that AppLayout uses stay and compute to the same values as before, because the custom properties they read were only set under the deleted class.
  • The capacitor Vite mode (relative base and the canonical-shell plugin exception).
  • The capacitor://localhost origin from the shared CORS list, the checkout redirect allowlist and workspace invites. The merge does not deploy Edge Functions, so production keeps one dead allowlist entry until the next function deploy.
  • The three tests that asserted the Capacitor origin was allowed (deleted, not inverted), and the docs-check exclusion for ios/App/CapApp-SPM/ with its test case.
  • Mentions in README.md, docs/ and AGENTS.md, and the ios/ entries in tsconfig.node.json and eslint.config.js.

Left alone: the structured data in index.html still lists iOS as an operating system. Website content is out of scope here, and the Expo app will make it true again.

The first commit adds the plan, plans/2026-10-08-native-ios-app.md, with the approved mocks.

GitHub Actions is not running jobs on this account right now (the Quality run on main at 15:19 UTC today failed in two seconds with "recent account payments have failed or your spending limit needs to be increased"). The checks below ran locally at de1bfdb on Node 22.23.2, which proves the local commit and not a CI pass:

  • npm run verify exit 0: docs check, eslint, knip and repo rules, typecheck, 273 Vitest tests in 28 files, 30 collaboration tests, 333 Deno Edge Function tests, production build, service-worker offline test, and 30 Chromium smoke e2e tests.
  • npx tsc --noEmit -p tsconfig.node.json exit 0.
  • git grep -i -E 'capacitor|native-runtime|native-app-url-listener|isNativeApp' outside plans/ and the lockfile prints nothing.

Not run: the full browser suite, WebKit, the database gate (no migrations here), staging, and the production canary.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Platform Support
    • The Capacitor-based iOS app is no longer supported. DebateLab is now described as a browser application or PWA.
  • Sign-In and Checkout
    • Native iOS callback URLs are no longer accepted for sign-in redirects or checkout returns; web callback URLs remain supported.
  • Documentation
    • Platform and setup guides no longer include instructions for building or running the Capacitor iOS app.

Programcode and others added 2 commits October 8, 2026 17:21
Expo app for iPhone and iPad replacing the Capacitor shell, with the
eight approved mock screens and their HTML sources, listed under
Backlog in plans/README.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The Capacitor shell never shipped. This deletes ios/, capacitor.config.ts,
the eight @capacitor/* packages and the ios:build and ios:open scripts, the
native runtime and app URL listener, the native branches in src/lib/native.ts,
the capacitor-native CSS rules, the capacitor Vite mode, and the
capacitor://localhost origin in the CORS, checkout and workspace-invite
allowlists. Docs and tests that described the shell go with it.

The website is unchanged: every removed branch was false on the web, so
external links, OAuth and Stripe redirects, telemetry and the service worker
take the same paths as before.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 8, 2026 17:38
@vercel

vercel Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
debate-navigator Ready Ready Preview Oct 8, 2026 5:39pm UTC
debatelab-staging Ready Ready Preview Oct 8, 2026 5:39pm UTC

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository YAML (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Free
  • Run ID: 35165aa4-0b00-469e-8c0e-3029ca8e62ce
📥 Commits

Reviewing files that changed from the base of the PR and between 40738ea and de1bfdb.

⛔ Files ignored due to path filters (14)
  • ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved is excluded by !**/Package.resolved
  • ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png is excluded by !**/*.png
  • ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png is excluded by !**/*.png
  • ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png is excluded by !**/*.png
  • ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png is excluded by !**/*.png
  • package-lock.json is excluded by !**/package-lock.json
  • plans/2026-10-08-native-ios-app/01-debate-home.png is excluded by !**/*.png
  • plans/2026-10-08-native-ios-app/02-switch-debate.png is excluded by !**/*.png
  • plans/2026-10-08-native-ios-app/03-generated-case.png is excluded by !**/*.png
  • plans/2026-10-08-native-ios-app/04-library.png is excluded by !**/*.png
  • plans/2026-10-08-native-ios-app/05-sparring-live.png is excluded by !**/*.png
  • plans/2026-10-08-native-ios-app/06-scorecard.png is excluded by !**/*.png
  • plans/2026-10-08-native-ios-app/07-ask.png is excluded by !**/*.png
  • plans/2026-10-08-native-ios-app/08-flowchart.png is excluded by !**/*.png
📒 Files selected for processing (48)
  • AGENTS.md
  • README.md
  • capacitor.config.ts
  • docs/README.md
  • docs/architecture.md
  • docs/development.md
  • docs/operations.md
  • eslint.config.js
  • ios/.gitignore
  • ios/App/App.xcodeproj/project.pbxproj
  • ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  • ios/App/App/AppDelegate.swift
  • ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json
  • ios/App/App/Assets.xcassets/Contents.json
  • ios/App/App/Assets.xcassets/Splash.imageset/Contents.json
  • ios/App/App/Base.lproj/LaunchScreen.storyboard
  • ios/App/App/Base.lproj/Main.storyboard
  • ios/App/App/Info.plist
  • ios/App/App/PrivacyInfo.xcprivacy
  • ios/App/CapApp-SPM/.gitignore
  • ios/App/CapApp-SPM/Package.swift
  • ios/App/CapApp-SPM/README.md
  • ios/App/CapApp-SPM/Sources/CapApp-SPM/CapApp-SPM.swift
  • ios/debug.xcconfig
  • package.json
  • plans/2026-10-08-native-ios-app.md
  • plans/2026-10-08-native-ios-app/mocks-debate-prepare-library.html
  • plans/2026-10-08-native-ios-app/mocks-practice.html
  • plans/README.md
  • scripts/check-docs.mjs
  • src/index.css
  • src/lib/native.ts
  • src/main.tsx
  • src/native-app-url-listener.ts
  • src/native-runtime.ts
  • src/register-service-worker.ts
  • src/test/auth/AuthProvider.behavior.test.tsx
  • src/test/checkout-security.test.ts
  • src/test/docs/check-docs.test.ts
  • supabase/README.md
  • supabase/functions/_shared/cors.test.ts
  • supabase/functions/_shared/cors.ts
  • supabase/functions/create-checkout/checkout-security.ts
  • supabase/functions/demo-code-login/index.ts
  • supabase/functions/workspace-invites/index.ts
  • supabase/functions/workspace-invites/index_test.ts
  • tsconfig.node.json
  • vite.config.ts
💤 Files with no reviewable changes (29)
  • ios/debug.xcconfig
  • ios/.gitignore
  • ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  • ios/App/App/Base.lproj/LaunchScreen.storyboard
  • ios/App/App/PrivacyInfo.xcprivacy
  • ios/App/CapApp-SPM/Sources/CapApp-SPM/CapApp-SPM.swift
  • ios/App/App.xcodeproj/project.pbxproj
  • supabase/functions/workspace-invites/index_test.ts
  • ios/App/CapApp-SPM/README.md
  • ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json
  • ios/App/App/Assets.xcassets/Contents.json
  • supabase/functions/_shared/cors.test.ts
  • capacitor.config.ts
  • supabase/functions/workspace-invites/index.ts
  • ios/App/CapApp-SPM/.gitignore
  • ios/App/App/Info.plist
  • src/native-app-url-listener.ts
  • ios/App/App/Assets.xcassets/Splash.imageset/Contents.json
  • scripts/check-docs.mjs
  • src/test/docs/check-docs.test.ts
  • package.json
  • ios/App/App/Base.lproj/Main.storyboard
  • ios/App/CapApp-SPM/Package.swift
  • ios/App/App/AppDelegate.swift
  • docs/development.md
  • supabase/functions/create-checkout/checkout-security.ts
  • src/register-service-worker.ts
  • src/native-runtime.ts
  • src/index.css

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


📝 Walkthrough

Walkthrough

The PR removes the Capacitor iOS app, its web runtime integrations, and its Capacitor-specific CORS and redirect allowances. It updates platform documentation and adds a plan and HTML mockups for a proposed Expo/React Native iOS app.

Changes

iOS platform transition

Layer / File(s) Summary
Remove Capacitor project and build setup
capacitor.config.ts, ios/*, package.json, tsconfig.node.json, eslint.config.js
The Capacitor project files, configuration, build scripts, and dependencies are removed. The TypeScript include list no longer references the Capacitor configuration, and the ESLint ignore list no longer excludes the former iOS public-assets path.
Remove native web runtime behavior
src/index.css, src/lib/native.ts, src/main.tsx, src/native-app-url-listener.ts, src/native-runtime.ts, src/register-service-worker.ts, vite.config.ts, src/test/auth/AuthProvider.behavior.test.tsx
Native runtime and URL handling are removed. Web telemetry and service-worker registration no longer use native-platform checks. Vite uses the / base and applies selfCanonicalShells to all builds.
Remove Capacitor origins from access rules
docs/operations.md, src/test/checkout-security.test.ts, supabase/README.md, supabase/functions/_shared/*, supabase/functions/create-checkout/checkout-security.ts, supabase/functions/demo-code-login/index.ts, supabase/functions/workspace-invites/*
The Capacitor origin is removed from CORS and checkout callback allowlists, and related tests and operational guidance are updated. HTTP(S) redirect validation remains in place.
Update platform documentation and repository references
AGENTS.md, README.md, docs/README.md, docs/architecture.md, docs/development.md, scripts/check-docs.mjs, src/test/docs/check-docs.test.ts
Platform references and iOS workflow guidance are removed from the repository documentation. Documentation checks no longer exclude the former Swift package path.
Add native iOS plan and screen mockups
plans/README.md, plans/2026-10-08-native-ios-app.md, plans/2026-10-08-native-ios-app/*.html
The plan describes the proposed app scope, implementation and release constraints, backend requirements, and verification. Two HTML mockups depict the planned screens and interface elements.

Estimated code review effort: 3 (Moderate) | ~25 minutes

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing.

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

@Programcode

Copy link
Copy Markdown
Owner Author

Website-unchanged evidence at de1bfdb: the production site (main, deployed) against a local production build of this branch served with vite preview, screenshotted by headless Chromium at 1280x900 and at 390x844 with device scale 2, and compared with pixelmatch at threshold 0.1.

Page Desktop Phone
/ 0 differing pixels 0 differing pixels
/login 0 differing pixels 0 differing pixels
/terms 0 differing pixels 0 differing pixels

The images below show production on the left, this branch in the middle, and the pixel diff on the right (a blank diff means no change). The Vercel previews built for both projects but sit behind SSO, so the comparison uses a local build instead.

Home, phone: production | PR build | diff

Home, desktop: production | PR build | diff

Login, phone: production | PR build | diff

@Programcode

Copy link
Copy Markdown
Owner Author

Review record for de1bfdb.

Codex (gpt-6.1-sol, extra-high effort, detached snapshot at de1bfdb): no findings. It checked browser redirects and export links, startup, telemetry, service-worker behaviour, CSS fallbacks, the Vite configuration, the Edge Function allowlists, configuration entries for deleted paths, repository references, lockfile scope and the PR claims.

Opus 5.5 (high effort, extra review): approve with four nits, no blockers. Dispositions:

  • The deleted Capacitor preflight test was the only direct test of the workspace-invites CORS helper. Accepted as is: the Workspace is hidden, and the shared CORS module the helper delegates to keeps its own tests.
  • Importing @capacitor/core used to define a window.Capacitor global on the web, which is now gone. Accepted as is: nothing in the repo reads it, and the user-facing behaviour is unchanged (see the pixel comparison above).
  • The edits outside the plan's file list (tsconfig.node.json, the eslint ignore, the docs-check exclusion with its test case, and the AGENTS.md index line) are dangling-reference cleanup; the test case had to go with the exclusion it checked.
  • The native-* CSS utility names in src/index.css are misleading now but still carry web styling that AppLayout uses. Left for the native-app PRs to rename.

Noted outside this PR: the hosted Supabase Auth redirect allowlist may still hold the old debatelab://auth/callback entry (harmless production config, revisit when the Expo app picks its scheme), and index.html sets viewport-fit=cover without any safe-area CSS, which predates this change.

Copilot reported it was out of review quota, and GitHub Actions did not start any job (billing), so the review of record is the Codex round and the checks are the local run in the description.

@Programcode
Programcode merged commit 8c5da7f into main Oct 8, 2026
8 of 19 checks passed
@Programcode
Programcode deleted the native-ios/01-remove-capacitor branch October 8, 2026 17:50
@Programcode

Copy link
Copy Markdown
Owner Author

Production follow-through for merge commit 8c5da7f:

  • Vercel deployed 8c5da7f to production (debate-navigator, "Deployment has completed") and to the permanent staging site. https://debate.pi-stack.org/ answers 200 with the new bundle.
  • Live production after the deploy, compared with the screenshots of production taken before the merge: 0 differing pixels on /, /login and /terms at desktop and phone sizes.
  • The staging sync applied 0 migrations and deployed 13 Edge Functions to staging at 8c5da7f (every function imports the shared CORS module this PR changed). Production Edge Functions were not redeployed: the only drift is that production still allows the removed capacitor://localhost origin, which no client uses. That redeploy will ride with the next backend change of the native-app work.

This branch was successfully deployed

2 active deployments
Preview – debate-navigator — de1bfdb5 Deployed Oct 8, 2026 by vercel[bot]
Preview – debatelab-staging — de1bfdb5 Deployed Oct 8, 2026 by vercel[bot]
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.

2 participants