Skip to content

fix: Fixes for admin configuration + transformers#658

Merged
kingston merged 3 commits into
mainfrom
kingston/eng-864-reset-the-admin-table-column-when-adding-a-new-one
Sep 10, 2025
Merged

fix: Fixes for admin configuration + transformers#658
kingston merged 3 commits into
mainfrom
kingston/eng-864-reset-the-admin-table-column-when-adding-a-new-one

Conversation

@kingston

@kingston kingston commented Sep 10, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Drag-and-drop reordering for admin form fields.
    • Dialogs for actions, fields, and columns now auto-reset to sensible defaults when creating new items.
  • Bug Fixes

    • Admin section URLs and navigation links now work correctly when names include spaces.
  • Chores

    • Added patch release entries for project-builder-web and project-builder-server.

@vercel

vercel Bot commented Sep 10, 2025

Copy link
Copy Markdown

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

Project Deployment Preview Comments Updated (UTC)
baseplate-project-builder-web Error Error Sep 10, 2025 5:03pm

@changeset-bot

changeset-bot Bot commented Sep 10, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3b3633a

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

This PR includes changesets to release 18 packages
Name Type
@baseplate-dev/project-builder-web Patch
@baseplate-dev/project-builder-server Patch
@baseplate-dev/project-builder-cli Patch
@baseplate-dev/project-builder-test Patch
@baseplate-dev/project-builder-common Patch
@baseplate-dev/create-project Patch
@baseplate-dev/code-morph Patch
@baseplate-dev/core-generators Patch
@baseplate-dev/fastify-generators Patch
@baseplate-dev/project-builder-lib Patch
@baseplate-dev/react-generators Patch
@baseplate-dev/sync Patch
@baseplate-dev/tools Patch
@baseplate-dev/ui-components Patch
@baseplate-dev/utils Patch
@baseplate-dev/plugin-auth Patch
@baseplate-dev/plugin-queue Patch
@baseplate-dev/plugin-storage 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

@coderabbitai

coderabbitai Bot commented Sep 10, 2025

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

Adds two changesets. Updates server casing utilities and navigation path generation to use kebabCase and titleized labels. In the web app, admin dialogs now reset to defaults when creating new items, and CRUD form fields become sortable with a drag-and-drop list.

Changes

Cohort / File(s) Summary of Changes
Release metadata
\.changeset/hungry-pens-sit.md, \.changeset/mean-buckets-check.md
Added patch changesets for web (reset dialogs on new field) and server (fix admin paths with spaces).
Server casing and paths
packages/project-builder-server/src/compiler/web/index.ts, packages/project-builder-server/src/utils/case.ts
Switched admin path generation to kebabCase(section.name.toLocaleLowerCase()); replaced exported dasherizeCamel with titleizeCamel(underscore(str)); removed lowerCaseFirst; labels still use titleize.
Admin dialogs reset defaults
packages/project-builder-web/src/routes/admin-sections.$appKey/-components/action-dialog.tsx, .../column-dialog.tsx, .../field-dialog.tsx
Added useEffect-driven form reset(...) when dialog opens without an existing entity, initializing default values for action, column, and field forms.
CRUD form fields sorting
packages/project-builder-web/src/routes/admin-sections.$appKey/-components/crud-form-fields-form.tsx
Integrated SortableList; used useFieldArray().move for drag-and-drop reordering; introduced list item renderer with actions; empty-state message when no fields exist.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Dialog as Admin Dialog (Field/Column/Action)
  participant Form as useForm
  note over Dialog,Form: New dialog open without existing item
  User->>Dialog: Open
  Dialog->>Form: useEffect([open, entity, reset])
  alt open && !entity
    Form->>Form: reset(defaultValues)
  else
    Note over Form: No reset (editing existing)
  end
Loading
sequenceDiagram
  autonumber
  actor User
  participant UI as CRUD Form Fields
  participant Sortable as SortableList
  participant Fields as useFieldArray
  User->>Sortable: Drag field A above field B
  Sortable-->>UI: onSort(fromIndex, toIndex)
  UI->>Fields: move(fromIndex, toIndex)
  Fields-->>UI: fields reordered
  UI-->>User: Updated list order
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

Possibly related PRs

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 6d0be95 and 3b3633a.

📒 Files selected for processing (8)
  • .changeset/hungry-pens-sit.md (1 hunks)
  • .changeset/mean-buckets-check.md (1 hunks)
  • packages/project-builder-server/src/compiler/web/index.ts (2 hunks)
  • packages/project-builder-server/src/utils/case.ts (1 hunks)
  • packages/project-builder-web/src/routes/admin-sections.$appKey/-components/action-dialog.tsx (2 hunks)
  • packages/project-builder-web/src/routes/admin-sections.$appKey/-components/column-dialog.tsx (2 hunks)
  • packages/project-builder-web/src/routes/admin-sections.$appKey/-components/crud-form-fields-form.tsx (3 hunks)
  • packages/project-builder-web/src/routes/admin-sections.$appKey/-components/field-dialog.tsx (2 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kingston/eng-864-reset-the-admin-table-column-when-adding-a-new-one

Comment @coderabbitai help to get the list of available commands and usage tips.

@kingston kingston merged commit fe86213 into main Sep 10, 2025
11 of 13 checks passed
@kingston kingston deleted the kingston/eng-864-reset-the-admin-table-column-when-adding-a-new-one branch September 10, 2025 17:06
@github-actions github-actions Bot mentioned this pull request Sep 10, 2025
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