Skip to content

feat(hosting): render deploy event type and outcome in deploy history - #6681

Draft
nicacioliveira wants to merge 6 commits into
mainfrom
feat/hosting-deploy-type-outcome
Draft

feat(hosting): render deploy event type and outcome in deploy history#6681
nicacioliveira wants to merge 6 commits into
mainfrom
feat/hosting-deploy-type-outcome

Conversation

@nicacioliveira

@nicacioliveira nicacioliveira commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

The control-plane deploy-history API now returns type (build | fast-deploy | deploy) and outcome (pending | success | failure) on each event. This surfaces both in the Studio-native Hosting tab's Deploy history table, matching the feature just shipped in the control-plane.

Per-history-row, in the Action cell:

  • type badge — Build / Fast-deploy / Deploy, with an icon each. Falls back to the existing action badge for legacy rows that carry no type.
  • outcome badge — design-system variant tokens only: successsuccess, failuredestructive, pending → neutral "in progress" (with a clock icon). Omitted on legacy rows with no outcome.

Row layout unchanged otherwise — the two badges sit in a flex flex-wrap gap-1.5 wrapper in the same Action cell; the Commit / Framework / Actor / Date columns are untouched.

i18n: added typeBuild / typeFastDeploy / typeDeploy / outcomePending / outcomeSuccess / outcomeFailure under mainPanelTabs.hostingTab.* in both en and pt-br (mirrored — bun run check proves completeness).

BFF

No passthrough change needed: apps/api/src/api/routes/hosting.ts proxies the control-plane JSON verbatim (c.json(payload ?? {})) with no field whitelist/reshape, so type and outcome already reach the client.

Notes on commits / base

This branch's first commit snapshots the pre-existing, previously-uncommitted native Hosting/E2E/Analytics tabs prototype (so this PR can compile against main); the deploy type/outcome feature is the isolated second commit (hosting-tab.tsx + the two i18n dictionaries, +85/-1). Review the second commit for the actual change. The baseline commit also wraps three interpolated classNames in e2e-run-detail.tsx with cn() to satisfy the require-cn-classname lint rule.

Gates

  • bun run fmt — clean
  • bun run lint — exit 0 (0 errors)
  • bun run check — my three files produce zero TS errors. One pre-existing, unrelated error remains in packages/mcp-utils (an ajv 8.18/8.20 local dedup artifact, untouched by this PR); the apps/benchmark readme-check failure is a local-only untracked dir and does not exist on CI.

Do not merge/deploy.


Summary by cubic

Extends the per-site Hosting tab (gated by the hostingEnabled config flag): deploy history rows now show deploy type and outcome badges, env vars and secrets gain Runtime/Build scopes, and read-only code vars plus worker-bound secrets are surfaced.

Deploy history

  • Rows show a type badge (Build / Fast-deploy / Deploy) and an outcome badge (success / failure / in progress), falling back to the existing action badge for legacy rows. The BFF passes control-plane JSON through unchanged.

Env & secrets

  • Env vars and secrets each carry a Runtime/Build scope; a name can exist in both scopes, and scope is preserved on add, edit, PUT, and DELETE.
  • Env shows a read-only "From wrangler.jsonc" block for code vars, kept separate from the editable replace-set so a save never promotes them; secrets show an "On worker" badge for entry origin.
  • Adds en and pt-br labels for all new UI.

The branch's first commit snapshots the previously-uncommitted Hosting/E2E/Analytics tabs prototype; the feature commits are isolated on top. Do not merge/deploy.

Written for commit 0a0de05. Summary will update on new commits.

Review in cubic

nicacioliveira and others added 3 commits August 26, 2026 18:15
…e BFF proxy

Adds a per-site "Hosting" tab (deployments / env / redirects) that appears
next to CMS only when the deployment configures the Deco control-plane REST
integration. Data is proxied server-side so the service token never reaches
the browser — the client only sees `hostingEnabled` and the proxied JSON.

Server (apps/api):
- settings: add controlplaneRestUrl / controlplaneServiceToken (env-mapped)
- routes/hosting.ts: BFF proxy GET /:site/{deployments,env,redirects}, 503
  when unconfigured, propagates upstream non-2xx
- mount at /api/:org/hosting; expose hostingEnabled on /api/config

Client (apps/web):
- new "hosting" system tab (Server01 icon), gated on publicConfig.hostingEnabled
- HostingTab renders control-plane reads via useQuery + @decocms/ui tables
- query-key constants + en/pt-br i18n

Read-only prototype for design + platform review. Write/deploy actions TBD.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…type

Baseline commit capturing the pre-existing, previously-uncommitted native
Hosting/E2E/Analytics tabs prototype (control-plane BFF proxy) so the deploy
type/outcome feature can land as an isolated follow-up commit on top.

Also wraps three interpolated classNames in e2e-run-detail with cn() to satisfy
the require-cn-classname lint rule.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The control-plane deploy-history API now returns `type`
(build | fast-deploy | deploy) and `outcome` (pending | success | failure) on
each event. Surface both in the Studio-native Hosting tab's Deploy history:

- add `type` / `outcome` to DeploymentHistoryEvent (the BFF proxies the
  control-plane JSON verbatim, so no passthrough change was needed)
- a type badge (Build / Fast-deploy / Deploy) that falls back to the existing
  action badge for legacy rows without a `type`
- an outcome badge using design-system variant tokens — success, destructive
  for failure, and a neutral "in progress" for pending — omitted on legacy rows
- en + pt-br dictionary keys for the type and outcome labels

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@nicacioliveira
nicacioliveira marked this pull request as draft August 28, 2026 14:08
nicacioliveira and others added 3 commits August 28, 2026 14:39
The native hosting tab showed only CP-managed platform vars and store secrets,
so a site's wrangler.jsonc `vars` (igor's DECO_* code vars) and secrets bound on
the worker out-of-band were invisible. Render the control-plane read-back:
- Env: a read-only "From wrangler.jsonc" block from the new `codeVars` field
  (kept separate from the editable replace-set so a save never promotes them).
- Secrets: an "On worker" badge for `origin: "worker"` entries.
i18n keys added (en + pt-br).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a Runtime/Build scope to the per-site Secrets UI: a selector on Add,
a scope badge per row, and scope carried on PUT (body) + DELETE (query).
A name may exist in both scopes. Build secrets are mounted by the build
Job only; runtime secrets go to the runtime bundle. i18n en + pt-br.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Env section gains a Runtime/Build scope per variable (mirrors the secret
scope): a scope Select on add, a scope badge per row, and add/edit/delete keyed
by (name, scope) so a name may exist in both scopes. Build vars ride
spec.build.envs (build Job only); runtime vars stay on serving.vars. Reuses the
existing Runtime/Build i18n labels.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant