Skip to content

[FEAT] Make Settings -> Accout Settings Fully functional#10

Merged
martian56 merged 2 commits into
mainfrom
9-make-settings---accout-settings-fully-functional
Mar 8, 2026
Merged

[FEAT] Make Settings -> Accout Settings Fully functional#10
martian56 merged 2 commits into
mainfrom
9-make-settings---accout-settings-fully-functional

Conversation

@martian56
Copy link
Copy Markdown
Member

This pull request introduces a set of new use account management features and supporting infrastructure, focusing on user profile updates, password changes, notification preferences, API token management, and a basic user activity feed. The changes include both backend service logic and new HTTP API endpoints, as well as model and store implementations for notification preferences and API tokens.

Key changes include:

User Account Management Endpoints:

  • Added endpoints for updating the user's profile (excluding email), changing their password, and retrieving/updating notification preferences. These endpoints include appropriate request validation and error handling.
  • Introduced endpoints for managing API tokens: listing, creating (with expiration options), and revoking tokens, ensuring tokens are only shown once and never returned in full after creation.
  • Implemented a user activity feed endpoint (/api/users/me/activity/) that returns recent comment activity by the user, including related issue information.

Supporting Service and Store Logic:

  • Added UpdateProfile and ChangePassword methods to the authentication service, handling profile updates and secure password changes.
  • Implemented ApiTokenStore for secure token creation, listing (without secrets), and deletion, with hashed token storage and expiration support.
  • Added UserNotificationPreferenceStore and related model for storing and updating per-user notification settings.
  • Extended CommentStore and IssueStore with new methods for fetching user activity and related issues efficiently. [1] [2]

Model Updates:

  • Updated ApiToken model to include an ExpiredAt field for token expiration.
  • Introduced a new UserNotificationPreference model for customizable notification settings.

Router and Dependency Wiring:

  • Registered all new endpoints in the router and ensured the necessary stores and handlers are initialized and injected. [1] [2]

These changes collectively provide users with greater control over their account, security, and notification preferences, as well as visibility into their recent activity.

References:

  • User account/profile endpoints and logic: [1] [2]
  • API token management: [1] [2]
  • Notification preferences:
  • Activity feed and supporting store methods: [1] [2] [3]
  • Router and dependency updates: [1] [2]

Closes #9

@martian56 martian56 self-assigned this Mar 8, 2026
Copilot AI review requested due to automatic review settings March 8, 2026 12:35
@martian56 martian56 added enhancement New feature or request API labels Mar 8, 2026
@martian56 martian56 added this to the Deadline milestone Mar 8, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Implements end-to-end “Account Settings” functionality by adding user self-service APIs (profile, password, notification preferences, activity feed, API tokens) and wiring them into the Settings UI.

Changes:

  • Added new authenticated backend endpoints for updating /users/me, password changes, notification preferences, activity feed, and API token CRUD.
  • Introduced stores/models for user notification preferences and API tokens, plus store helpers for activity feed (comments/issues).
  • Updated the Settings page UI to call the new endpoints and added TypeScript API types + UI service wrapper.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
ui/src/services/userService.ts Adds FE service methods for new account-management endpoints.
ui/src/pages/SettingsPage.tsx Implements functional Account Settings UI (profile, preferences, notifications, security, activity, tokens).
ui/src/api/types.ts Adds TS request/response types for new user/account endpoints.
ui/package.json Bumps UI package version.
ui/package-lock.json Updates lockfile version metadata to match UI version bump.
api/internal/store/user_notification_preference.go Adds persistence layer for global user notification preferences.
api/internal/store/issue.go Adds ListByIDs to support activity feed issue lookups.
api/internal/store/comment.go Adds ListByCreatedByID to fetch user comment activity.
api/internal/store/api_token.go Adds store for creating/listing/revoking API tokens with hashed storage.
api/internal/router/router.go Registers new routes and wires new stores/handlers.
api/internal/model/user_notification_preference.go Adds model for user_notification_preferences.
api/internal/model/api_token.go Extends API token model with expired_at.
api/internal/handler/user.go Adds /api/users/me/activity/ endpoint.
api/internal/handler/auth.go Adds handlers for update-me, change-password, notification prefs, and token management.
api/internal/auth/service.go Adds service methods for profile updates and password changes.
Files not reviewed (1)
  • ui/package-lock.json: Language not supported

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

Comment thread api/internal/handler/auth.go Outdated
Comment thread api/internal/handler/user.go Outdated
Comment thread api/internal/store/user_notification_preference.go Outdated
Comment thread ui/src/pages/SettingsPage.tsx Outdated
Comment thread api/internal/auth/service.go Outdated
Comment thread api/internal/handler/auth.go Outdated
@martian56 martian56 merged commit 904954e into main Mar 8, 2026
2 checks passed
@martian56 martian56 deleted the 9-make-settings---accout-settings-fully-functional branch May 2, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Settings -> Accout Settings Fully functional

2 participants