Skip to content

Commit 5d89656

Browse files
improve(ui): show completed work as one "Worked for" line with a visible chevron
Co-authored-by: vyctorbrzezowski <[email protected]>
1 parent 68647db commit 5d89656

5 files changed

Lines changed: 23 additions & 16 deletions

File tree

‎ui/src/e2e/chat-worked-for-visualization.e2e.test.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,18 @@ suite.define(() => {
316316
await workedFor.waitFor();
317317
await waitForChatScrollIdle(page);
318318
await captureProof(page, "worked-for-geometry-collapsed");
319+
// Completed work is one line: its label and a resting chevron, with no rule below.
320+
expect(
321+
await workedFor.evaluate((button) => {
322+
const chevron = button.querySelector(".chat-inline-disclosure__chevron");
323+
return {
324+
chevronOpacity: chevron ? getComputedStyle(chevron).opacity : null,
325+
trailing:
326+
button.parentElement!.getBoundingClientRect().bottom -
327+
button.getBoundingClientRect().bottom,
328+
};
329+
}),
330+
).toEqual({ chevronOpacity: "1", trailing: 0 });
319331

320332
const geometry = await workedFor.evaluate(async (element) => {
321333
const owner = element.closest("openclaw-chat-pane") as

‎ui/src/pages/chat/chat-responsive.browser.test.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ function uniformTurnSpacingHtml(placement: AvatarPlacement) {
148148
<div class="chat-group-messages">
149149
<div class="chat-activity-group chat-work-group">
150150
<button class="chat-inline-disclosure chat-activity-group__summary" type="button">${summary}</button>
151-
<div class="chat-work-group__separator"></div>
152151
</div>
153152
</div>
154153
</div>`;
@@ -229,7 +228,6 @@ function runBlockSpacingHtml() {
229228
<div class="chat-bubble" data-run-block="activity-reply"><div class="chat-text">Activity result</div></div>
230229
<div class="chat-activity-group chat-work-group" data-run-block="work">
231230
<button class="chat-inline-disclosure chat-activity-group__summary" type="button">Worked for 10s</button>
232-
<div class="chat-work-group__separator"></div>
233231
</div>
234232
<div class="chat-bubble" data-run-block="reply"><div class="chat-text">Final reply</div></div>
235233
</div>
@@ -891,7 +889,7 @@ describeBrowserLayout.concurrent("chat responsive browser layout", () => {
891889
toolToList: 8,
892890
listToReply: 8,
893891
replyToWork: 8,
894-
workToReply: 8,
892+
workToReply: 10,
895893
expandedTextToTool: 6,
896894
// Footer offset + 24px footer row + turn gap (16px, or 12px on touch).
897895
turn: hasTouch ? 38 : 42,

‎ui/src/pages/chat/components/chat-work-group-summary.tsx‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,10 @@ function WorkGroupSummaryBody(props: {
128128
</span>
129129
)}
130130
</For>
131-
<span class="chat-tool-row__chevron" aria-hidden="true">
132-
<Icon name="chevronRight" />
131+
<span class="chat-inline-disclosure__chevron" aria-hidden="true">
132+
<Icon name="chevronDown" />
133133
</span>
134134
</button>
135-
<div class="chat-work-group__separator" aria-hidden="true" />
136135
<Show when={!props.options.expanded && !props.options.bubbleMode}>
137136
<BrowserTabPreviews
138137
previews={props.options.browserTabPreviews}

‎ui/src/styles/chat/grouped.css‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2196,10 +2196,6 @@ button.chat-reply-attribution__target:disabled {
21962196
margin-block-start: 8px;
21972197
}
21982198

2199-
.chat-activity-group--bubble > .chat-work-group__separator {
2200-
display: none;
2201-
}
2202-
22032199
.chat-bubble-dots {
22042200
display: inline-flex;
22052201
align-items: center;

‎ui/src/styles/chat/tool-cards.css‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,8 +1084,16 @@
10841084
}
10851085
}
10861086

1087+
/* Completed work reads as a quiet heading over what follows: a medium label and
1088+
a resting chevron, with no divider. Two extra pixels below the uniform
1089+
run-block gap keep the label from crowding the reply or a leading code block. */
1090+
.chat-work-group {
1091+
margin-block-end: 2px;
1092+
}
1093+
10871094
.chat-work-group .chat-activity-group__label {
10881095
color: inherit;
1096+
font-weight: var(--control-ui-font-weight-semibold);
10891097
}
10901098

10911099
.chat-work-group__total {
@@ -1132,12 +1140,6 @@
11321140
}
11331141
}
11341142

1135-
.chat-work-group__separator {
1136-
width: 100%;
1137-
height: 1px;
1138-
background: var(--border);
1139-
}
1140-
11411143
@media (pointer: coarse) {
11421144
.chat-activity-group__summary {
11431145
padding-top: 8px;

0 commit comments

Comments
 (0)