Skip to content

fix: custom-agent ?url= deep link - normalize scheme + dev SPA fallback#385

Merged
igmahl merged 1 commit into
mainfrom
fix/custom-agent-url-deep-link
Jun 19, 2026
Merged

fix: custom-agent ?url= deep link - normalize scheme + dev SPA fallback#385
igmahl merged 1 commit into
mainfrom
fix/custom-agent-url-deep-link

Conversation

@KruGoL

@KruGoL KruGoL commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Opening an external app via /agents/custom?url= failed two ways. (1) AgentPage called new URL() on the raw param, so a scheme-less host (boxy-run.fly.dev) threw and fell back to the prompt instead of the iframe; it now normalizes the scheme via a shared src/utils/normalizeUrl.ts that the in-app prompt (DesktopLayout) also uses. (2) The dev SPA fallback in vite.config.ts classified requests by the full URL including the query, so a query value with dots (?url=...fly.dev) was treated as a static asset and 404'd; it now strips the query before the asset check. The GitHub Pages 404.html redirect is unchanged (it already preserves the query).

Opening an external app via /agents/custom?url= failed two ways. (1) AgentPage called new URL() on the raw param, so a scheme-less host (boxy-run.fly.dev) threw and fell back to the prompt instead of the iframe; it now normalizes the scheme via a shared src/utils/normalizeUrl.ts that the in-app prompt (DesktopLayout) also uses. (2) The dev SPA fallback in vite.config.ts classified requests by the full URL including the query, so a query value with dots (?url=...fly.dev) was treated as a static asset and 404'd; it now strips the query before the asset check. The GitHub Pages 404.html redirect is unchanged (it already preserves the query).
@igmahl igmahl merged commit 01e7e7a into main Jun 19, 2026
7 checks passed
@igmahl igmahl deleted the fix/custom-agent-url-deep-link branch June 19, 2026 17:38
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