Feat/UI schema dual write#79
Merged
Merged
Conversation
…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.
Contributor
PR title fails Conventional Commits checkExamples of valid titles:
|
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
Type of change
Related issues
Changeset
This repo uses Changesets. If your PR changes any publishable package under
packages/*, you must include a changeset:Then commit the generated
.changeset/*.mdfile.apps/*)Test plan
pnpm lintpnpm check-typespnpm buildChecklist
mainbranchScreenshots / recordings
Notes for reviewers