Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(chat): keep successful quiet scheduled checks out of replies #48275

Openvalkyriweb(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/48275/headopened View on GitHub

Showing 6 changed files with 189 additions and 0 deletions (loading 4).

x
0 of 6 viewed, 6 left
87 additions and 0 deletionsapps/web/src/components/chat/MessagesTimeline.browser.test.tsxModified
View file
@@ -41,6 +41,7 @@
import { environmentThreadDetails, environmentThreadShells } from "../../state/threads";
import { act, fakeTimers, render, stubGlobal } from "../../../test/render";
import { MessagesTimeline } from "./MessagesTimeline";
+import { scheduledTimelineTestFixture } from "./scheduledTimeline.test-fixtures";
import { V2LifecycleRow } from "./V2LifecycleRow";
import { createWorkspaceFocusController, workspaceAreaProps } from "../../lib/workspaceFocus";
import { resolveTimelineIsAtEnd } from "./MessagesTimeline.logic";
@@ -3948,3 +3949,89 @@
await act(() => vi.advanceTimersByTime(1));
expect(second.element()).toHaveAttribute("data-popup-open");
+​
+describe("MessagesTimeline scheduled finals", () => {
+ const { fx, run, latestRun, scheduled, commentary, final, entries } =
+ scheduledTimelineTestFixture();
+ const placeholder = "(empty response)";
+​
+ it.each(["latest", "historical"])(
+ "drops a %s completed scheduled empty reply but keeps its work available",
+ async (when) => {
+ const props = baseProps();
+ const timelineEntries = entries(scheduled, commentary, final);
+ const ui = (runs: TimelineProps["runs"], working = false) => (
+ <MessagesTimeline
+ {...props}
+ timelineEntries={timelineEntries}
+ runs={runs}
+ isWorking={working}