Skip to content

feat: improve label resolution in form-builder#120

Merged
olliethedev merged 2 commits intomainfrom
fix/form-builder-label
Apr 20, 2026
Merged

feat: improve label resolution in form-builder#120
olliethedev merged 2 commits intomainfrom
fix/form-builder-label

Conversation

@olliethedev
Copy link
Copy Markdown
Collaborator

@olliethedev olliethedev commented Apr 17, 2026

Summary

  • form label formatting when neither label nor title fields are present in schema

Type of change

  • Bug fix
  • New plugin
  • Feature / enhancement to an existing plugin
  • Documentation
  • Chore / refactor / tooling

Checklist

  • pnpm build passes
  • pnpm typecheck passes
  • pnpm lint passes
  • Tests added or updated (unit and/or E2E)
  • Docs updated (docs/content/docs/) if consumer-facing types or behavior changed
  • All three codegen-projects create successfully and pass E2E tests
  • New plugin: submission checklist in CONTRIBUTING.md completed

Screenshots


Note

Low Risk
Low risk: changes only how field labels are derived/displayed in the FormBuilder and its unknown-type fallback, plus adds tests and a patch version bump.

Overview
Improves FormBuilder label resolution so JSON Schema properties without label/title display a humanised field name (via beautifyObjectName) instead of the raw key, aligning the admin canvas with AutoForm rendering.

Updates both the component-level getLabel helper and the schema-utils unknown-field fallback, and adds unit tests covering label/title precedence and the humanised-key fallback. Also bumps @btst/stack to 2.11.7.

Reviewed by Cursor Bugbot for commit 65c3aea. Bugbot is set up for automated code reviews on this repo. Configure here.

…version for consistent admin and public form display
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 17, 2026

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

Project Deployment Actions Updated (UTC)
better-stack-docs Ready Ready Preview, Comment Apr 17, 2026 10:02pm
better-stack-playground Ready Ready Preview, Comment Apr 17, 2026 10:02pm

Request Review

@olliethedev olliethedev changed the title feat: improve label resolution in JSON Schema to FormBuilderField con… feat: improve label resolution in form-builder Apr 17, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Security Review — No High-Confidence Vulnerabilities Found

PR: feat: improve label resolution in JSON Schema to FormBuilderField conversion
Scope: 4 files changed — packages/stack/package.json, packages/ui/src/components/form-builder/components/index.tsx, packages/ui/src/components/form-builder/schema-utils.ts, and a new test file.

What was reviewed

Threat Finding
Injection (SQL/command/template/path) None. beautifyObjectName is a pure string transform (regex + capitalize); no interpreter is involved.
XSS None. The computed label is assigned as a plain string prop to React components. React escapes string props by default; no dangerouslySetInnerHTML is in the call path. prop.label and prop.title were already user-controlled before this PR — the change does not broaden that surface.
Authn/authz bypass None. No authentication or authorization logic is modified.
Secrets / token leakage / insecure logging None. The existing console.warn that logs key and prop (pre-existing, not introduced here) is unchanged in character. No credentials or tokens are in scope.
Supply-chain / new dependencies None. beautifyObjectName is imported from an existing internal module (../auto-form/helpers); no new external packages are added.
Unsafe deserialization / SSRF / CSRF None. No network requests, binary parsing, or cross-origin interactions are introduced.

Conclusion

The diff is a purely cosmetic label-resolution improvement. All changes are confined to display-layer string formatting in the admin canvas. No high-confidence security vulnerability was identified in this pull request.

Open in Web View Automation 

Sent by Cursor Automation: Find vulnerabilities

@github-actions
Copy link
Copy Markdown
Contributor

Shadcn registry updated — registry JSON files were rebuilt and committed to this branch.

@olliethedev olliethedev merged commit 70ca115 into main Apr 20, 2026
3 checks passed
@olliethedev olliethedev deleted the fix/form-builder-label branch April 20, 2026 13:10
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