Revert "Add experimental newest-first issue thread" (#5460)

This is actually bad. Glad it was under experiments.
This commit is contained in:
Devin Foley 2026-05-07 16:50:31 -07:00 committed by GitHub
parent a904effb96
commit 0e1a582831
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 106 additions and 415 deletions

View file

@ -59,7 +59,6 @@ const mockProjectsApi = vi.hoisted(() => ({
const mockInstanceSettingsApi = vi.hoisted(() => ({
getGeneral: vi.fn(),
getExperimental: vi.fn(),
}));
const mockNavigate = vi.hoisted(() => vi.fn());
@ -193,7 +192,6 @@ vi.mock("../components/InlineEditor", () => ({
vi.mock("../components/IssueChatThread", () => ({
IssueChatThread: (props: {
newestFirst?: boolean;
onWorkModeChange?: (workMode: string) => void;
issueWorkMode?: string;
onStopRun?: (runId: string) => Promise<void>;
@ -806,9 +804,6 @@ describe("IssueDetail", () => {
keyboardShortcuts: false,
feedbackDataSharingPreference: "prompt",
});
mockInstanceSettingsApi.getExperimental.mockResolvedValue({
enableNewestFirstIssueThread: false,
});
mockIssuesListRender.mockClear();
mockIssueChatThreadRender.mockClear();
});
@ -844,45 +839,6 @@ describe("IssueDetail", () => {
expect(consoleErrorSpy).not.toHaveBeenCalled();
});
it("passes oldest-first thread mode when the experimental flag is disabled", async () => {
mockIssuesApi.get.mockResolvedValue(createIssue());
await act(async () => {
root.render(
<QueryClientProvider client={queryClient}>
<IssueDetail />
</QueryClientProvider>,
);
});
await flushReact();
expect(mockIssueChatThreadRender.mock.calls.at(-1)?.[0]).toMatchObject({
newestFirst: false,
});
});
it("passes newest-first thread mode when the experimental flag is enabled", async () => {
mockIssuesApi.get.mockResolvedValue(createIssue());
mockInstanceSettingsApi.getExperimental.mockResolvedValue({
enableNewestFirstIssueThread: true,
});
await act(async () => {
root.render(
<QueryClientProvider client={queryClient}>
<IssueDetail />
</QueryClientProvider>,
);
});
await flushReact();
expect(mockIssueChatThreadRender.mock.calls.at(-1)?.[0]).toMatchObject({
newestFirst: true,
});
});
it("passes blocker attention to the issue detail header status icon", async () => {
mockIssuesApi.get.mockResolvedValue(createIssue({
status: "blocked",