Skip to content

feat: add user skills#8

Open
dsh0416 wants to merge 2 commits into
mainfrom
dsh0416/user-skills
Open

feat: add user skills#8
dsh0416 wants to merge 2 commits into
mainfrom
dsh0416/user-skills

Conversation

@dsh0416

@dsh0416 dsh0416 commented Jul 9, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 9, 2026 09:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds “skills” to user profiles end-to-end (DB → API → frontend), while also tightening who can update a user profile (owner or system admin) and reflecting that capability in the UI.

Changes:

  • Persist skills on users (migration + model normalization/validation) and expose it via the users API + OpenAPI schema.
  • Add frontend types + UI for editing and viewing skills in the user profile form/details.
  • Enforce profile-update authorization in UserPolicy#update? and adjust request/OpenAPI specs accordingly.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
frontend/src/views/UserProfileView.vue Adds canEditProfile gating for edit UI and messaging.
frontend/src/views/UserGroupsView.vue Computes edit capability, updates current-user after profile save, passes can-edit-profile prop.
frontend/src/stores/auth.ts Adds replaceCurrentUser to sync auth store when editing self.
frontend/src/stores/tests/userGroups.spec.ts Updates test fixtures to include skills.
frontend/src/services/api/types.ts Adds UserSkill/UserSkillLevel types and wires skills into User and UserProfileInput.
frontend/src/router/tests/access.spec.ts Updates route-access test user fixture to include skills.
frontend/src/components/user-groups/UserProfileForm.vue Adds skills editor UI and submission mapping to UserProfileInput.
frontend/src/components/user-groups/UserProfileDetails.vue Displays skills list with level badges.
backend/spec/requests/api/v1/users_spec.rb Adds request specs for skills update/validation + update authorization behavior.
backend/spec/requests/api/v1/openapi/users_spec.rb Updates OpenAPI request examples to include skills.
backend/spec/openapi_helper.rb Extends OpenAPI schema with skills and profile_skill.
backend/spec/models/user_spec.rb Adds model specs for skills normalization/validation.
backend/spec/factories/users.rb Ensures users factory includes skills: [].
backend/openapi/v1/openapi.yaml Updates generated OpenAPI YAML with skills and profile_skill.
backend/db/schema.rb Reflects skills column addition.
backend/db/migrate/20260709110000_add_skills_to_users.rb Adds skills JSON column to users.
backend/app/views/api/v1/users/_user.json.jbuilder Includes skills in user JSON payload.
backend/app/policies/user_policy.rb Restricts profile updates to self or system admin.
backend/app/models/user.rb Adds skills normalization, validation, and search indexing content/metadata.
backend/app/controllers/api/v1/users_controller.rb Permits nested skills params for profile update.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/db/migrate/20260709110000_add_skills_to_users.rb
Comment on lines 57 to 62
async function saveUserProfile(userId: number, input: UserProfileInput) {
let updatedUser

try {
await userGroupsStore.updateUserProfile(userId, input)
updatedUser = await userGroupsStore.updateUserProfile(userId, input)
} catch (err) {
Comment thread frontend/src/components/user-groups/UserProfileDetails.vue
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

2 participants