fix(cli): open the Environments panel instead of a 404 for open --env - #3614
Conversation
`veryfront open --env <name>` built `https://veryfront.com/projects/<slug>/environments/<name>` and reported `success: true`. The dashboard has no `/environments/` route — Studio only serves `/projects/[projectSlug]` — so every `--env` invocation handed the user a hard 404 while claiming success. Environments are a panel on the project page, addressed with `?panels=environments`. The panel's own deep link seeds a selection by environment *id* (`?environments=edit:<id>`, matched with `env.id === selectedEnvironmentId`), and `open` only has the env name and no token to resolve it, so the name selects the panel rather than a row. Verified against published 0.1.1229: the old URL returns 404, the new one returns 302 (the signed-out redirect every real Studio page gives).
|
Warning Review limit reached
Next review available in: 39 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Comment |
Problem
veryfront open --env <name>reportedsuccess: truewhile handing the user a dead link.The dashboard has no
/environments/route. Studio's page tree only servespages/projects/[projectSlug]— there is no nestedenvironmentsroute, so every--envinvocation produced a hard 404 ("This page could not be found").This is newly reachable ground: before #3576,
opencould not resolve a project slug from alocal link at all and errored
No project foundhere, so no URL was ever produced. #3576 fixedthe resolution and exposed the broken
--envroute behind it.Fix
Environments are a panel on the project page, addressed with
?panels=environments:The env name selects the panel, not a specific row. That is deliberate: the panel's own deep
link seeds a selection by environment id (
?environments=edit:<id>, matched inEnvironmentsPanelContainerwithenvironments.find(env => env.id === selectedEnvironmentId)).openonly has the env name and has no token to resolve it to an id, so emitting?environments=edit:productionwould open a detail drawer bound to an id that never matches —strictly worse than landing on the panel list. Resolving the id would mean an authenticated API
call, which
opendeliberately does not make.Also corrects the two places that described the old behaviour (
--envhelp text and thedeploy-project guide sentence).
Verification against the published repro
Re-ran the finding's own command against this build:
/projects/<slug>/environments/production(0.1.1229)/projects/<slug>?panels=environments(this build)302 is the signed-out redirect to
/sign-inthat every real Studio page returns for ananonymous request — i.e. a route that exists — versus the 404 body the old URL rendered.
Tests
cli/commands/open/handler.test.ts— both fail onmainfor the right reason (asserted beforewriting the fix):
builds environment URL that opens the Environments panel— pins the exact corrected URL.never builds an /environments/ path segment for any env name— regression guard overproduction/staging/preview, since the dashboard has no/environments/route at all.Scope
Deliberately narrow.
veryfront open's broader "opens Studio, never the deployed app" behaviourand the deploy-project Verification step are separate findings owned by other agents; this PR
only stops
--envfrom emitting a 404 and fixes the one clause that its behaviour changeinvalidates.
Live docs
No published-docs change is required —
veryfront-docsdoes not carry the"environment's dashboard page" claim (verified by grep). The only doc edit is the in-repo
docs/getting-started/deploy-project.md.