Skip to content
This repository was archived by the owner on Jun 2, 2026. It is now read-only.

UI improvements#273

Merged
andrewpareles merged 29 commits into
mainfrom
model-selection
Feb 6, 2025
Merged

UI improvements#273
andrewpareles merged 29 commits into
mainfrom
model-selection

Conversation

@andrewpareles

@andrewpareles andrewpareles commented Feb 6, 2025

Copy link
Copy Markdown
Contributor

Important

This pull request enhances the UI with new components, improved error handling, and better input management across various settings and chat interfaces.

  • UI Components:
    • Introduced VoidChatArea component in SidebarChat.tsx for handling chat input and actions.
    • Added WarningBox component in WarningBox.tsx for displaying warnings with optional click actions.
  • Error Handling:
    • Enhanced ErrorDisplay in ErrorDisplay.tsx to show expandable error details.
    • Improved error messages in llmMessageService.ts for better user guidance.
  • Dropdowns and Inputs:
    • Replaced VoidCustomSelectBox with VoidCustomDropdownBox in inputs.tsx for better dropdown handling.
    • Updated ModelDropdown in ModelDropdown.tsx to use new dropdown component and handle disabled states.
  • Settings and Configuration:
    • Updated Settings.tsx to include new model and provider settings with improved UI elements.
    • Added logic to handle provider and model state in voidSettingsService.ts.
  • Miscellaneous:
    • Refactored llmMessageTypes.ts to rename message types for clarity.
    • Adjusted styles and layout in various components for consistency and improved user experience.

This description was created by Ellipsis for 9025886. It will automatically update as commits are pushed.

@andrewpareles andrewpareles merged commit 5fa21be into main Feb 6, 2025

@ellipsis-dev ellipsis-dev Bot 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.

👍 Looks good to me! Reviewed everything up to 9025886 in 2 minutes and 8 seconds

More details
  • Looked at 3326 lines of code in 28 files
  • Skipped 2 files when reviewing.
  • Skipped posting 13 drafted comments based on config settings.
1. src/vs/workbench/contrib/void/browser/react/src/quick-edit-tsx/QuickEditChat.tsx:100
  • Draft comment:
    In the ref callback for VoidInputBox2, an event listener is added for the 'keydown' event and not explicitly removed. While this callback is recreated on mount, ensure that duplicate listeners are not added on re-renders. It might be beneficial to add a cleanup (or use useEffect within the component) so that the event listener is removed when the component unmounts.
  • Reason this comment was not posted:
    Comment was on unchanged code.
2. src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx:105
  • Draft comment:
    The VoidInputBox2 component uses a useCallback to set up the ref and call adjustHeight() on mount. Although the dependency array appears correct, consider whether any changes in the fnsRef or the inner state might require a re-attaching of event listeners. Double-check that no stale values are used, and that the text area’s height is always correctly updated on prop changes.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
3. src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/ModelDropdown.tsx:95
  • Draft comment:
    The MemoizedModelDropdown component caches _modelOptions from settingsState and updates when they change. Ensure that optionsEqual is efficient for large arrays. The useEffect updates oldOptionsRef.current and then calls setMemoizedOptions if there is a change. Consider memoizing optionsEqual results if performance becomes an issue.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
4. src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx:675
  • Draft comment:
    The onSubmit callback logs a message and awaits addUserMessageAndStreamResponse. Consider wrapping these async actions in try/catch, and verifying that state management (e.g., clearing the input box) occurs even in failure cases.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
5. src/vs/workbench/contrib/void/browser/voidSettingsPane.ts:92
  • Draft comment:
    In the VoidSettingsPane, after mounting the React component, ensure that the disposable registrations are properly handled. It’s a good idea to double-check that the scrollable container (and its associated disposables) are correctly cleaned up if the pane is closed.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
6. src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx:368
  • Draft comment:
    The AutoRefreshToggle component uses a SubtleButton to toggle global settings. Ensure that the dependency arrays are correct in the onClick callback so that metrics and state are up-to-date. The concatenation with refreshableProviderNames is useful, but consider also handling localization for the displayed text—especially if the settings pane is used internationally.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
7. src/vs/workbench/contrib/void/browser/quick-edit-tsx/QuickEditChat.tsx:50
  • Draft comment:
    The calculation of the disabled state (combining whether instructions are empty with the result of isFeatureNameDisabled) works correctly, but consider extracting it into a clearly named variable for better readability.
  • Reason this comment was not posted:
    Confidence changes required: 30% <= threshold 50%
    None
8. src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx:710
  • Draft comment:
    The useMemo for prevMessagesHTML is good; however, consider adding a comment to explain that this memoization helps avoid unnecessary re-renders when the message history updates.
  • Reason this comment was not posted:
    Confidence changes required: 20% <= threshold 50%
    None
9. src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx:106
  • Draft comment:
    In the VoidInputBox2 component, consider using useImperativeHandle if you need to expose additional instance methods. This may improve extendability in the future.
  • Reason this comment was not posted:
    Confidence changes required: 40% <= threshold 50%
    None
10. src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/ModelDropdown.tsx:29
  • Draft comment:
    When selecting the default option via options[0], consider adding a guard against an empty options array to prevent potential runtime errors.
  • Reason this comment was not posted:
    Comment was on unchanged code.
11. src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx:269
  • Draft comment:
    In ProviderSetting, the input box’s synchronization with the settings state uses an onDidChangeState subscription. Consider adding a comment explaining this mechanism and the role of the weChangedTextRef flag to prevent self-triggered updates.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50%
    None
12. src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/WarningBox.tsx:1
  • Draft comment:
    The WarningBox component is concise and clear. However, consider moving repetitive inline style definitions to a shared CSS module for consistency and maintainability.
  • Reason this comment was not posted:
    Confidence changes required: 20% <= threshold 50%
    None
13. src/vs/workbench/contrib/void/browser/voidSettingsPane.ts:91
  • Draft comment:
    When mounting the React settings UI, ensure that disposables returned from mountVoidSettings are properly registered. A clarifying comment here could help future maintainers understand the lifecycle management.
  • Reason this comment was not posted:
    Confidence changes required: 40% <= threshold 50%
    None

Workflow ID: wflow_tTug0FXROuvtonVl


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants