Skip to content

fix(studio): refine model-load toast stop action and compare selector…#4369

Merged
danielhanchen merged 1 commit into
unslothai:feature/compare-two-diff-modelsfrom
Imagineer99:feature/compare-two-diff-models
Mar 17, 2026
Merged

fix(studio): refine model-load toast stop action and compare selector…#4369
danielhanchen merged 1 commit into
unslothai:feature/compare-two-diff-modelsfrom
Imagineer99:feature/compare-two-diff-models

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

… sizing

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the user experience within the studio's chat feature. It refines the visual presentation and interaction of the model loading toast, making it more informative and user-friendly. Additionally, it addresses layout issues with the model comparison selectors, ensuring they display correctly across different screen sizes.

Highlights

  • Model Load Toast UI Refinement: The model loading toast now features a more refined UI, including a dedicated title, an integrated spinner, and a redesigned 'Stop' button that uses an XIcon for a cleaner appearance and improved user experience.
  • Compare Selector Sizing Adjustment: The sizing of the model comparison selectors in the chat page has been adjusted to ensure they flex appropriately and occupy available space, preventing overflow issues.
  • Compare Feature Availability: The model comparison feature is now always considered available, simplifying the logic for its display.
Changelog
  • studio/frontend/src/features/chat/chat-page.tsx
    • Updated model selector className to min-w-0 flex-1 for better sizing.
    • Simplified canCompare logic to always return true.
  • studio/frontend/src/features/chat/components/model-load-status.tsx
    • Added XIcon import.
    • Introduced a title prop to ModelLoadDescription.
    • Refactored the layout of ModelLoadDescription to include a spinner and a dedicated title area.
    • Redesigned the 'Stop' button to use an XIcon and updated its styling.
  • studio/frontend/src/features/chat/hooks/use-chat-model-runtime.ts
    • Removed Spinner import.
    • Adjusted MODEL_LOAD_TOAST_CLASSNAMES for better toast layout.
    • Modified renderLoadDescription to accept a title parameter.
    • Updated toast calls to pass null as the primary message and utilize the new title prop in ModelLoadDescription.
    • Set closeButton to false for toasts, relying on the custom stop button.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist 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.

Code Review

The pull request refines the user interface and experience for model loading and comparison features. The ModelSelector components now have improved sizing for better responsiveness. The canCompare logic has been simplified, making the comparison feature always available. The ModelLoadDescription component has been refactored to integrate the loading spinner and a dedicated stop button with an XIcon, enhancing its self-containment and accessibility. Corresponding updates in use-chat-model-runtime.ts ensure that toast notifications correctly utilize the new ModelLoadDescription structure, removing redundant elements and adjusting toast properties for a cohesive user experience. All changes appear to be well-executed UI/UX improvements.

@danielhanchen danielhanchen merged commit 6a93f74 into unslothai:feature/compare-two-diff-models Mar 17, 2026
1 check passed
rolandtannous pushed a commit that referenced this pull request Mar 17, 2026
* compare for 2 diff models

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* resolving gemini comments

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix(studio): refine model-load toast stop action and compare selector sizing (#4369)

Co-authored-by: imagineer99 <samleejackson0@gmail.com>

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniel Han <danielhanchen@gmail.com>
Co-authored-by: imagineer99 <samleejackson0@gmail.com>
shibizhao pushed a commit to shibizhao/unsloth-npu that referenced this pull request Apr 7, 2026
* compare for 2 diff models

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* resolving gemini comments

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix(studio): refine model-load toast stop action and compare selector sizing (unslothai#4369)

Co-authored-by: imagineer99 <samleejackson0@gmail.com>

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniel Han <danielhanchen@gmail.com>
Co-authored-by: imagineer99 <samleejackson0@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants