[PR #17796] [MERGED] fix: truncate long filter tags in model selector and prevent wrapping #111863

Closed
opened 2026-05-18 11:50:25 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/17796
Author: @silentoplayz
Created: 9/26/2025
Status: Merged
Merged: 9/26/2025
Merged by: @tjbck

Base: devHead: truncate-selector-tags


📝 Commits (1)

  • b516431 fix: truncate long filter tags in model selector and prevent wrapping

📊 Changes

1 file changed (+15 additions, -13 deletions)

View changed files

📝 src/lib/components/chat/ModelSelector/Selector.svelte (+15 -13)

📄 Description

Pull Request Checklist

Before submitting, make sure you've checked the following:

  • Target branch: Please verify that the pull request targets the dev branch.
  • Description: Provide a concise description of the changes made in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • Testing: Have you written and run sufficient tests to validate the changes?
  • Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
  • Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
    • BREAKING CHANGE: Significant changes that may affect compatibility
    • build: Changes that affect the build system or external dependencies
    • ci: Changes to our continuous integration processes or workflows
    • chore: Refactor, cleanup, or other non-functional code changes
    • docs: Documentation update or addition
    • feat: Introduces a new feature or enhancement to the codebase
    • fix: Bug fix or error correction
    • i18n: Internationalization or localization changes
    • perf: Performance improvement
    • refactor: Code restructuring for better maintainability, readability, or scalability
    • style: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.)
    • test: Adding missing tests or correcting existing tests
    • WIP: Work in progress, a temporary label for incomplete or ongoing work

Changelog Entry

Description

  • This commit addresses an issue where long filter tags at the top of the model selector dropdown were not truncated correctly and would wrap to a new line, causing layout issues.

  • A hard character limit of 16 characters is applied to the filter tags within the Selector.svelte component. Tags longer than 16 characters are truncated with an ellipsis (...) directly in the code. The full tag name remains available in the tooltip.

  • The whitespace-nowrap class has been added to the tag container to ensure that the tags remain on a single, horizontally scrollable line.

Changed

  • Filter tags in src/lib/components/chat/ModelSelector/Selector.svelte are now truncated to 16 characters with an ellipsis if they exceed the limit.
  • The container for the filter tags now uses whitespace-nowrap to prevent wrapping.

Fixed

  • Fixed a layout issue where long filter tags in the model selector dropdown would wrap and were not truncated.

Additional Information

  • The full, untruncated tag name is still available via the tooltip on hover.\
  • The filter tags will now scroll horizontally if they overflow the container width.

Screenshots or Videos

Before the fix applied:
image

image

After the fix is applied:
image

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/17796 **Author:** [@silentoplayz](https://github.com/silentoplayz) **Created:** 9/26/2025 **Status:** ✅ Merged **Merged:** 9/26/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `truncate-selector-tags` --- ### 📝 Commits (1) - [`b516431`](https://github.com/open-webui/open-webui/commit/b516431569b57d58de54d84b1e9d0269b59d597e) fix: truncate long filter tags in model selector and prevent wrapping ### 📊 Changes **1 file changed** (+15 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/ModelSelector/Selector.svelte` (+15 -13) </details> ### 📄 Description # Pull Request Checklist **Before submitting, make sure you've checked the following:** - [X] **Target branch:** Please verify that the pull request targets the `dev` branch. - [X] **Description:** Provide a concise description of the changes made in this pull request. - [X] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [X] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? - [X] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? - [X] **Testing:** Have you written and run sufficient tests to validate the changes? - [X] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards? - [X] **Prefix:** To clearly categorize this pull request, prefix the pull request title using one of the following: - **BREAKING CHANGE**: Significant changes that may affect compatibility - **build**: Changes that affect the build system or external dependencies - **ci**: Changes to our continuous integration processes or workflows - **chore**: Refactor, cleanup, or other non-functional code changes - **docs**: Documentation update or addition - **feat**: Introduces a new feature or enhancement to the codebase - **fix**: Bug fix or error correction - **i18n**: Internationalization or localization changes - **perf**: Performance improvement - **refactor**: Code restructuring for better maintainability, readability, or scalability - **style**: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.) - **test**: Adding missing tests or correcting existing tests - **WIP**: Work in progress, a temporary label for incomplete or ongoing work # Changelog Entry ### Description - This commit addresses an issue where long filter tags at the top of the model selector dropdown were not truncated correctly and would wrap to a new line, causing layout issues. - A hard character limit of 16 characters is applied to the filter tags within the `Selector.svelte` component. Tags longer than 16 characters are truncated with an ellipsis (...) directly in the code. The full tag name remains available in the tooltip. - The `whitespace-nowrap` class has been added to the tag container to ensure that the tags remain on a single, horizontally scrollable line. ### Changed - Filter tags in `src/lib/components/chat/ModelSelector/Selector.svelte` are now truncated to 16 characters with an ellipsis if they exceed the limit. - The container for the filter tags now uses `whitespace-nowrap` to prevent wrapping. ### Fixed - Fixed a layout issue where long filter tags in the model selector dropdown would wrap and were not truncated. ### Additional Information - The full, untruncated tag name is still available via the tooltip on hover.\ - The filter tags will now scroll horizontally if they overflow the container width. ### Screenshots or Videos **Before the fix applied:** <img width="566" height="1026" alt="image" src="https://github.com/user-attachments/assets/51dc9ca3-0880-443c-9c9b-43aa54ae5703" /> <img width="543" height="1261" alt="image" src="https://github.com/user-attachments/assets/0bd3be3f-4bb2-42b8-937a-66ade948512f" /> **After the fix is applied:** <img width="642" height="426" alt="image" src="https://github.com/user-attachments/assets/a65df21f-4dfd-4baf-b13e-562c5f6f50bd" /> ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-18 11:50:25 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#111863