Skip to content

Add clear AI configuration endpoint#4443

Open
nelsonkopliku wants to merge 3 commits into
clear-ai-settingsfrom
clear-ai-settings-action
Open

Add clear AI configuration endpoint#4443
nelsonkopliku wants to merge 3 commits into
clear-ai-settingsfrom
clear-ai-settings-action

Conversation

@nelsonkopliku

@nelsonkopliku nelsonkopliku commented Jul 1, 2026

Copy link
Copy Markdown
Member

Description

This PR wires the clear ai configuration rest endpoint.

Follow up:

  • activity logging
  • UI changes
  • e2e tests

How was this tested?

Automated and IRL.

@nelsonkopliku nelsonkopliku self-assigned this Jul 1, 2026
@nelsonkopliku nelsonkopliku added the enhancement New feature or request label Jul 1, 2026
@nelsonkopliku nelsonkopliku added this to the 3.2.0 milestone Jul 1, 2026

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

This PR adds a REST endpoint to clear (delete) the currently authenticated user’s AI configuration, wiring it into the V1 profile routes and adding controller-level tests.

Changes:

  • Added DELETE /api/v1/profile/ai_configuration route to clear a user’s AI configuration.
  • Implemented clear_ai_configuration/2 action with OpenAPI spec metadata.
  • Added controller tests covering successful clear and idempotency behavior.

Reviewed changes

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

File Description
test/trento_web/controllers/v1/ai_configuration_controller_test.exs Adds tests for the new clear AI configuration endpoint (success + idempotency).
lib/trento_web/router.ex Wires the DELETE route for /profile/ai_configuration.
lib/trento_web/controllers/v1/ai_configuration_controller.ex Adds the clear_ai_configuration controller action and OpenAPI operation definition.

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

Comment thread lib/trento_web/controllers/v1/ai_configuration_controller.ex
Comment thread test/trento_web/controllers/v1/ai_configuration_controller_test.exs
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@nelsonkopliku nelsonkopliku force-pushed the clear-ai-settings-action branch from 809bd9e to c6bfba9 Compare July 1, 2026 16:05

@antgamdia antgamdia 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.

Thanks!

Comment thread lib/trento_web/controllers/v1/ai_configuration_controller.ex
Comment thread lib/trento_web/controllers/v1/ai_configuration_controller.ex Outdated
Comment thread test/trento_web/controllers/v1/ai_configuration_controller_test.exs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

3 participants