Skip to content

Conversation

@urmauur
Copy link
Member

@urmauur urmauur commented Sep 23, 2025

Describe Your Changes

This pull request refactors and improves the code quality and UI consistency of the ModelCombobox and LeftPanel components. The main changes include code style improvements for better readability, enhanced handling of dropdowns and keyboard navigation, and some UI adjustments in the left panel layout. The update also removes unused code and streamlines component rendering logic.

ModelCombobox improvements

  • Refactored function and component definitions for better readability, including consistent formatting and expanded callback parameters. This affects the dropdown position calculation, error/loading/empty sections, keyboard navigation, and event handling logic. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
  • Improved keyboard navigation logic and dropdown event handling to ensure correct focus and selection behavior, including better handling of edge cases and event listeners. [1] [2] [3] [4] [5] [6]
  • Updated dropdown rendering logic to use more concise conditional checks and improved portal rendering for the dropdown content. [1] [2] [3]

LeftPanel layout and cleanup

  • Removed unused imports and state related to downloads, and simplified the calculation of the main content height. [1] [2] [3]
  • Adjusted rendering of the DownloadManagement component to improve layout consistency and moved its placement for better UI organization.
  • Minor formatting and style changes for dialog rendering and button alignment.

DownloadManagement minor fix

  • Improved code formatting for the download cancellation logic to enhance readability.

Fixes Issues

Screenshot 2025-09-23 at 20 14 44 Screenshot 2025-09-23 at 20 02 24
  • 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

Refactors ModelCombobox and LeftPanel for improved readability, UI consistency, and functionality, with enhanced dropdown handling and keyboard navigation.

  • ModelCombobox:
    • Refactored for readability: consistent formatting, expanded callback parameters.
    • Improved keyboard navigation and dropdown event handling for focus and selection.
    • Updated dropdown rendering logic for concise conditional checks and portal rendering.
  • LeftPanel:
    • Removed unused imports and state related to downloads.
    • Simplified main content height calculation.
    • Adjusted DownloadManagement component layout for consistency.
  • DownloadManagement:
    • Improved code formatting for download cancellation logic.
  • Tests:
    • Updated ModelCombobox.test.tsx to cover new behaviors and edge cases.

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

@urmauur urmauur added this to the v0.7.0 milestone Sep 23, 2025
@urmauur urmauur self-assigned this Sep 23, 2025
@urmauur urmauur added this to Jan Sep 23, 2025
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 d3fff15 in 2 minutes and 6 seconds. Click for details.
  • Reviewed 499 lines of code in 3 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/DownloadManegement.tsx:402
  • Draft comment:
    Consider adding error handling (e.g. a .catch()) for the abortDownload promise to gracefully handle failures.
  • Reason this comment was not posted:
    Comment was on unchanged code.
2. web-app/src/containers/LeftPanel.tsx:262
  • Draft comment:
    Verify that changing the flex container's height to a fixed '!h-[calc(100%-200px)]' meets UI requirements in both download and non-download scenarios.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to verify if a change meets UI requirements, which is against the rules. It doesn't provide a specific suggestion or point out a clear issue with the code.
3. web-app/src/containers/LeftPanel.tsx:466
  • Draft comment:
    Ensure that relocating the component to its new position fits the intended UI design.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is asking the PR author to ensure that the relocation of a component fits the intended UI design. It is essentially asking the author to double-check their work, which violates the rule against asking for confirmation or verification of intentions.
4. web-app/src/containers/ModelCombobox.tsx:172
  • Draft comment:
    Consider extracting the repeated keyboard navigation index calculations into helper functions to enhance readability.
  • Reason this comment was not posted:
    Comment was on unchanged code.
5. web-app/src/containers/ModelCombobox.tsx:336
  • Draft comment:
    Resetting 'open' and 'highlightedIndex' in the unmount cleanup may be unnecessary; consider removing these state resets to avoid potential side effects.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
6. web-app/src/containers/LeftPanel.tsx:35
  • Draft comment:
    Typo: The import path '@/containers/DownloadManegement' appears to have a typographical error. It likely should be '@/containers/DownloadManagement' to match the imported name.
  • Reason this comment was not posted:
    Comment was on unchanged code.
7. web-app/src/containers/LeftPanel.tsx:263
  • Draft comment:
    There appears to be an extra trailing space at the end of the class name string ("flex flex-col justify-between overflow-hidden mt-0 !h-[calc(100%-42px)] "). Is this intentional or should it be removed?
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50% While technically correct, trailing spaces in className strings in React/JSX have no effect on the rendered output. The space will be normalized by the browser's HTML parser. This is a purely cosmetic code style issue that has no functional impact. According to the rules, we should not make comments that are obvious or unimportant. Maybe inconsistent code style could lead to confusion or make the code harder to maintain over time? Maybe there's a linter rule about this? Even if there's a style guide preference, this is too minor of an issue to warrant a PR comment. If trailing spaces are important, it should be handled by automated tooling like Prettier or ESLint, not manual code review. Delete this comment. Trailing spaces in className strings have no functional impact and style issues this minor should be handled by automated tooling rather than PR comments.

Workflow ID: wflow_kZINLogkbW25Wrqt

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

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 3a5580c in 1 minute and 19 seconds. Click for details.
  • Reviewed 323 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 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/__tests__/ModelCombobox.test.tsx:1
  • Draft comment:
    Multiline destructuring import for 'vitest' improves readability. Ensure this style is consistent with project conventions.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. web-app/src/containers/__tests__/ModelCombobox.test.tsx:22
  • Draft comment:
    Multiline formatting for the translation function (key 'common:noModelsFoundFor') improves clarity.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. web-app/src/containers/__tests__/ModelCombobox.test.tsx:92
  • Draft comment:
    The test for 'shows loading spinner in trigger button' was removed. Confirm that this spinner behavior is either deprecated or tested elsewhere.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to confirm whether the removal of a test is intentional and if the behavior is deprecated or tested elsewhere. This is asking for confirmation, which violates the rules.
4. web-app/src/containers/__tests__/ModelCombobox.test.tsx:277
  • Draft comment:
    Consistent multi-line formatting for document.querySelector calls improves readability.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_JEWNzCSie956eHES

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

@urmauur urmauur merged commit 5b59c7a into dev Sep 24, 2025
20 checks passed
@github-project-automation github-project-automation bot moved this to QA in Jan Sep 24, 2025
@urmauur urmauur deleted the fix/layout-downlod-management branch September 24, 2025 02:48
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.

3 participants