[WIP] Add SysUserPreference system object to plugin-auth#1104
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Create sys-user-preference.object.ts with complete schema definition - Add USER_PREFERENCE constant to SystemObjectName in spec - Register SysUserPreference in AuthPlugin with other auth objects - Update tests to validate new USER_PREFERENCE constant - Support user preferences layer in Config Resolution hierarchy Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/9ec9dd2d-4fd7-4b98-9840-031868eb27d4 Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new system object for per-user preference persistence in the auth/identity domain, aligning code with the documented Config Resolution “User Preferences” layer by introducing a canonical system name and registering the object in plugin-auth.
Changes:
- Added
SystemObjectName.USER_PREFERENCEconstant (sys_user_preference) and updated its unit tests. - Introduced
SysUserPreferencesystem object schema (sys.user_preference) with fields and indexes suitable for key/value preference storage. - Registered/exported
SysUserPreferenceviaplugin-authobject exports and manifest registration.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/spec/src/system/constants/system-names.ts | Adds canonical system object name constant for user preferences. |
| packages/spec/src/system/constants/system-names.test.ts | Extends coverage to assert the new USER_PREFERENCE constant is present/correct. |
| packages/plugins/plugin-auth/src/objects/sys-user-preference.object.ts | Defines the SysUserPreference system object schema (fields/indexes/capabilities). |
| packages/plugins/plugin-auth/src/objects/index.ts | Exports SysUserPreference from the auth objects barrel. |
| packages/plugins/plugin-auth/src/auth-plugin.ts | Registers SysUserPreference in the system manifest objects list. |
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.
Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.