Repository navigation
Quantum Builder alpha10 link handling runtime - #22
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 625cc1f82d
ℹ️ 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".
| $scheme = strtolower(trim((string) ($rule['scheme'] ?? ''))); | ||
| $host = strtolower(trim((string) ($rule['host'] ?? ''))); | ||
| $pathPrefix = trim((string) ($rule['path_prefix'] ?? '')); |
There was a problem hiding this comment.
Limit serialized link rules before saving
Reject rules whose serialized payload exceeds the Java string-constant limit. path_prefix has no length bound, and scheme and host are likewise unbounded, so a profile containing one long prefix—or 64 moderately long rules—passes validation and saves successfully, but patch_app_config() emits the entire JSON value into the single LINK_RULES_JSON literal and the generated Android build fails with constant string too long.
Useful? React with 👍 / 👎.
| $deepLinkScheme = strtolower(trim((string) ($config['links']['deep_link_scheme'] ?? ''))); | ||
| if ($deepLinkScheme !== '' && !preg_match('/^[a-z][a-z0-9+.-]{1,31}$/', $deepLinkScheme)) { | ||
| throw new \InvalidArgumentException('Deep-link scheme is invalid.'); |
There was a problem hiding this comment.
Accept valid one-character deep-link schemes
Allow the portion after the initial alphabetic character to be empty. URI scheme syntax permits a single-letter scheme such as x:, and Android can register such a scheme, but {1,31} requires at least two total characters, so saving an otherwise valid profile using a one-character custom scheme is rejected before it can be built.
Useful? React with 👍 / 👎.
| links = config.get("links", {}) if isinstance(config.get("links", {}), dict) else {} | ||
| deep_link_scheme = str(links.get("deep_link_scheme") or "").strip().lower() | ||
| if deep_link_scheme: |
There was a problem hiding this comment.
Revalidate persisted schemes before adding intent filters
Validate the stored scheme again before activating it in the manifest. Profiles from earlier releases could already persist arbitrary links.deep_link_scheme text without this commit's new Apps::validate() checks, and rebuilding such a profile directly from the dashboard does not save it first, so a legacy value such as https reaches this code and generates a browsable scheme-only filter for every HTTPS URL despite now being classified as reserved. Invalid legacy text can also produce a malformed manifest because xml_escape() does not escape attribute quotes by default.
Useful? React with 👍 / 👎.
Promotes New Windows and Deep Link Scheme to Runtime, adds ordered URL rule configuration, trusted validation, worker compiler wiring, Android intent-filter generation, regression coverage, parity updates and bumps Builder to 0.1.0-alpha10.