feat: add configurable user profile fields plugin#747
Merged
Conversation
Add a user-profiles plugin that lets developers define custom profile fields via defineUserProfile() at app boot. Custom data is stored as JSON in a new `data` column on user_profiles and rendered in the admin UI using the existing dynamic-field renderer. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
lane711
added a commit
that referenced
this pull request
Apr 8, 2026
The user edit page (/admin/users/:id/edit) crashes with a 500 error because the user_profiles table is missing the `data` column. PR #747 added code querying this column but placed the migration in the wrong directory (src/db/migrations/ instead of migrations/), so it was never bundled or executed. - Add data column to migration 032 CREATE TABLE (fresh installs) - Add migration 035 ALTER TABLE for existing databases - Add data column to app-level migration 018 - Remove misplaced 0011_user_profiles_data.sql - Regenerate migrations bundle Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7 tasks
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
user-profilescore plugin that lets developers define custom profile fields viadefineUserProfile()at app bootdatacolumn onuser_profiles— no new tables or per-field schema migrationsrenderDynamicFieldsystemregistrationFieldsconfigChanges
New Files
plugins/core-plugins/user-profiles/index.tsplugins/core-plugins/user-profiles/user-profile-registry.tsdefineUserProfile()singleton config registryplugins/core-plugins/user-profiles/user-profile-service.tsplugins/core-plugins/user-profiles/user-profile-renderer.tsrenderDynamicFieldplugins/core-plugins/user-profiles/manifest.jsondb/migrations/0011_user_profiles_data.sqlALTER TABLE user_profiles ADD COLUMN data__tests__/plugins/user-profile-registry.test.ts__tests__/plugins/user-profile-service.test.tsModified Files
db/migrations-bundle.tsapp.tsindex.tsdefineUserProfile, typesplugins/core-plugins/index.tsservices/plugin-bootstrap.tsroutes/admin-users.tstemplates/pages/admin-user-edit.template.tstemplates/pages/admin-profile.template.tsroutes/auth.tsDeveloper Usage
Testing
Checklist
defineUserProfile()not calledsanitizeInput()before storageCloses #744
🤖 Generated with Claude Code