Feature request: support Capacitor navigation for mobile apps
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #485 by @rdlabo — merged
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start by locating the Pages navigation engine and its URL scheme guard, then read the same-app URL comparison and related tests. Add coverage for capacitor://localhost navigation and for a different Capacitor host; verify HTTP(S) behavior is unchanged and other schemes remain rejected.
Written by the indexing model from the issue text.
Description
Problem
Void Pages rejects capacitor:// URLs, which Capacitor uses by default for local pages in its iOS WKWebView. Initial rendering and hydration work, but submitting a Pages action fails with:
Void Router: refusing to navigate to a capacitor: URL.
Observed with Void / @void/react 1.1.11 on an iOS 26.1 simulator. The same protocol guard is present on main (9ed64ba).
Reproduction
- Serve a Void React Pages application in a Capacitor iOS WebView at
capacitor://localhost, with page requests forwarded to its Worker. - Hydrate the page and submit a Pages form action, or invoke
router.visit('/users', { method: 'POST' }). - The navigation engine rejects the URL before sending the page request.
Expected: same-app Pages GET/POST navigation works under the default capacitor:// scheme.
Changing server.iosScheme to HTTP(S) is not a workaround: WKWebView already handles those schemes and Capacitor cannot register them. See Capacitor's configuration reference.
Proposed scope
Allow capacitor: alongside HTTP(S) in the Pages navigation engine. It also needs a small same-app URL comparison adjustment: new URL('capacitor://localhost/users').origin is "null", so comparing that value directly with WKWebView's window.location.origin does not identify the local app. Compare protocol and host for capacitor: only, preserving HTTP(S) behavior and rejecting other schemes.
No Capacitor dependency or configurable scheme registry is needed. Different Capacitor hosts must not be treated as the same origin.
- Dominant language
- TypeScript
- Stars
- 402
- Forks
- 32
- Avg merge
- 10h 51m
- Merged PRs (30d)
- 100
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from voidzero-dev/void
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
voidzero-dev/void#529 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
voidzero-dev/void#428 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 56/100
voidzero-dev/void#527 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 54/100
voidzero-dev/void#525 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 67/100
voidzero-dev/void#524 ·
Maintainers usually reply within 1 day
All issues in voidzero-dev/void
Similar issues
-
ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
xavxyz/bei-shan-lin-shui#57 ·
Maintainers usually reply within 1 day
-
[BUG] rag: sentence content can cross the reported sentence boundariesPossibly taken @LJK-ikun claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
README: the Resource URI Schemas example's file://documents/* pattern only matches that literal URIOpen
Difficulty 1/5 Under an hour Newbie friendliness 88/100
platformatic/mcp#361 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
siyuan-note/siyuan#20799 · 7 comments ·
Maintainers usually reply within 1 day