refactor(webui): derive footer spacing from thread tail
This commit is contained in:
1 parent
900675e7f8
commit
0f3cabb16d
4 files changed
+23
-20
No files matched your search
@@ -868,7 +868,7 @@ describe("MessageBubble", () => {
|
||||
expect(visibleFooter).toHaveClass("mt-2", "min-h-8", "opacity-100");
|
||||
});
|
||||
|
||||
it("omits hidden footer space for an intermediate assistant answer", () => {
|
||||
it("omits footer space when an active answer is no longer the tail", () => {
|
||||
const message: UIMessage = {
|
||||
id: "a-intermediate",
|
||||
role: "assistant",
|
||||
@@ -880,7 +880,7 @@ describe("MessageBubble", () => {
|
||||
<MessageBubble
|
||||
message={message}
|
||||
isTurnStreaming
|
||||
isTerminalAssistantSlice={false}
|
||||
isThreadTail={false}
|
||||
/>,
|
||||
);
|
||||
|
||||
|
||||
@@ -1532,7 +1532,7 @@ describe("ThreadMessages", () => {
|
||||
.closest<HTMLElement>("[data-thread-display-unit]")!;
|
||||
expect(firstAnswer.querySelector("[data-assistant-footer]")).not.toBeInTheDocument();
|
||||
expect(finalAnswer.querySelector("[data-assistant-footer]"))
|
||||
.toHaveAttribute("data-state", "visible");
|
||||
.toHaveAttribute("data-state", "reserved");
|
||||
expect(container.querySelectorAll('[data-assistant-footer] [aria-label="Copy"]')).toHaveLength(1);
|
||||
expect(container.querySelectorAll('[data-assistant-footer] [aria-label="Fork"]')).toHaveLength(1);
|
||||
|
||||
|
||||
Reference in new issue
Block a user