Skip to content

Feat/UI schema dual write#79

Merged
aqib-rx merged 3 commits into
feat/unified-schema-pipelinefrom
feat/ui-schema-dual-write
Jun 4, 2026
Merged

Feat/UI schema dual write#79
aqib-rx merged 3 commits into
feat/unified-schema-pipelinefrom
feat/ui-schema-dual-write

Conversation

@aqib-rx
Copy link
Copy Markdown
Collaborator

@aqib-rx aqib-rx commented Jun 4, 2026

Summary

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would change existing behavior)
  • Documentation update
  • Refactor / chore (no user-facing change)

Related issues

Changeset

This repo uses Changesets. If your PR changes any publishable package under packages/*, you must include a changeset:

pnpm changeset

Then commit the generated .changeset/*.md file.

  • I added a changeset (or this PR only touches non-publishable code: docs, tests, internal tooling, apps/*)
  • I selected the correct semver bump (patch / minor / major)

The changeset-check CI job will fail if a publishable package is modified without a changeset.

Test plan

  • pnpm lint
  • pnpm check-types
  • pnpm build
  • Manually verified the change

Checklist

  • I read CONTRIBUTING (if it exists)
  • My commits follow the Conventional Commits spec (enforced by commitlint)
  • I targeted the main branch
  • I updated relevant documentation

Screenshots / recordings

Notes for reviewers

aqib-rx added 3 commits June 4, 2026 13:07
…ode)

The builder now writes ui-schema.json on every create/edit — fixing two
reported issues:
- Create pages (collections/singles/components) ignored the mode flag and
  applied to the DB with fields: [], producing title+slug-only tables. They now
  mirror the new entity to ui-schema.json (best-effort) after the DB create.
- File mode (NEXT_PUBLIC_NEXTLY_UI_SCHEMA_WRITE=1) was half-built: it skipped
  the DB but the builder loads entities from the DB and has no read path, so it
  could not apply migrations. Retire the flag + isUiSchemaWriteMode(); the
  builder always dual-writes (DB + ui-schema.json), which is the path that
  already works end-to-end.

Database mode already dual-wrote ui-schema.json, so the committable manifest +
migrate workflow is unchanged. Keeps UI_SCHEMA_FIELD_TYPES for the field picker.
dev:reset defaulted to DB_DIALECT ?? "sqlite", so a bare `pnpm dev:reset`
against a Postgres/Neon DATABASE_URL silently wiped a nonexistent SQLite file and
left the real DB untouched (stale dynamic_collections + extra tables). Extract
resolveDialect(dbDialect, databaseUrl): an explicit DB_DIALECT wins, otherwise
detect from the URL scheme — matching how the migrate CLI already auto-detects.
… behavior

checkEnvFile now copies .env.example to .env when present (and asks to create
manually when both are missing); the old test still expected the removed
'cp .env.example .env' hint and failed. Cover both real branches instead.
@aqib-rx aqib-rx merged commit 8663a4f into feat/unified-schema-pipeline Jun 4, 2026
1 of 2 checks passed
@github-actions github-actions Bot added scope: admin @nextlyhq/admin type: docs Documentation only labels Jun 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

PR title fails Conventional Commits check

No release type found in pull request title "Feat/UI schema dual write". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat
 - fix
 - docs
 - style
 - refactor
 - perf
 - test
 - build
 - ci
 - chore
 - revert

Examples of valid titles:

  • feat(admin): add role manager dialog
  • fix(adapter-postgres): handle connection pool exhaustion
  • chore(deps): bump zod to 4.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: admin @nextlyhq/admin type: docs Documentation only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant