Skip to content

Conversation

@louis-jan
Copy link
Contributor

@louis-jan louis-jan commented Sep 30, 2025

This pull request improves the user experience when adding a new model by preventing duplicate model IDs and providing localized error messages. The main changes are an added check in the add model dialog to detect existing model IDs and new translations for the error message in multiple languages.

CleanShot 2025-09-30 at 12 20 27@2x

User experience improvements:

  • Added a check in DialogAddModel (AddModel.tsx) to prevent users from adding a model with an ID that already exists, displaying an error toast if a duplicate is detected.
  • Integrated the sonner toast library to show error notifications in the add model dialog.

Localization updates:

  • Added new translation keys for the duplicate model ID error (modelExists, modelExistsDesc) in English, German, Indonesian, Polish, Vietnamese, Simplified Chinese, and Traditional Chinese locale files. [1] [2] [3] [4] [5] [6] [7]

Copilot AI review requested due to automatic review settings September 30, 2025 05:20
Copy link
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

This pull request prevents duplicate model IDs when adding new models by implementing validation checks and providing localized error messages to improve user experience.

  • Added duplicate model ID validation in the AddModel dialog with error toast notifications
  • Added localization support for error messages across 7 language locales
  • Integrated the sonner toast library for user-friendly error notifications

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

File Description
web-app/src/containers/dialogs/AddModel.tsx Added duplicate model check with toast error notification
web-app/src/locales/*/providers.json Added translations for model exists error messages

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link
Contributor

Barecheck - Code coverage report

Total: 29.65%

Your code coverage diff: 0.00% ▴

Uncovered files and lines
FileLines
web-app/src/containers/dialogs/AddModel.tsx1, 10-20, 27-32, 35-37, 40-41, 43-48, 51-56, 58-63, 65-73, 76-80, 83-85, 87-93, 95-101, 103-110, 113-116, 118-132, 135-141, 143-149, 152-156, 158-162, 164

@Minh141120
Copy link
Member

LGTM!
image

image

@louis-jan louis-jan merged commit de9c044 into release/v0.7.0 Sep 30, 2025
17 checks passed
@louis-jan louis-jan deleted the fix/adding-duplicate-model-error branch September 30, 2025 06:59
@github-project-automation github-project-automation bot moved this to QA in Jan Sep 30, 2025
@github-actions github-actions bot added this to the v0.7.0 milestone Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants