From 8dd9b67df9d6287a13c7d7c37ac938712fcda7c0 Mon Sep 17 00:00:00 2001 From: wizardchen Date: Mon, 18 May 2026 22:03:51 +0800 Subject: [PATCH] fix(menu): stop truncating session titles when extra space is available The session list items in the sidebar forced the title's max-width to 155px on hover and on the active item, while .menu-more-wrap was pushed to the right edge with margin-left:auto. This left a large gap between the truncated title and the kebab button on rows whose title actually fit within the row. Switch the title to a flex layout (flex: 1; min-width: 0) so it grows to fill the available space and only shows an ellipsis when the text genuinely overflows. The kebab wrapper keeps flex-shrink: 0 so its opacity-controlled visibility no longer needs to reshape the layout. --- frontend/src/components/menu.vue | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/menu.vue b/frontend/src/components/menu.vue index 5a5793a4..2b74a2a2 100644 --- a/frontend/src/components/menu.vue +++ b/frontend/src/components/menu.vue @@ -108,7 +108,7 @@ :checked="batchSelectedIds.includes(subitem.id)" @click.stop @change="toggleBatchSelect(subitem.id)" /> + :style="batchMode ? 'margin-left:4px;' : 'margin-left:14px;'"> { position: relative; .submenu_title { + flex: 1 1 auto; + min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .menu-more-wrap { - margin-left: auto; opacity: 0; transition: opacity 0.2s ease; + flex-shrink: 0; } .menu-more { @@ -1262,11 +1264,6 @@ const onDragHandleMouseDown = (e: MouseEvent) => { .menu-more-wrap { opacity: 1; } - - .submenu_title { - max-width: 155px !important; - - } } } @@ -1282,10 +1279,6 @@ const onDragHandleMouseDown = (e: MouseEvent) => { .menu-more-wrap { opacity: 1; } - - .submenu_title { - max-width: 155px !important; - } } .submenu_item_batch {