Skip to content

ci: build embedded UI through Moon - #319

Merged
fforootd merged 2 commits into
mainfrom
codex/fix-release-embedded-ui-build
Jun 16, 2026
Merged

ci: build embedded UI through Moon#319
fforootd merged 2 commits into
mainfrom
codex/fix-release-embedded-ui-build

Conversation

@fforootd

@fforootd fforootd commented Jun 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Build embedded console and login UI through Moon project tasks instead of direct pnpm package builds.
  • Preserve the existing sync behavior while letting Moon build workspace dependencies such as components:build before login-ui:build.
  • Add a real patch changeset so merging this PR creates a fresh Changesets version PR after the failed alpha.7 publish attempt.

Validation

  • Removed generated dist folders for console, login-ui, and dependent packages, then ran sh scripts/sync-embedded-ui-dist.sh all successfully.
  • corepack pnpm exec changeset status --since origin/main
  • git diff --check

Release notes / changeset

  • Real changeset added: .changeset/recover-alpha-eight.md for @zitadel/server patch. The fixed alpha group bumps the CLI, server packages, API, components, and SDKs together.

Notes

  • This addresses the failed release-publish run for 0.1.0-alpha.7, where apps/login-ui could not resolve @zitadel/components during scripts/sync-embedded-ui-dist.sh all.
  • Merging this PR should create a new generated build: version packages PR; publishing should happen only after that generated version PR merges.

Copilot AI review requested due to automatic review settings June 16, 2026 17:41
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nextgen Ready Ready Preview, Comment Jun 16, 2026 5:48pm

Request Review

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

🦋 Changeset detected

Latest commit: 710f632

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 15 packages
Name Type
@zitadel/server Patch
@zitadel/cli Patch
@zitadel/server-linux-x64 Patch
@zitadel/server-linux-arm64 Patch
@zitadel/server-darwin-x64 Patch
@zitadel/server-darwin-arm64 Patch
@zitadel/server-win32-x64 Patch
@zitadel/api Patch
@zitadel/components Patch
@zitadel/sdk-core Patch
@zitadel/sdk-next Patch
@zitadel/sdk-nuxt Patch
@zitadel/sdk-react Patch
@zitadel/sdk-vue Patch
@zitadel/sdk-angular Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Switches the embedded console/login UI build step used by the Go embed sync script from direct pnpm --filter ... run build calls to Moon project tasks, so Moon can correctly build workspace dependencies (e.g., components:build) before building the UI apps. This aligns the embedded UI sync path with the monorepo task graph used in CI and release workflows.

Changes:

  • Add a small helper (build_project) that invokes moon run <project>:build from the repo root.
  • Update the console and login UI build steps to use moon run console:build and moon run login-ui:build respectively.

@fforootd
fforootd merged commit 0547b8c into main Jun 16, 2026
5 checks passed
@fforootd
fforootd deleted the codex/fix-release-embedded-ui-build branch June 16, 2026 17:53
fforootd pushed a commit that referenced this pull request Jun 16, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @zitadel/cli@0.1.0-alpha.8

### Patch Changes

- Updated dependencies
[[`0547b8c`](0547b8c)]:
  - @zitadel/server@0.1.0-alpha.8
  - @zitadel/api@0.1.0-alpha.8
## @zitadel/server@0.1.0-alpha.8

### Patch Changes

- [#319](#319)
[`0547b8c`](0547b8c)
Thanks [@fforootd](https://github.com/fforootd)! - Cut a fresh alpha
package train with the embedded UI release build fix.
## @zitadel/sdk-angular@0.1.0-alpha.8

### Patch Changes

- Updated dependencies []:
  - @zitadel/api@0.1.0-alpha.8
  - @zitadel/components@0.1.0-alpha.8
## @zitadel/sdk-next@0.1.0-alpha.8

### Patch Changes

- Updated dependencies []:
  - @zitadel/api@0.1.0-alpha.8
  - @zitadel/components@0.1.0-alpha.8
  - @zitadel/sdk-core@0.1.0-alpha.8
## @zitadel/sdk-nuxt@0.1.0-alpha.8

### Patch Changes

- Updated dependencies []:
  - @zitadel/api@0.1.0-alpha.8
  - @zitadel/components@0.1.0-alpha.8
  - @zitadel/sdk-core@0.1.0-alpha.8
## @zitadel/sdk-react@0.1.0-alpha.8

### Patch Changes

- Updated dependencies []:
  - @zitadel/api@0.1.0-alpha.8
  - @zitadel/components@0.1.0-alpha.8
  - @zitadel/sdk-core@0.1.0-alpha.8
## @zitadel/sdk-vue@0.1.0-alpha.8

### Patch Changes

- Updated dependencies []:
  - @zitadel/api@0.1.0-alpha.8
  - @zitadel/components@0.1.0-alpha.8
  - @zitadel/sdk-core@0.1.0-alpha.8
## @zitadel/server-darwin-arm64@0.1.0-alpha.8


## @zitadel/server-darwin-x64@0.1.0-alpha.8


## @zitadel/server-linux-arm64@0.1.0-alpha.8


## @zitadel/server-linux-x64@0.1.0-alpha.8


## @zitadel/server-win32-x64@0.1.0-alpha.8


## @zitadel/api@0.1.0-alpha.8


## @zitadel/components@0.1.0-alpha.8


## @zitadel/sdk-core@0.1.0-alpha.8

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
fforootd added a commit that referenced this pull request Jul 6, 2026
## Summary

- Add a direct Moon dependency from `cli:build-release` to `cli:test` so
the production-stamped CLI build cannot clean and rewrite
`apps/cli/dist` while Vitest is exercising oclif command discovery from
that same directory.
- Keep the CLI Vitest global setup self-contained by asserting that the
tsdown-built command files exist and `oclif commands --json` discovers
`status` before any test files run.
- Remove the runtime 127 retry from the in-process CLI test helper so
the test harness fails fast instead of masking a graph/order problem.

## Validation

- `moon run cli:build-release` (runs `cli:test` before the production
CLI build; captured log shows `cli:test` 101 files / 672 tests passed
and `cli:build-release` completed)
- `moon run cli:typecheck`
- `moon run cli:lint`
- `node scripts/check-changesets-status.mjs --base origin/main
--summary`
- `corepack pnpm exec changeset status --since origin/main`
- `git diff --check origin/main...HEAD`

## Release notes / changeset

Empty changeset added: `.changeset/cli-build-release-dag.md`. This
changes package-local Moon build wiring under `@zitadel/cli`, but no
shipped CLI behavior changes and no package bump is planned.

## Notes

- The broader problem is the Moon graph/shared-output ordering, not the
PATH-sensitive server lifecycle prober.
- Blame points to the interaction between the original CLI Vitest global
setup from `0547b8c3` / #319 and the release build DAG from `b0ba758a` /
#418, which introduced `cli:build-release` as a CI-visible production
build that cleans the same `apps/cli/dist` directory.
- Live open-PR check: PR #463 reproduced the `status` exit-127 class
with `cli:build`, `cli:test`, and `cli:build-release` all building CLI
dist in the same full-pr graph. PR #462 and the older filtered failed
logs did not show this oclif/status signature.
fforootd added a commit that referenced this pull request Jul 15, 2026
## Summary

Closes out the P0/P1 findings from the senior-tester pass over released
`v0.1.0-alpha.16` (password-first Next.js golden journey, agent + human
lens). Scope reconciled against main before implementation:

- **S1 — `test(domain)`: step.error dialect gate.** #525 fixed the
`auth_attempt.*` leak by rewriting three inline literals; nothing
prevented the next one. The literals are now named consts, scenario
assertions reference them, and `TestFlowStepErrorContract` sweeps every
known emission value (consts, implicit outcomes per challenge,
field-validation keys including the credential-shaped field name)
against the exported `FlowStepErrorAllowed` predicate — a new
non-`error.*`, non-reserved step error fails CI instead of rendering
verbatim in /login. No behavior change.
- **S2 — `fix(components)`: method-named credential hooks.**
`x-auth-methods#password` leaked verbatim into `data-testid` hooks,
breaking the documented `zitadel-field-password` /
`zitadel-input-password` contract (the e2e password locator survived
only via its label fallback). A shared `hookName` helper now normalises
the hook token at both construction sites (new `testid` Liquid filter in
the bundled template; `zl-field`'s native-input testid). The `name`
attribute — the wire/form key — is untouched.
- **S3 — components tests/docs: Enter-to-submit.** The release-test
finding "Enter does not submit" was **withdrawn as a driver artifact**:
the embedded-browser CDP key event carried an empty `key` field, so
`zl-field`'s `event.key === "Enter"` guard correctly ignored it; a
well-formed Enter triggers `form.requestSubmit()` → primary action, as
documented since #319. Residue landed here: the previously untested
orchestrator half (`handleFormSubmit` → `findPrimaryAction`) now has a
browser spec, and SKILLS.md tells agent drivers whose synthesized key
events omit `key` to click `zitadel-action-submit` instead.
- **S4 — `feat(cli)`: plan/apply envelopes enumerate changes.** `plan
--json` gave only counters; `apply --json` gave `{synced,
files_updated}` where `files_updated` means *local write-backs* — a
successful upload read as a no-op. Both now emit `data.changes` (`{kind,
action, file, id?, previous_id?}` per resource; apply rows carry the
resulting platform ids captured in `runSyncLoop`), apply gains
`next_actions`/`next_commands`, and `schemas list` emits snake_case
`created_at`. Counters, `files_updated`, and telemetry dimensions
unchanged.

Out of scope by maintainer decision: the bare-`npx` `latest` dist-tag
stub (alpha is shared via `@alpha`).

## Validation

- `go build ./...` and `go test ./internal/domain/ -count=1` — green
(includes the new contract sweep).
- `packages/components`: `pnpm run test` (264 unit) and `pnpm run
test:browser` (39, chromium) — green; the two new specs verified present
by name (`normalises the auth-method credential name in the input
testid`, `submits the step's primary action on Enter inside a field`).
- `apps/cli`: `npx vitest run` — 104 files / 763 tests green, including
the new success-path `apply` test against a `node:http` platform stub
(first one — apply previously had no success-path coverage), the
`enumeratePlanResources` matrix, and the SKILLS.md contract tests over
the edited doc.
- `npx tsc --noEmit` in both `apps/cli` and `packages/components` —
clean.
- `moon run workspace:journey` (cross-framework register/logout/login
e2e) — full matrix passed in 8m41s ("customer local setup journey matrix
passed"; every framework's journey green, exit 0).

## Release notes / changeset

- Changeset: `.changeset/stable-credential-field-hooks.md` —
`@zitadel/components` patch: credential-field automation hooks are
method-named; scripts targeting the raw
`zitadel-field-x-auth-methods#password` form must adjust.
- Changeset: `.changeset/plan-apply-change-enumeration.md` —
`@zitadel/cli` patch: `plan`/`apply` `--json` enumerate per-resource
changes with resulting ids; `apply` gains next steps; `schemas list`
emits `created_at`.
- S1 alone would be "No changeset required — no shipped behavior
changed" (tests + const refactor).

## Notes

- The full release-test report (what alpha.16 verifiably fixed,
remaining P2s: password policy hint despite `validation.min_length` in
the payload, no show-password toggle, password step not naming the
account, `E_FRAMEWORK_NOT_DETECTED` hint self-duplication,
`files_written` duplicates, scaffold's `next@16.2.4` DoS advisory,
default DOB collection, "Create Next App" page titles) lives in the
session log; P2s are deliberately not in this PR.
- S1 non-goals, noted for follow-up: runtime normalization in
`buildStep`; rejection mappings for MagicLink/SSO/OTP (no dispatch case
exists yet); unifying the two reserved-outcome definitions
(`reservedOutcomes` in the validator vs the resolver consts) — the
contract test now at least fails if they drift apart on emitted values.
- The server-side API casing inconsistency behind the `schemas list` fix
(flow endpoints emit `created_at`, schema-list emits `createdAt`) is an
OpenAPI-surface follow-up, deliberately not touched here.
- e2e note: `fieldControl(page, "password", …)` in cli-journey-e2e now
matches via its primary `getByTestId` branch instead of the label
fallback — no spec changes needed.
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.

2 participants