ci: build embedded UI through Moon - #319
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
🦋 Changeset detectedLatest commit: 710f632 The changes in this PR will be included in the next version bump. This PR includes changesets to release 15 packages
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 |
Contributor
There was a problem hiding this comment.
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 invokesmoon run <project>:buildfrom the repo root. - Update the console and login UI build steps to use
moon run console:buildandmoon run login-ui:buildrespectively.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
components:buildbeforelogin-ui:build.Validation
distfolders for console, login-ui, and dependent packages, then ransh scripts/sync-embedded-ui-dist.sh allsuccessfully.corepack pnpm exec changeset status --since origin/maingit diff --checkRelease notes / changeset
.changeset/recover-alpha-eight.mdfor@zitadel/serverpatch. The fixed alpha group bumps the CLI, server packages, API, components, and SDKs together.Notes
release-publishrun for0.1.0-alpha.7, whereapps/login-uicould not resolve@zitadel/componentsduringscripts/sync-embedded-ui-dist.sh all.build: version packagesPR; publishing should happen only after that generated version PR merges.