Skip to content

Commit c99d6f0

Browse files
hydropixclaude
andcommitted
fix: truncate long model descriptions in dropdown to prevent layout overflow
Gemini model descriptions were too long, causing the dropdown to exceed container width and shift the page layout. Now shows only the display name with full description in tooltip, consistent with other providers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9c858ac commit c99d6f0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/web/static/js/providers/provider-manager.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,12 @@ function populateModelSelect(models, defaultModel = null, provider = 'ollama') {
200200
models.forEach(model => {
201201
const option = document.createElement('option');
202202
option.value = model.name;
203-
option.textContent = `${model.displayName || model.name} - ${model.description || ''}`;
204-
option.title = `Input: ${model.inputTokenLimit || 'N/A'} tokens, Output: ${model.outputTokenLimit || 'N/A'} tokens`;
203+
option.textContent = model.displayName || model.name;
204+
// Full description in tooltip
205+
let tooltip = [];
206+
if (model.description) tooltip.push(model.description);
207+
tooltip.push(`Input: ${model.inputTokenLimit || 'N/A'} tokens, Output: ${model.outputTokenLimit || 'N/A'} tokens`);
208+
option.title = tooltip.join(' | ');
205209
if (model.name === defaultModel) {
206210
option.selected = true;
207211
defaultModelFound = true;

src/web/static/style.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,6 +1583,8 @@ html.dark .file-info {
15831583
border: none;
15841584
cursor: pointer;
15851585
width: 100%;
1586+
min-width: 0;
1587+
overflow: hidden;
15861588
min-height: 44px;
15871589
transition: background 0.2s;
15881590
}

0 commit comments

Comments
 (0)