diff --git a/ui/src/components/IssuesList.test.tsx b/ui/src/components/IssuesList.test.tsx index d2ea53ff7b1..aa13ac30707 100644 --- a/ui/src/components/IssuesList.test.tsx +++ b/ui/src/components/IssuesList.test.tsx @@ -1056,7 +1056,7 @@ describe("IssuesList", () => { }); it("waits for the desktop main scroll container before rendering more local rows", async () => { - const manyIssues = Array.from({ length: 420 }, (_, index) => + const manyIssues = Array.from({ length: 120 }, (_, index) => createIssue({ id: `issue-${index + 1}`, identifier: `PAP-${index + 1}`, @@ -1114,8 +1114,8 @@ describe("IssuesList", () => { title: `Issue ${index + 1}`, }), ); - const onLoadMoreIssues = vi.fn(); - setDocumentScrollMetrics({ innerHeight: 2000, scrollY: 0, scrollHeight: 1000 }); + const onLoadMoreIssues = vi.fn(); + setDocumentScrollMetrics({ innerHeight: 2000, scrollY: 0, scrollHeight: 1000 }); const { root } = renderWithQueryClient( setCopied(false), 1500); + timerRef.current = setTimeout(() => { + setCopied(false); + setFailed(false); + }, 1500); }, [children]); const label = failed ? "Copy failed" : copied ? "Copied!" : "Copy"; diff --git a/ui/src/components/NewIssueDialog.test.tsx b/ui/src/components/NewIssueDialog.test.tsx index f938af87e53..37ad879edde 100644 --- a/ui/src/components/NewIssueDialog.test.tsx +++ b/ui/src/components/NewIssueDialog.test.tsx @@ -222,6 +222,22 @@ async function flush() { }); } +async function waitForAssertion(assertion: () => void, attempts = 20) { + let lastError: unknown; + + for (let attempt = 0; attempt < attempts; attempt += 1) { + try { + assertion(); + return; + } catch (error) { + lastError = error; + await flush(); + } + } + + throw lastError; +} + function renderDialog(container: HTMLDivElement) { const queryClient = new QueryClient({ defaultOptions: { @@ -351,7 +367,9 @@ describe("NewIssueDialog", () => { const submitButton = Array.from(container.querySelectorAll("button")) .find((button) => button.textContent?.includes("Create Sub-Issue")); expect(submitButton).not.toBeUndefined(); - expect(submitButton?.hasAttribute("disabled")).toBe(false); + await waitForAssertion(() => { + expect(submitButton?.hasAttribute("disabled")).toBe(false); + }); await act(async () => { submitButton!.dispatchEvent(new MouseEvent("click", { bubbles: true })); @@ -404,7 +422,9 @@ describe("NewIssueDialog", () => { const submitButton = Array.from(container.querySelectorAll("button")) .find((button) => button.textContent?.includes("Create Issue")); expect(submitButton).not.toBeUndefined(); - expect(submitButton?.hasAttribute("disabled")).toBe(false); + await waitForAssertion(() => { + expect(submitButton?.hasAttribute("disabled")).toBe(false); + }); await act(async () => { submitButton!.dispatchEvent(new MouseEvent("click", { bubbles: true })); diff --git a/ui/src/index.css b/ui/src/index.css index e41b82a87ad..5335e4f6f39 100644 --- a/ui/src/index.css +++ b/ui/src/index.css @@ -682,9 +682,9 @@ a.paperclip-mention-chip[data-mention-kind="agent"]::before { gap: 0.25rem; padding: 0.2rem 0.4rem; border-radius: calc(var(--radius) - 4px); - border: 1px solid #ffffff26; - background-color: #2a2a3e; - color: #cdd6f4; + border: 1px solid color-mix(in oklab, var(--foreground) 14%, transparent); + background-color: color-mix(in oklab, var(--muted) 92%, var(--background) 8%); + color: var(--muted-foreground); font-size: 0.7rem; line-height: 1; cursor: pointer; @@ -699,16 +699,16 @@ a.paperclip-mention-chip[data-mention-kind="agent"]::before { } .paperclip-markdown-codeblock-copy:hover { - background-color: #3a3a52; - color: #ffffff; + background-color: var(--accent); + color: var(--accent-foreground); } .paperclip-markdown-codeblock-copy[data-copied] { - color: #a6e3a1; + color: var(--primary); } .paperclip-markdown-codeblock-copy[data-failed] { - color: #f38ba8; + color: var(--destructive); } .paperclip-markdown-codeblock-copy-label {