mirror of
https://github.com/murashit/codex-panel.git
synced 2026-07-22 17:30:31 +00:00
Clarify fork action icon state
This commit is contained in:
parent
eaa7f55c4a
commit
470cc032c9
2 changed files with 3 additions and 1 deletions
|
|
@ -49,7 +49,7 @@ export function TextItemHeader({ item, context }: { item: TextMessageStreamItem;
|
|||
)}
|
||||
{context.canForkItem?.(item) ? (
|
||||
<TextItemAction
|
||||
icon="git-fork"
|
||||
icon={forkActionsOpen ? "file-plus-corner" : "lucide-split"}
|
||||
label={forkActionsOpen ? "Fork" : "Fork from here"}
|
||||
className="codex-panel__fork-message"
|
||||
onClick={() => {
|
||||
|
|
|
|||
|
|
@ -347,6 +347,7 @@ describe("message stream rendering and message actions", () => {
|
|||
expect(closedElement.querySelector(".codex-panel__copy-message")).not.toBeNull();
|
||||
const initialFork = expectPresent(closedElement.querySelector<HTMLButtonElement>(".codex-panel__fork-message"));
|
||||
expect(initialFork.getAttribute("aria-label")).toBe("Fork from here");
|
||||
expect(initialFork.getAttribute("data-icon")).toBe("lucide-split");
|
||||
initialFork.click();
|
||||
expect(onForkActionsToggle).toHaveBeenCalledWith("a1");
|
||||
|
||||
|
|
@ -373,6 +374,7 @@ describe("message stream rendering and message actions", () => {
|
|||
);
|
||||
const openFork = expectPresent(openElement.querySelector<HTMLButtonElement>(".codex-panel__fork-message"));
|
||||
expect(openFork.getAttribute("aria-label")).toBe("Fork");
|
||||
expect(openFork.getAttribute("data-icon")).toBe("file-plus-corner");
|
||||
openFork.click();
|
||||
expect(onForkItem).toHaveBeenCalledWith(expect.objectContaining({ id: "a1" }), false);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue