Skip to content

fix(cli): open deployed apps in Testing Playground (SERV-2080) - #1167

Open
burak-fal wants to merge 3 commits into
mainfrom
burak/serv-2080-playground-entry-links
Open

fix(cli): open deployed apps in Testing Playground (SERV-2080)#1167
burak-fal wants to merge 3 commits into
mainfrom
burak/serv-2080-playground-entry-links

Conversation

@burak-fal

@burak-fal burak-fal commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Part of SERV-2080.

Problem

After deploying an app, CLI Playground links still leave the app dashboard and include utility routes such as /health, even though the app's Testing tab excludes them.

Change

Change only the pretty fal deploy presentation. Derive the owning app and web origin from each authoritative server-provided model URL and print /dashboard/apps/<owner>/<app>/testing/playground?endpoint=<encoded endpoint>.

  • Normalize the root endpoint's trailing slash.
  • Preserve nested paths, streaming/realtime twins, team ownership, named-environment aliases, and the source web origin.
  • Omit health, cancellation and object-info routes from Playground actions, without excluding apps whose name matches one of those suffixes.

Compatibility

No changes to DeploymentResult.urls, JSON deploy output, sync/async API URLs, log URLs, auth, billing, team/environment selection, or fal run/ephemeral result handlers. Existing standalone URLs remain usable.

Verification

  • Python 3.11: projects/fal/.venv/bin/python -m pytest projects/fal/tests/unit/cli/test_deploy.py projects/fal/tests/unit/test_serialization.py -q from the repository root: 148 passed.
  • Ruff format and lint passed on the changed files.
  • Deployed a real private XS app in the alpha environment on a personal account using this CLI. Root, /divide, and /stream printed in-app URLs; no health Playground URL was printed. API URLs were preserved.
  • Followed the emitted stream path against the app UI and verified the selected endpoint and its prompt/word_delay_ms form.

The app-side route is already live from web-app#6961. This PR does not depend on a new backend deployment.


Note

Low Risk
Presentation-only change to pretty deploy Playground links; deployment APIs and URL payloads are untouched.

Overview
Pretty fal deploy output now prints in-app Testing Playground links instead of raw /models/... playground URLs.

For each server-provided playground URL, _deployed_app_playground_url builds /dashboard/apps/<owner>/<app>/testing/playground?endpoint=<encoded path>, keeping the same host and encoding nested routes (including env aliases like image-app--staging). Health, cancel, and object_info routes are omitted from the printed list so they match what the Testing tab supports.

Sync/async API URLs, JSON deploy output, and DeploymentResult.urls are unchanged—only the human-readable Playground section is transformed. A parametrized unit test locks in the expected URLs for testable vs utility routes.

Reviewed by Cursor Bugbot for commit 877f0c1. Bugbot is set up for automated code reviews on this repo. Configure here.

CI caveat

Unit and integration matrices pass. E2E runner-exec failures persist after rerun and reproduce on untouched main. Exact failure and baseline evidence.

@linear-code

linear-code Bot commented Sep 10, 2026

Copy link
Copy Markdown

SERV-2080

@burak-fal

Copy link
Copy Markdown
Contributor Author

Browser handoff evidence

Desktop, 1440px viewport. Followed the /stream Playground path emitted by the modified CLI, substituting the local web origin for branch verification. It opens the real deployed app under Testing, selects /stream, and renders that endpoint's input form. Screenshot is cropped to omit global account/credit chrome.

CLI stream link opening the owning app's Testing Playground

Companions: web Requests freshness and deployed-app documentation. The app route itself already shipped; these PRs are independently deployable.

@burak-fal
burak-fal marked this pull request as ready for review September 10, 2026 17:44
@burak-fal

Copy link
Copy Markdown
Contributor Author

CI caught a serialization regression in the initial commit: binding urllib.parse.urlsplit directly into fal.cli.deploy introduced a foreign lru_cache wrapper into the package's pickle-by-value module set. Fixed in b7bd538 by importing urllib.parse as a module and qualifying its calls.

No suppression or new test was needed. The existing serialization guard plus the deploy suite now pass together: 147 passed on Python 3.11. Ruff format/lint also pass. The CI matrix is rerunning on the corrected head.

Separately investigating integration/E2E runner timeout failures against the existing main baseline; those suites also fail on main at b507051.

Comment thread projects/fal/src/fal/cli/deploy.py Outdated

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b7bd538. Configure here.

Comment thread projects/fal/src/fal/cli/deploy.py
@burak-fal

Copy link
Copy Markdown
Contributor Author

CI result on 877f0c1

The full unit matrix and full integration matrix pass. Pre-commit, container, docs, CodeQL, Socket checks, and the latest Cursor review pass. Both AI findings about reserved app names were answered and resolved.

E2E remains red after rerun. The Python 3.14 job has one failure: test_exec_runner sends a 10,000-character argument through fal runners exec and gets Connection error: Unexpected error. Please contact support@fal.ai. Other matrix jobs also fail in E2E.

This exact runner-exec error also occurs on untouched main at the same base commit, b507051, in today's scheduled run. Main additionally has rollout/time-out failures.

No E2E assertions were suppressed and no runner-exec/backend behavior was changed to turn this navigation PR green. Local deploy plus serialization coverage passes all 148 tests. The remaining CI blocker is the existing E2E runner path, not the deploy-link fixes.

@jim-fal

jim-fal commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

I'm thinking now that health / cancel/ object_info may still be useful in playground as users set up their apps. we can sort those until the end because after the app works, they may not come back to them

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