Skip to content

Conversation

@urmauur
Copy link
Member

@urmauur urmauur commented Sep 17, 2025

Describe Your Changes

This pull request focuses on improving the robustness of several dialog components in the web application by preventing them from closing when users interact outside the dialog area. Additionally, it includes minor code style and readability improvements in the model import logic. These changes help ensure that users do not accidentally dismiss dialogs and improve maintainability.

Dialog interaction handling:

  • Updated DialogContent in AddEditAssistant.tsx, AddEditMCPServer.tsx, EditJsonMCPserver.tsx, and ImportVisionModelDialog.tsx to prevent closing dialogs when clicking outside by using onInteractOutside with e.preventDefault(). [1] [2] [3] [4]

Code style and readability improvements:

  • Refactored callbacks in ImportVisionModelDialog.tsx to use consistent arrow function formatting and dependency arrays for useCallback. [1] [2]
  • Improved readability of error handling and async invocation in ImportVisionModelDialog.tsx by formatting function calls and error messages. [1] [2]
  • Reformatted validation logic in AddEditMCPServer.tsx for clarity and consistency.

Fixes Issues

  • Closes #
  • Closes #

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

Important

Prevents dialogs from closing on outside click and improves code style in ImportVisionModelDialog.tsx and AddEditMCPServer.tsx.

  • Behavior:
    • Prevents dialogs from closing on outside click in AddEditAssistant.tsx, AddEditMCPServer.tsx, EditJsonMCPserver.tsx, and ImportVisionModelDialog.tsx using onInteractOutside with e.preventDefault().
  • Code Style:
    • Refactors callbacks in ImportVisionModelDialog.tsx to use consistent arrow function formatting and dependency arrays for useCallback.
    • Improves readability of error handling and async invocation in ImportVisionModelDialog.tsx.
    • Reformats validation logic in AddEditMCPServer.tsx for clarity and consistency.

This description was created by Ellipsis for 6f2a019. You can customize this summary. It will automatically update as commits are pushed.

@urmauur urmauur added this to the v0.6.10 milestone Sep 17, 2025
@urmauur urmauur self-assigned this Sep 17, 2025
@urmauur urmauur moved this to Needs Review in Jan Sep 17, 2025
Copy link
Contributor

@louis-jan louis-jan left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 6f2a019 in 1 minute and 39 seconds. Click for details.
  • Reviewed 350 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 7 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. web-app/src/containers/dialogs/AddEditAssistant.tsx:239
  • Draft comment:
    Good use of onInteractOutside to prevent accidental dialog closure. Inline handler is acceptable.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. web-app/src/containers/dialogs/AddEditMCPServer.tsx:307
  • Draft comment:
    Reformatted validation check for server type improves readability and consistency.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. web-app/src/containers/dialogs/AddEditMCPServer.tsx:371
  • Draft comment:
    Adding onInteractOutside to DialogContent prevents unintended dialog closure on outside clicks.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
4. web-app/src/containers/dialogs/EditJsonMCPserver.tsx:61
  • Draft comment:
    Consistent use of onInteractOutside here prevents accidental dismissals of the JSON editing dialog.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
5. web-app/src/containers/dialogs/ImportVisionModelDialog.tsx:47
  • Draft comment:
    Refactored validateGgufFile function enhances clarity and consistency. Consider adding a fallback if the validateGgufFile method is unavailable.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
6. web-app/src/containers/dialogs/ImportVisionModelDialog.tsx:309
  • Draft comment:
    Consistent use of onInteractOutside in DialogContent ensures the dialog remains open on accidental outside clicks.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
7. web-app/src/containers/dialogs/ImportVisionModelDialog.tsx:288
  • Draft comment:
    useEffect re-validates the MMProj file when modelName changes, ensuring compatibility checks remain current.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_3ZkKgMBzHIdyMS4a

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@github-actions
Copy link
Contributor

Barecheck - Code coverage report

Total: 29.2%

Your code coverage diff: -0.03% ▾

Uncovered files and lines
FileLines
web-app/src/containers/dialogs/AddEditAssistant.tsx1-2, 9-11, 17, 19-20, 22, 28-32, 42-49, 51-66, 69-79, 81-83, 85-88, 91-98, 101-102, 105-110, 112-115, 117-119, 121-132, 134-144, 147-157, 159-163, 165-168, 171, 173-181, 183-186, 188-192, 194-204, 206-211, 213-218, 220-233, 235, 237-242, 244-260, 262-267, 269, 271-281, 283-292, 294-308, 310-313, 316-326, 328-342, 344-365, 367-377, 379-382, 384-386, 389-408, 410-418, 420-424, 426-431, 433-435, 437-441, 443-446, 448-450, 452-458, 460-471, 474-478, 481-485, 488-492, 495-498, 500-508, 510-521, 524-528, 531-540, 542-543, 545-547, 549-552, 554-557, 559-562, 564-569, 571-575, 577
web-app/src/containers/dialogs/AddEditMCPServer.tsx1-2, 9-12, 19-20, 28, 34-37, 40-47, 54-62, 64-68, 70-77, 79-82, 84-95, 97-98, 100, 102, 112-134, 137-144, 147-152, 154, 156-157, 159-161, 163, 165-168, 170-173, 175-177, 179-193, 195-197, 199-203, 205-209, 211-213, 216-224, 226-229, 231-238, 240-244, 246-250, 252-255, 257-264, 266-270, 272-276, 278, 280-282, 284-287, 289-292, 295-300, 303, 306-317, 319-329, 333-339, 342-348, 351, 353-363, 365-370, 372-378, 380-393, 395-409, 418-435, 437-448, 450-451, 453-457, 459, 461-466, 468-475, 477-484, 486-489, 491-501, 503-510, 513-521, 523-525, 527-537, 539-541, 543-558, 561-567, 569-571, 573-578, 580-586, 588-594, 596-597, 599-601, 604-611, 613-615, 617-620, 622-625, 627-633, 635-641, 643-644, 646-648, 650-651, 653-661, 663, 666-672, 674-678, 680
web-app/src/containers/dialogs/AddProviderDialog.tsx30-35, 38-40, 43-46, 48-49, 52-56, 64-66
web-app/src/containers/dialogs/EditJsonMCPserver.tsx1-2, 9, 11-13, 23-32, 35-44, 46, 48-49, 51-60, 62-67, 69-78, 88-106, 108-112, 114
web-app/src/containers/dialogs/ImportVisionModelDialog.tsx1, 10-15, 28-42, 44-45, 47-55, 57, 59, 61-62, 64, 66-67, 70, 72-74, 77-86, 88-93, 95, 97, 99-104, 107-109, 112-113, 116-128, 130-152, 154-168, 170-175, 177-182, 184-188, 190-191, 193-194, 196-200, 203-205, 207-210, 212-216, 218-221, 223-226, 229-231, 233-238, 240, 242-243, 245-250, 252-253, 255-256, 258-260, 263-275, 277-286, 289-293, 295-302, 304-310, 312-313, 315-316, 319-320, 322, 324-330, 332-333, 336-352, 355-358, 360-365, 369, 371-373, 375-376, 378-379, 381-395, 397, 399-409, 411-413, 416-424, 426-432, 436-443, 445-447, 449, 451-457, 459, 461, 464-468, 470-471, 473-487, 489, 491-501, 503-505, 508-516, 518-524, 528-535, 537-539, 541, 543-549, 551, 553, 555-556, 558-564, 566-577, 579, 581-583, 585, 587-590, 592

Copy link
Member

@Minh141120 Minh141120 left a comment

Choose a reason for hiding this comment

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

LGTM!

@urmauur urmauur merged commit b4fd7c3 into release/v0.6.10 Sep 17, 2025
17 checks passed
@urmauur urmauur deleted the fix/edit-dialog branch September 17, 2025 03:22
@github-project-automation github-project-automation bot moved this from Needs Review to QA in Jan Sep 17, 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