The studio's app page has three buttons on its head card: Open the app, Redeploy, Stop. Two of them leave the studio.
Walked on a locally booted main: from /ivy/jot, pressing Stop answers 303 → /ivy/jot/app — a third app page that is neither the studio's nor dev's. It wears the studio's tab strip (Studio | Told | Changes | Map | Settings) over dev's environment cards (productionRunning, preview of #1Running, each with its own Open/Redeploy/Stop), and says everything the page you just left already said. Redeploy answers 303 → /ivy/jot/runs/<id> — the deploy's run page, which #195 is currently fixing for calling a live deploy planned and attributing its log to an agent.
The targets are hard-coded regardless of mode: appStop returns flashTo(ctx, \${repoBase(repo)}/app\, …) (src/web/pages/apps.ts:936) and appRedeploy returns ${base}/runs/${run.id} (:915-917). The same forms are rendered by the studio's head card (envActions, drawn from src/web/studio/previews.ts) and by the change page's preview card — so a person pressing Redeploy on a change also lands somewhere else.
This is the one thing the head card least needs: the studio already refreshes that card in place on a deploy event (appStateFragment, GET /:owner/:name/app/state). Staying put would show the result better than the page it navigates to.
Done looks like
Files I expect to change
src/web/pages/apps.ts (appStop, appRedeploy), src/web/pages/repo.ts (reuse safeBack, do not copy it), test/web-apps.test.ts or test/studio.test.ts.
Risks
safeBack trusts the referer, which is absent under some privacy settings — the fallback has to be the studio's app page, never the raw /app. Redeploy's already serves that commit branch has no run to link and must still return somewhere sensible. And leaving /:owner/:name/app in place is fine for this issue, but note in the pull that it is now reachable only from dev: it is a page wearing the studio's tabs with dev's badges, and worth its own issue if it survives.
The studio's app page has three buttons on its head card: Open the app, Redeploy, Stop. Two of them leave the studio.
Walked on a locally booted
main: from/ivy/jot, pressing Stop answers303 → /ivy/jot/app— a third app page that is neither the studio's nor dev's. It wears the studio's tab strip (Studio | Told | Changes | Map | Settings) over dev's environment cards (production Running, preview of #1 Running, each with its own Open/Redeploy/Stop), and says everything the page you just left already said. Redeploy answers303 → /ivy/jot/runs/<id>— the deploy's run page, which #195 is currently fixing for calling a live deploy planned and attributing its log to an agent.The targets are hard-coded regardless of mode:
appStopreturnsflashTo(ctx, \${repoBase(repo)}/app\, …)(src/web/pages/apps.ts:936) andappRedeployreturns${base}/runs/${run.id}(:915-917). The same forms are rendered by the studio's head card (envActions, drawn fromsrc/web/studio/previews.ts) and by the change page's preview card — so a person pressing Redeploy on a change also lands somewhere else.This is the one thing the head card least needs: the studio already refreshes that card in place on a deploy event (
appStateFragment,GET /:owner/:name/app/state). Staying put would show the result better than the page it navigates to.Done looks like
Files I expect to change
src/web/pages/apps.ts(appStop,appRedeploy),src/web/pages/repo.ts(reusesafeBack, do not copy it),test/web-apps.test.tsortest/studio.test.ts.Risks
safeBacktrusts the referer, which is absent under some privacy settings — the fallback has to be the studio's app page, never the raw/app. Redeploy's already serves that commit branch has no run to link and must still return somewhere sensible. And leaving/:owner/:name/appin place is fine for this issue, but note in the pull that it is now reachable only from dev: it is a page wearing the studio's tabs with dev's badges, and worth its own issue if it survives.Suggested: Scout.