feat(desktop): environment page with builds, edit page and history (SUPER-3017)

Draft
SA
16d ago
+3107-591

Milestone 4 of plans/20261030-0017-environment-builds.md (#9104), built to the agreed mockup: https://app.superset.sh/page/environment-builds-super-3017-mockup-w2u7xq. Stacked on #9167.

Environment page (/environments/$id, opened from a Settings → Environments row)

  • Header: name, Edit, and a ⋯ menu with Rename (opens Edit with the name focused) and Archive.
  • Overview: Repositories (primary marked), Projects (link and unlink, the existing control), Visible to, Active build status, Region, Updated.
  • Builds: Build ID, Type, Status, Started for the latest five, with Trigger new build and All builds ↗. A failure's error shows in a tooltip on its status. The page polls every 5 s while a build runs.
  • Environment variables: the five most recently changed, with All environment variables (n) ↗ and Add variable, which opens the existing side sheet.

Edit page (/environments/$id/edit)

  • Configuration: name, visible to, and the install and setup scripts, read-only from .superset/config.toml on the base branch through a new environment.config query, with a note to change them there.
  • Repositories: Edit opens the New environment picker (PickRepositoriesStep → ChoosePrimaryStep) in an edit mode that saves through environment.update({ …, startBuild: true }) (#9167).
  • Environment variables: same preview.
  • Environment history: the kept snapshots (time, commit or "Saved from a workspace"), with Current or Restore.

Other pages

  • /environments/$id/builds: every build, with Load more, paged like automation runs.
  • /environments/$id/variables: the existing full variables list. It moved here from the settings-only view, with a translated heading.
  • Settings list: each row opens the environment page and shows its last build ("Built 3 hours ago", "Last build failed", "Building", "No builds yet").

Moved: EnvironmentSecrets now sits under the variables route, its only user. AddSecretSheet moved to routes/_authenticated/components, since two pages use it.

Left out of the mockup: the header's "New workspace ↗". The new-workspace modal can't open with an environment preselected, and adding that is its own change.

Release order (packages/trpc/AGENTS.md rule 9): the desktop calls environment.builds, rebuild, restore, config and update's startBuild. The API PRs below must be live in production before a desktop release that includes this.

Verified

  • apps/desktop typecheck (with regenerated routes) and its full suite pass: 8,952 tests.
  • bun run check:i18n passes: 35 new strings, translated in all 16 locales. packages/i18n tests pass, including the hardcoded-text checks. Biome clean.

Not verified: the screens in the running app. This cloud workspace has no sandbox credentials and no running desktop to drive over CDP (.agents/skills/cdp-verification). They need a look on a machine with the app before merge.

Linear: SUPER-3017


Summary by cubic

Adds dedicated environment pages reachable from Settings → Environments: an overview with the latest builds and a variables preview, and an edit page for configuration, repository changes, and history restore.

New pages

  • The overview shows repositories, projects, visibility, active build, region, and last update; builds list the latest five with Trigger new build and All builds, polling every 5 s while a build runs.
  • /environments/$environmentId/builds lists every build with load-more; the full variables list moved to /environments/$environmentId/variables, now also reachable from the preview.
  • Settings rows open the environment page and show the last build: "Built 3 hours ago", "Last build failed", "Building", or "No builds yet".

Edit and backend

  • Edit shows name, visibility, and read-only install and setup scripts from .superset/config.toml on the base branch via the new environment.config query.
  • Repository changes reuse the New environment picker in an edit mode that saves with startBuild: true.
  • Environment history lists the kept snapshots with Current or Restore, and failed-build errors appear in a status tooltip.
  • EnvironmentSecrets and AddSecretSheet moved to shared locations; repo-hooks now publish a setup phase.
  • The desktop now calls environment.builds, rebuild, restore, config, and update's startBuild — those API changes must be in production before a desktop release with this change.