Skip to content

feat(FR-1220): Add duplicate check logic for session and service names #3937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hummingbbird
Copy link
Contributor

@hummingbbird hummingbbird commented Jul 11, 2025

Resolves #3920 (FR-1220)

description

update validation messages for session/service names.

  1. Modify ambiguous expressions
    update the validation logic to clarify ambiguous expressions.

  2. add validation logic for duplicated name
    add a function to check for duplicate names using an existing GraphQL query.

to reviewers

Although many files were changed, most of them are i18n files, so I committed them all at once.

Copy link

graphite-app bot commented Jul 11, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added area:ux UI / UX issue. area:i18n Localization size:XL 500~ LoC labels Jul 11, 2025
Copy link

github-actions bot commented Jul 11, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
4.52% (-0.01% 🔻)
492/10883
🔴 Branches
4.02% (-0.01% 🔻)
306/7616
🔴 Functions
2.63% (-0% 🔻)
91/3462
🔴 Lines
4.48% (-0.01% 🔻)
477/10646
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴
... / useValidateSessionName.tsx
0% 0% 0% 0%
🔴
... / useValidateServiceName.tsx
0% 0% 0% 0%

Test suite run success

159 tests passing in 15 suites.

Report generated by 🧪jest coverage report action from 0a257b9

@hummingbbird hummingbbird force-pushed the feat/add-duplicate-check-logic-and-modify-validation-message-to-service-and-session-name-input branch from 53dd8e6 to a99992d Compare July 11, 2025 04:26
Copy link
Contributor Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

@nowgnuesLee nowgnuesLee left a comment

Choose a reason for hiding this comment

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

It seems like a good idea to make it possible to tell from the PR title what the PR fixes. Example. Add name duplication check before creating session and service

"ServiceCreated": "Model service {{ name }} has been created successfully.",
"ServiceDelegatedFrom": "Model service is created by {{ createdUser }} but the session ownership will be delegated to {{ sessionOwner }}",
"ServiceEndpoint": "Service Endpoint",
"ServiceInfo": "Service Info",
"ServiceName": "Service Name",
"ServiceName": "Service name",
Copy link
Contributor

Choose a reason for hiding this comment

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

please use uppercase.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I modified this because everywhere else uses 'service name'. so, can i change all instances to uppercase for consistency?

Copy link
Contributor

Choose a reason for hiding this comment

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

we're using uppercase in the service form, so I think it's good to use it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see. you mean fix only that instance into uppercase? i'll fix that way.

Copy link
Contributor

Choose a reason for hiding this comment

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

please fix here.

Copy link
Contributor

Choose a reason for hiding this comment

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

please fix here. @hummingbbird

@hummingbbird hummingbbird force-pushed the feat/add-duplicate-check-logic-and-modify-validation-message-to-service-and-session-name-input branch from a99992d to dec2fe2 Compare July 11, 2025 05:47
@hummingbbird
Copy link
Contributor Author

It seems like a good idea to make it possible to tell from the PR title what the PR fixes. Example. Add name duplication check before creating session and service

I did it because of the character limit. I'll try to edit it like that😃

@hummingbbird hummingbbird changed the title feat(FR-1120): modify session and service name validation logic feat(FR-1120): add name duplicate check logic for session/service names Jul 11, 2025
@hummingbbird hummingbbird changed the title feat(FR-1120): add name duplicate check logic for session/service names feat(FR-1120): Add name duplicate check logic for session and service names Jul 11, 2025
@hummingbbird hummingbbird requested a review from nowgnuesLee July 11, 2025 06:14
@hummingbbird hummingbbird changed the title feat(FR-1120): Add name duplicate check logic for session and service names feat(FR-1120): Add duplicate check logic for session and service names Jul 11, 2025
@hummingbbird hummingbbird force-pushed the feat/add-duplicate-check-logic-and-modify-validation-message-to-service-and-session-name-input branch from dec2fe2 to f4a30fe Compare July 11, 2025 07:27
@github-actions github-actions bot added size:L 100~500 LoC and removed size:XL 500~ LoC labels Jul 11, 2025
@hummingbbird hummingbbird force-pushed the feat/add-duplicate-check-logic-and-modify-validation-message-to-service-and-session-name-input branch from f4a30fe to 66fb7ea Compare July 11, 2025 07:42
Copy link
Contributor

@nowgnuesLee nowgnuesLee left a comment

Choose a reason for hiding this comment

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

LGTM

@yomybaby yomybaby changed the title feat(FR-1120): Add duplicate check logic for session and service names feat(FR-1220): Add duplicate check logic for session and service names Jul 15, 2025
Copy link
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

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

Let's make custom hooks for validation rules of session and service names

@hummingbbird hummingbbird force-pushed the feat/add-duplicate-check-logic-and-modify-validation-message-to-service-and-session-name-input branch 3 times, most recently from f157499 to 330e05a Compare July 16, 2025 04:22
@hummingbbird hummingbbird force-pushed the feat/add-duplicate-check-logic-and-modify-validation-message-to-service-and-session-name-input branch from 330e05a to 85ce962 Compare July 18, 2025 01:06
@hummingbbird hummingbbird requested a review from nowgnuesLee July 18, 2025 04:06
"ServiceCreated": "Model service {{ name }} has been created successfully.",
"ServiceDelegatedFrom": "Model service is created by {{ createdUser }} but the session ownership will be delegated to {{ sessionOwner }}",
"ServiceEndpoint": "Service Endpoint",
"ServiceInfo": "Service Info",
"ServiceName": "Service Name",
"ServiceName": "Service name",
Copy link
Contributor

Choose a reason for hiding this comment

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

please fix here.

@hummingbbird hummingbbird force-pushed the feat/add-duplicate-check-logic-and-modify-validation-message-to-service-and-session-name-input branch from 85ce962 to 7cf9a49 Compare July 18, 2025 08:57
@hummingbbird hummingbbird force-pushed the feat/add-duplicate-check-logic-and-modify-validation-message-to-service-and-session-name-input branch from 7cf9a49 to b775ea5 Compare July 21, 2025 00:39
@hummingbbird hummingbbird requested a review from nowgnuesLee July 21, 2025 00:42
"ServiceCreated": "Model service {{ name }} has been created successfully.",
"ServiceDelegatedFrom": "Model service is created by {{ createdUser }} but the session ownership will be delegated to {{ sessionOwner }}",
"ServiceEndpoint": "Service Endpoint",
"ServiceInfo": "Service Info",
"ServiceName": "Service Name",
"ServiceName": "Service name",
Copy link
Contributor

Choose a reason for hiding this comment

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

please fix here. @hummingbbird

@yomybaby yomybaby force-pushed the feat/add-duplicate-check-logic-and-modify-validation-message-to-service-and-session-name-input branch from 7297c6f to 9485f3e Compare July 21, 2025 02:39
@hummingbbird hummingbbird force-pushed the feat/add-duplicate-check-logic-and-modify-validation-message-to-service-and-session-name-input branch from 9485f3e to 96a761c Compare July 21, 2025 06:36
Copy link
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

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

Please re-request. review after reviewing my commits.

Copy link
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

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

LGTM!

@hummingbbird hummingbbird force-pushed the feat/add-duplicate-check-logic-and-modify-validation-message-to-service-and-session-name-input branch from 96a761c to 1503ba8 Compare July 21, 2025 07:38
@hummingbbird hummingbbird force-pushed the feat/add-duplicate-check-logic-and-modify-validation-message-to-service-and-session-name-input branch from 1503ba8 to 9637f37 Compare July 21, 2025 07:52
@hummingbbird hummingbbird requested a review from nowgnuesLee July 21, 2025 07:53
@hummingbbird hummingbbird force-pushed the feat/add-duplicate-check-logic-and-modify-validation-message-to-service-and-session-name-input branch 2 times, most recently from 6738bae to a769c8d Compare July 21, 2025 08:23
@hummingbbird hummingbbird force-pushed the feat/add-duplicate-check-logic-and-modify-validation-message-to-service-and-session-name-input branch from a769c8d to 0a257b9 Compare July 21, 2025 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:i18n Localization area:ux UI / UX issue. size:L 100~500 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add duplicate check logic for session and service names
3 participants