Skip to content

Commit b7e4448

Browse files
committed
improve(ui): anchor the workspace chip right after the session title
The chip now hugs the title text with the header's standard gap instead of sitting at the far right; the action cluster claims the leftover width and stays right-pinned. Where field-sizing is supported the rename input hugs its text too, so the chip tracks the title while typing.
1 parent 2db45d2 commit b7e4448

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

‎ui/src/styles/chat/split-view.css‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,11 @@ openclaw-chat-pane {
138138
background: color-mix(in srgb, var(--accent) 8%, transparent);
139139
}
140140

141+
/* The title hugs its text so the workspace chip sits right after it (the
142+
header's shared 8px gap provides the spacing); it may shrink with ellipsis
143+
when space runs out, and the action row pushes itself to the right edge. */
141144
.chat-pane__session-title {
142-
flex: 1 1 auto;
145+
flex: 0 1 auto;
143146
min-width: 0;
144147
overflow: hidden;
145148
color: var(--text);
@@ -180,6 +183,16 @@ openclaw-chat-pane {
180183
-webkit-user-select: text;
181184
}
182185

186+
/* Where supported, the rename input hugs its text too, so the workspace chip
187+
tracks the title while typing; elsewhere editing falls back to full width. */
188+
@supports (field-sizing: content) {
189+
.chat-pane__session-title-input {
190+
flex: 0 1 auto;
191+
field-sizing: content;
192+
max-width: min(60ch, 100%);
193+
}
194+
}
195+
183196
.chat-pane__cloud {
184197
display: inline-flex;
185198
flex: 0 0 auto;
@@ -232,6 +245,10 @@ openclaw-chat-pane {
232245
align-items: center;
233246
gap: 2px;
234247
flex: 0 0 auto;
248+
/* With the title text-hugging, this claims the leftover width so the
249+
action cluster stays pinned to the right edge (and doubles as the
250+
native window-drag surface between chip and actions). */
251+
margin-left: auto;
235252
}
236253

237254
@media (max-width: 480px) {

0 commit comments

Comments
 (0)