mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-26 18:31:34 +01:00
fix(runner): place agent identity above activity
This commit is contained in:
1 parent
d2c851523b
commit
c925b3fbb9
2 files changed
+8
-2
No files matched your search
@@ -35,6 +35,9 @@ describe("TaskChatRunnerTurn", () => {
|
||||
expect(container.querySelector('[data-testid="task-chat-current-activity"] svg')).toBeNull();
|
||||
expect(container.textContent).not.toContain("Working");
|
||||
expect(container.textContent).not.toContain("Waiting for transcript");
|
||||
const identity = container.querySelector('[data-testid="task-chat-agent-identity"]');
|
||||
const activity = container.querySelector('[data-testid="task-chat-current-activity"]');
|
||||
expect(identity?.compareDocumentPosition(activity!)).toBe(Node.DOCUMENT_POSITION_FOLLOWING);
|
||||
});
|
||||
|
||||
it("keeps progress separate from the replace-in-place current command", () => {
|
||||
@@ -45,6 +48,9 @@ describe("TaskChatRunnerTurn", () => {
|
||||
expect(container.querySelector('[data-testid="task-chat-progress-update"]')?.textContent).toContain("Running the exact command now.");
|
||||
expect(container.querySelector('[data-testid="task-chat-current-activity"]')?.textContent).toContain("Running a command");
|
||||
expect(container.textContent).toContain("STREAM-$i");
|
||||
const identity = container.querySelector('[data-testid="task-chat-agent-identity"]');
|
||||
const activity = container.querySelector('[data-testid="task-chat-current-activity"]');
|
||||
expect(identity?.compareDocumentPosition(activity!)).toBe(Node.DOCUMENT_POSITION_FOLLOWING);
|
||||
});
|
||||
|
||||
it("streams the final response in its durable slot and hides current activity", () => {
|
||||
|
||||
@@ -79,8 +79,8 @@ export function TaskChatRunnerTurn({
|
||||
if (status === "queued") {
|
||||
return (
|
||||
<div className="flex flex-col gap-1 py-1" data-testid="task-chat-runner-turn" data-phase="startup">
|
||||
<CurrentActivity items={items} />
|
||||
{agentName ? <TaskChatAgentIdentity agentName={agentName} agentIcon={agentIcon} /> : null}
|
||||
<CurrentActivity items={items} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -96,6 +96,7 @@ export function TaskChatRunnerTurn({
|
||||
expanded={open}
|
||||
onToggle={() => setOpen((value) => !value)}
|
||||
/>
|
||||
{agentName ? <TaskChatAgentIdentity agentName={agentName} agentIcon={agentIcon} /> : null}
|
||||
<div className="tc-turn-fold" data-folded={open ? "false" : "true"} aria-hidden={!open}>
|
||||
<div>
|
||||
<div className="flex flex-col gap-2 py-2">
|
||||
@@ -113,7 +114,6 @@ export function TaskChatRunnerTurn({
|
||||
{!final ? <CurrentActivity items={items} /> : null}
|
||||
</div>
|
||||
) : null}
|
||||
{agentName ? <TaskChatAgentIdentity agentName={agentName} agentIcon={agentIcon} /> : null}
|
||||
{final ? (
|
||||
<div className="tc-enter-bubble w-full" data-testid="task-chat-final-response">
|
||||
<div className="break-words px-1 py-2 text-sm text-foreground" data-testid="task-chat-agent-bubble">
|
||||
|
||||
Reference in new issue
Block a user