fix: default TLS gateway deep links to port 443 when port is omitted#99887
fix: default TLS gateway deep links to port 443 when port is omitted#99887ly85206559 wants to merge 9 commits into
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 5, 2026, 8:28 AM ET / 12:28 UTC. Summary PR surface: Other +56. Total +56 across 7 files. Reproducibility: yes. from source inspection: current main hard-codes omitted openclaw://gateway ports to 18789 before considering tls, while setup-code and raw WSS/HTTPS inputs already default omitted TLS ports to 443. I did not run the simulator in this read-only review. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Land this focused fix or an equivalent one after maintainers accept the omitted-TLS-port compatibility change and exact-head CI is green. Do we have a high-confidence way to reproduce the issue? Yes, from source inspection: current main hard-codes omitted openclaw://gateway ports to 18789 before considering tls, while setup-code and raw WSS/HTTPS inputs already default omitted TLS ports to 443. I did not run the simulator in this read-only review. Is this the best way to solve the issue? Yes, this is the best fix shape: centralizing the TLS default in OpenClawKit removes parser drift, and RootTabs is the right owner for one-shot setup delivery to the canonical Settings surface. The only safer addition would be maintainer-approved compatibility wording for non-443 TLS links. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fd2e4da00651. Label changesLabel justifications:
Evidence reviewedPR surface: Other +56. Total +56 across 7 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (7 earlier review cycles)
|
9e73a8a to
41c653a
Compare
41c653a to
ea70d70
Compare
71bc183 to
4e7921b
Compare
49b58d2 to
42367f0
Compare
65aa991 to
ad20758
Compare
Align openclaw://gateway parsing with setup-code and URL helpers so tls=1 without an explicit port uses 443 instead of 18789. Co-authored-by: Cursor <[email protected]>
ad20758 to
a56254d
Compare
|
Thank you for the contribution. This fix landed with contributor co-authorship preserved in #100258 ( I consolidated the source fixes into a maintainer takeover because the contributor branches were based on rewritten pre- |
|
Land-ready validation for
No screenshot was attached because this changes parsing and one-shot state ownership, not layout or styling; the meaningful before/after proof is the applied host/port/TLS state above. |
What Problem This Solves
Fixes two coupled iOS gateway setup failures:
Setup codes and raw gateway URL parsing in OpenClawKit already default omitted TLS/WSS ports to 443; the
openclaw://gatewayquery parser did not.Why This Change Was Made
Centralize the TLS default-port rule in
DeepLinks.swift(tls ? 443 : 18789) and use it for setup payloads, raw URLs, and gateway deep links.Make gateway setup request ownership explicit:
RootTabsconsumes the model's one-shot link, selects the gateway route, and passes one typed request only to the canonical phone or iPad Settings surface. Settings acknowledges the request after staging it, preventing both hidden-view consumption and replay after navigation.The change preserves explicit ports, so existing links such as
openclaw://gateway?...&port=18789&tls=1still parse to 18789.User Impact
TLS gateway deep links from QR codes or shared links now stage the expected HTTPS/WSS endpoint without requiring an explicit
port=443parameter. This works on both phone and iPad layouts even when another Settings surface is already mounted. Explicit ports remain unchanged, and omitted plaintext ports still default to 18789.Evidence
Parser regression proof:
swift test --package-path apps/shared/OpenClawKit --filter DeepLinksSecurityTestsBuild proof:
** BUILD SUCCEEDED **native-app-i18n.ts checkpasses.Live end-to-end proof using the exact built app:
443with TLS.443with TLS.Review and related-work check: