Remove the unused launch-from-recipe path in DeployServerDialog #91

Closed
opened 2026-10-09 15:01:55 -04:00 by goddard · 1 comment
Collaborator

Since #87 removed Launch another server from the provisioning job page, nothing opens DeployServerDialog with a source operation, but the dialog still carries the code for it.

  • DeployServerDialog.svelte:14-15 still declares the sourceDeploymentId prop.
  • DeployServerDialog.svelte:79-87 fetches that operation's recipe, preselects its game and map, and fails with "The original launch map is unavailable." when it can't.
  • The only remaining caller, routes/+page.svelte:174 (the Servers page), passes initialGame and initialMapSlug instead.

No test or doc covers this path, so it can't be checked and will drift. The /api/provisioning/[id] endpoint it calls is still used by the job page's refresh, so only the dialog code should go.

Fix

  • Remove the sourceDeploymentId prop and its source-loading branch from DeployServerDialog.svelte
  • Confirm npm run check passes and the Servers page dialog still preselects initialGame and initialMapSlug
Since #87 removed **Launch another server** from the provisioning job page, nothing opens `DeployServerDialog` with a source operation, but the dialog still carries the code for it. - `DeployServerDialog.svelte:14-15` still declares the `sourceDeploymentId` prop. - `DeployServerDialog.svelte:79-87` fetches that operation's recipe, preselects its game and map, and fails with "The original launch map is unavailable." when it can't. - The only remaining caller, `routes/+page.svelte:174` (the Servers page), passes `initialGame` and `initialMapSlug` instead. No test or doc covers this path, so it can't be checked and will drift. The `/api/provisioning/[id]` endpoint it calls is still used by the job page's refresh, so only the dialog code should go. **Fix** - [x] Remove the `sourceDeploymentId` prop and its source-loading branch from `DeployServerDialog.svelte` - [x] Confirm `npm run check` passes and the Servers page dialog still preselects `initialGame` and `initialMapSlug`
goddard added the
priority
low
type/maintainability
labels 2026-10-09 15:01:55 -04:00
josh was assigned by goddard 2026-10-09 15:01:55 -04:00
Author
Collaborator

Reviewed 8fcb8312a3. The unused launch-from-recipe path is gone, and the Servers page dialog behaves exactly as before, so I'm closing this.

Checklist

  • Remove the sourceDeploymentId prop and its source-loading branch. The prop and the 20-line block that fetched the source operation's recipe are removed from DeployServerDialog.svelte. Nothing in src, tests or docs refers to sourceDeploymentId any more, and /api/provisioning/[id] is untouched for the job page's refresh.
  • npm run check passes and the Servers page still preselects the game and map. npm run check reports 0 errors across 1,193 files. The dialog still sets game = initialGame and mapSlug = initialMapSlug on open (DeployServerDialog.svelte:127-128), then falls back to the first map only if that slug isn't in the catalog. routes/+page.svelte:308-309,330-331 still passes both values. The removed branch only ran when a source ID was set, which the Servers page never did, so its behaviour is unchanged.

Review notes

  • At this commit npm run lint is clean and the full suite passes (209 files, 2,635 tests). CI run 837 was still running when I posted this.
Reviewed 8fcb8312a3eb7f17489112383a2e488998f16503. The unused launch-from-recipe path is gone, and the Servers page dialog behaves exactly as before, so I'm closing this. **Checklist** - [x] **Remove the `sourceDeploymentId` prop and its source-loading branch.** The prop and the 20-line block that fetched the source operation's recipe are removed from `DeployServerDialog.svelte`. Nothing in `src`, `tests` or `docs` refers to `sourceDeploymentId` any more, and `/api/provisioning/[id]` is untouched for the job page's refresh. - [x] **`npm run check` passes and the Servers page still preselects the game and map.** `npm run check` reports 0 errors across 1,193 files. The dialog still sets `game = initialGame` and `mapSlug = initialMapSlug` on open (`DeployServerDialog.svelte:127-128`), then falls back to the first map only if that slug isn't in the catalog. `routes/+page.svelte:308-309,330-331` still passes both values. The removed branch only ran when a source ID was set, which the Servers page never did, so its behaviour is unchanged. **Review notes** - At this commit `npm run lint` is clean and the full suite passes (209 files, 2,635 tests). CI [run 837](https://gitea.thewrightserver.net/josh/electric-cherry/actions/runs/837) was still running when I posted this.
Sign in to join this conversation.