Skip to content

Commit 0c75dda

Browse files
committed
fix(web): pin session action buttons to right edge
1 parent ba6a1fd commit 0c75dda

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

web/src/components/layout/Sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ function SessionItem({
388388
</button>
389389
)}
390390
{!renaming && hover && (
391-
<div style={{ display: 'flex', gap: 2, flexShrink: 0, paddingRight: 6 }}>
391+
<div className="session-item-actions">
392392
<button
393393
className="workspace-action-btn"
394394
title="重命名"

web/src/index.css

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ html, body, #root {
393393
background: transparent;
394394
transition: background 200ms var(--ease-out);
395395
margin-bottom: 1px;
396+
position: relative;
396397
}
397398
.session-item-wrapper:hover { background: var(--bg-hover); }
398399
.session-item-wrapper:hover .workspace-action-btn { opacity: 1; transform: translateX(0); }
@@ -401,7 +402,8 @@ html, body, #root {
401402
.session-item {
402403
display: flex; align-items: center; gap: var(--space-2);
403404
width: 100%;
404-
padding: 5px 10px 5px 12px;
405+
min-width: 0;
406+
padding: 5px 58px 5px 12px;
405407
border-radius: var(--radius-md);
406408
border: none;
407409
background: transparent;
@@ -431,6 +433,15 @@ html, body, #root {
431433
.session-item .sess-time {
432434
font-size: 11px; color: var(--text-tertiary); flex-shrink: 0;
433435
}
436+
.session-item-actions {
437+
position: absolute;
438+
right: 6px;
439+
top: 50%;
440+
transform: translateY(-50%);
441+
display: flex;
442+
gap: 2px;
443+
z-index: 1;
444+
}
434445

435446
/* ── Workspace Header (the actual row with inline edit/delete) ── */
436447
.workspace-header {

0 commit comments

Comments
 (0)